Doesn't update threads/handles unless viewing them

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@224 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
wj32
2008-12-05 10:06:16 +00:00
parent 54230a23b6
commit dacbd48e37
3 changed files with 28 additions and 3 deletions
+1 -1
View File
@@ -2,8 +2,8 @@ Process Hacker
1.2.3.5
* Added handle viewing/closing support
* Added handle finder
* Fixed random crashes
* Doesn't update threads/handles unless viewing them
1.2.3.0
* Fixed incorrect messages about "new services" (actually fixed this time)
+1
View File
@@ -1119,6 +1119,7 @@
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(438, 350);
this.tabControl.TabIndex = 5;
this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged);
//
// tabProcess
//
+26 -2
View File
@@ -3055,12 +3055,16 @@ namespace ProcessHacker
threadP = new ThreadProvider(processSelectedPID);
listThreads.Provider = threadP;
threadP.Interval = Properties.Settings.Default.RefreshInterval;
threadP.Enabled = true;
if (tabControl.SelectedTab == tabThreads)
threadP.Enabled = true;
handleP = new HandleProvider(processSelectedPID);
listHandles.Provider = handleP;
handleP.Interval = Properties.Settings.Default.RefreshInterval;
handleP.Enabled = true;
if (tabControl.SelectedTab == tabHandles)
handleP.Enabled = true;
if (Properties.Settings.Default.UseToolhelpModules)
UpdateModuleInfoToolhelp();
@@ -3268,5 +3272,25 @@ namespace ProcessHacker
t.Priority = ThreadPriority.Lowest;
t.Start();
}
private void tabControl_SelectedIndexChanged(object sender, EventArgs e)
{
if (threadP != null)
threadP.Enabled = false;
if (handleP != null)
handleP.Enabled = false;
if (tabControl.SelectedTab == tabThreads)
{
if (threadP != null)
threadP.Enabled = true;
}
else if (tabControl.SelectedTab == tabHandles)
{
if (handleP != null)
handleP.Enabled = true;
}
}
}
}