本文整理汇总了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});
}
}
}