/[RomCheater]/trunk/RomCheater/Docking/FloatingPIDSelector.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingPIDSelector.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Docking/PIDSelector.cs	2012/06/10 02:25:23	364
+++ trunk/RomCheater/Docking/PIDSelector.cs	2012/06/10 02:53:09	365
@@ -19,6 +19,8 @@
 {
     public partial class PIDSelector : DockContent, IAcceptsPlugin<IConfigPlugin>, IAcceptsChangedProcess, IAcceptsProcessPID
     {
+        private const int ProcessRefershInterval = 5000; // refresh interval in milliseconds
+        private bool isUserInteracting = false;
         private bool isRefreshing = false;
         private bool isAutoRefreshing = false;
         private bool isAttachingToProcess = false;
@@ -160,8 +162,8 @@
             ImageList small_image_list = new ImageList();
             ImageList large_image_list = new ImageList();
 
-            int small_width = 32;
-            int large_width = 48;
+            int small_width = 24;
+            int large_width = 32;
 
             small_image_list.ImageSize = new Size(small_width, small_width);
             large_image_list.ImageSize = new Size(large_width, large_width);
@@ -243,11 +245,10 @@
         private void PIDSelector_Load(object sender, EventArgs e)
         {
             if (AcceptedPlugin == null || this.DesignMode) return;
+            ProcessWatcherTimer.Interval = ProcessRefershInterval;
             txtstatus_Pid.Text = "";
             txtstatus_Filename.Text = "";
-            ResetViewButtonControls();
-            SetControlBackColor(btnList, KnownColor.ActiveCaption);
-            SetViewForProcessListView(View.List);
+            SetViewForProcessListView(View.LargeIcon);
             this.RefreshList();
         }
 
@@ -277,7 +278,7 @@
 
         private void ProcessWatcherTimer_Tick(object sender, EventArgs e) 
         {
-            if (isRefreshing || isAutoRefreshing) return;
+            if (isRefreshing || isAutoRefreshing || isUserInteracting) return;
             //if (lstProcessList.Items.Count == 0) return;
             isAutoRefreshing = true;
             int pid = this.ProcessPID;          
@@ -322,6 +323,17 @@
                 }
             }
         }
+
+
+        private void lstProcessList_MouseMove(object sender, MouseEventArgs e)
+        {
+            isUserInteracting = true;
+        }
+
+        private void lstProcessList_MouseLeave(object sender, EventArgs e)
+        {
+            isUserInteracting = false;
+        }
     }
 }
 

 

  ViewVC Help
Powered by ViewVC 1.1.22