/[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

revision 364 by william, Sun Jun 10 02:25:23 2012 UTC revision 365 by william, Sun Jun 10 02:53:09 2012 UTC
# Line 19  namespace RomCheater.Docking Line 19  namespace RomCheater.Docking
19  {  {
20      public partial class PIDSelector : DockContent, IAcceptsPlugin<IConfigPlugin>, IAcceptsChangedProcess, IAcceptsProcessPID      public partial class PIDSelector : DockContent, IAcceptsPlugin<IConfigPlugin>, IAcceptsChangedProcess, IAcceptsProcessPID
21      {      {
22            private const int ProcessRefershInterval = 5000; // refresh interval in milliseconds
23            private bool isUserInteracting = false;
24          private bool isRefreshing = false;          private bool isRefreshing = false;
25          private bool isAutoRefreshing = false;          private bool isAutoRefreshing = false;
26          private bool isAttachingToProcess = false;          private bool isAttachingToProcess = false;
# Line 160  namespace RomCheater.Docking Line 162  namespace RomCheater.Docking
162              ImageList small_image_list = new ImageList();              ImageList small_image_list = new ImageList();
163              ImageList large_image_list = new ImageList();              ImageList large_image_list = new ImageList();
164    
165              int small_width = 32;              int small_width = 24;
166              int large_width = 48;              int large_width = 32;
167    
168              small_image_list.ImageSize = new Size(small_width, small_width);              small_image_list.ImageSize = new Size(small_width, small_width);
169              large_image_list.ImageSize = new Size(large_width, large_width);              large_image_list.ImageSize = new Size(large_width, large_width);
# Line 243  namespace RomCheater.Docking Line 245  namespace RomCheater.Docking
245          private void PIDSelector_Load(object sender, EventArgs e)          private void PIDSelector_Load(object sender, EventArgs e)
246          {          {
247              if (AcceptedPlugin == null || this.DesignMode) return;              if (AcceptedPlugin == null || this.DesignMode) return;
248                ProcessWatcherTimer.Interval = ProcessRefershInterval;
249              txtstatus_Pid.Text = "";              txtstatus_Pid.Text = "";
250              txtstatus_Filename.Text = "";              txtstatus_Filename.Text = "";
251              ResetViewButtonControls();              SetViewForProcessListView(View.LargeIcon);
             SetControlBackColor(btnList, KnownColor.ActiveCaption);  
             SetViewForProcessListView(View.List);  
252              this.RefreshList();              this.RefreshList();
253          }          }
254    
# Line 277  namespace RomCheater.Docking Line 278  namespace RomCheater.Docking
278    
279          private void ProcessWatcherTimer_Tick(object sender, EventArgs e)          private void ProcessWatcherTimer_Tick(object sender, EventArgs e)
280          {          {
281              if (isRefreshing || isAutoRefreshing) return;              if (isRefreshing || isAutoRefreshing || isUserInteracting) return;
282              //if (lstProcessList.Items.Count == 0) return;              //if (lstProcessList.Items.Count == 0) return;
283              isAutoRefreshing = true;              isAutoRefreshing = true;
284              int pid = this.ProcessPID;                        int pid = this.ProcessPID;          
# Line 322  namespace RomCheater.Docking Line 323  namespace RomCheater.Docking
323                  }                  }
324              }              }
325          }          }
326    
327    
328            private void lstProcessList_MouseMove(object sender, MouseEventArgs e)
329            {
330                isUserInteracting = true;
331            }
332    
333            private void lstProcessList_MouseLeave(object sender, EventArgs e)
334            {
335                isUserInteracting = false;
336            }
337      }      }
338  }  }
339    

Legend:
Removed from v.364  
changed lines
  Added in v.365

  ViewVC Help
Powered by ViewVC 1.1.22