Skip to content

Commit

Permalink
计时器方式选中文件
Browse files Browse the repository at this point in the history
  • Loading branch information
indiff committed Feb 28, 2024
1 parent 2fc0d6b commit c63a281
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions QTTabBar/QTTabBarClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2569,7 +2569,7 @@ private void DoFirstNavigation(bool before, string path) {
}

/**
* 定时器方式来获取微信或者qq打开后的选中文件
* 计时器间隔 1 秒方式来获取微信或者qq打开后的选中文件
*/
private void Wait4Select()
{
Expand All @@ -2580,12 +2580,14 @@ private void Wait4Select()

QTUtility2.log("Wait4Select");
int count = 1;
// 自关闭 计时器间隔 1 秒
Timer timer = new Timer { Interval = 1000 };
timer.Tick += (sender, args) =>
{
try
{
count++;
// 超过次数10次 自关闭
if (count >= 10)
{
timer.Stop();
Expand Down Expand Up @@ -2696,14 +2698,6 @@ private void Wait4SelectedQuit()
WindowUtils.CloseExplorer(ExplorerHandle, 0);
}
/*if (list.Count > 0)
QTUtility2.log("set dict " + tabItem.CurrentPath);
InstanceManager.selectDict.Add(tabItem.CurrentPath, list);
timer.Stop();
Explorer.Quit();
WindowUtils.CloseExplorer(ExplorerHandle, 0);
}*/
}
}
}
Expand Down Expand Up @@ -4673,7 +4667,9 @@ private void InitializeSysMenu(bool fText) {
contextMenuSys.Items[0].Dispose();
contextMenuSys.Items.AddRange(new ToolStripItem[]
{
tsmiGroups, tsmiUndoClose, tsmiLastActiv, tsmiExecuted, tssep_Sys1, tsmiBrowseFolder, tsmiCloseAllButCurrent, tsmiCloseWindow, tsmiMergeWindows, tsmiLockToolbar, tssep_Sys2, tsmiOption
tsmiGroups, tsmiUndoClose, tsmiLastActiv, tsmiExecuted,
tssep_Sys1, tsmiBrowseFolder, tsmiCloseAllButCurrent, tsmiCloseWindow,
tsmiMergeWindows, tsmiLockToolbar, tssep_Sys2, tsmiOption
});
}

Expand Down

0 comments on commit c63a281

Please sign in to comment.