本文整理匯總了C#中QTTabBarLib.IDLWrapper.TryGetLinkTarget方法的典型用法代碼示例。如果您正苦於以下問題:C# IDLWrapper.TryGetLinkTarget方法的具體用法?C# IDLWrapper.TryGetLinkTarget怎麽用?C# IDLWrapper.TryGetLinkTarget使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類QTTabBarLib.IDLWrapper
的用法示例。
在下文中一共展示了IDLWrapper.TryGetLinkTarget方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: subDirTip_MultipleMenuItemsClicked
private void subDirTip_MultipleMenuItemsClicked(object sender, EventArgs e)
{
// this can run in both desktop and taskbar thread
SubDirTipForm sdtf = (SubDirTipForm)sender;
IntPtr hwndDialogParent = sdtf == subDirTip ? hwndListView : hwndShellTray;
// SubDirTip_QTGRootItem
string[] arrGrps = sdtf.ExecutedGroups;
if(arrGrps.Length > 0) {
Thread thread = new Thread(OpenGroup);
thread.SetApartmentState(ApartmentState.STA);
thread.IsBackground = true;
thread.Start(new object[] {arrGrps, ModifierKeys});
}
// folders
if(sdtf.ExecutedIDLs.Count > 0) {
List<byte[]> lstIDLs = new List<byte[]>();
foreach(byte[] idl in sdtf.ExecutedIDLs) {
using(IDLWrapper idlw = new IDLWrapper(idl, false)) {
if(idlw.IsLink) {
IDLWrapper idlwTarget;
if(idlw.TryGetLinkTarget(hwndDialogParent, out idlwTarget)) {
if(idlwTarget.IsFolder) {
if(idlw.IsFolder) {
lstIDLs.Add(idlw.IDL);
}
else {
lstIDLs.Add(idlwTarget.IDL);
}
}
}
}
else {
lstIDLs.Add(idlw.IDL);
}
}
}
Keys modKey = ModifierKeys;
if(!Config.Bool(Scts.ActivateNewTab)) {
if(modKey == Keys.Shift) {
modKey = Keys.None;
}
else if(modKey == Keys.None) {
modKey = Keys.Shift;
}
}
if(lstIDLs.Count == 1) {
OpenTab(new object[] {null, modKey, lstIDLs[0]});
}
else if(lstIDLs.Count > 1) {
Thread thread = new Thread(OpenFolders2);
thread.SetApartmentState(ApartmentState.STA);
thread.IsBackground = true;
thread.Start(new object[] {lstIDLs, modKey});
}
}
}