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

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

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

revision 196 by william, Thu May 31 05:52:41 2012 UTC revision 323 by william, Thu Jun 7 16:33:41 2012 UTC
# Line 26  namespace RomCheater.Docking Line 26  namespace RomCheater.Docking
26          public PIDSelector(int pid) : this() { this.ProcessPID = pid; }          public PIDSelector(int pid) : this() { this.ProcessPID = pid; }
27          [Obsolete("constructor PIDSelector(IConfigPlugin plugin, int pid) is not implemented", false)]          [Obsolete("constructor PIDSelector(IConfigPlugin plugin, int pid) is not implemented", false)]
28          public PIDSelector(IConfigPlugin plugin, int pid) : this(plugin) { this.ProcessPID = pid; }          public PIDSelector(IConfigPlugin plugin, int pid) : this(plugin) { this.ProcessPID = pid; }
29            
30          #region IAcceptsProcessPID          #region IAcceptsProcessPID
31          public int ProcessPID { get; set; }          public int ProcessPID { get; set; }
32          #endregion          #endregion
# Line 34  namespace RomCheater.Docking Line 34  namespace RomCheater.Docking
34          public IConfigPlugin AcceptedPlugin { get; set; }          public IConfigPlugin AcceptedPlugin { get; set; }
35          #endregion          #endregion
36          #region IAcceptsChangedProcess members          #region IAcceptsChangedProcess members
37          public BaseEventHandler<ProcessChangedEventArgs> OnSelectedProcessChanged { get; set; }          public event BaseEventHandler<ProcessChangedEventArgs> OnSelectedProcessChanged;
38          #endregion          #endregion
39                    
40    
# Line 67  namespace RomCheater.Docking Line 67  namespace RomCheater.Docking
67          private void btnTile_Click(object sender, EventArgs e) { this.lstProcessList.View = View.Tile; }          private void btnTile_Click(object sender, EventArgs e) { this.lstProcessList.View = View.Tile; }
68    
69          private void PerformListViewItemSelect(ListViewItem li)          private void PerformListViewItemSelect(ListViewItem li)
70          {          {            
71              this.ProcessPID = Convert.ToInt32(li.SubItems[1].Text);              this.ProcessPID = Convert.ToInt32(li.SubItems[1].Text);
             //this.Close();  
             if (this.OnSelectedProcessChanged != null)  
             {  
                 this.OnSelectedProcessChanged(new ProcessChangedEventArgs(this.ProcessPID));  
             }  
72              Process SelectedProcess = Process.GetProcessById(this.ProcessPID);              Process SelectedProcess = Process.GetProcessById(this.ProcessPID);
73              logger.Debug.WriteLine("Using Process: ({0} : {1})", SelectedProcess.Id, SelectedProcess.ProcessName);              logger.Debug.WriteLine("Using Process: ({0} : {1})", SelectedProcess.Id, SelectedProcess.ProcessName);
74                //this.Close();
75                if (OnSelectedProcessChanged != null)
76                    OnSelectedProcessChanged(new ProcessChangedEventArgs(this, this.ProcessPID));          
77          }          }
78          private void btnOK_Click(object sender, EventArgs e)          private void btnOK_Click(object sender, EventArgs e)
79          {          {

Legend:
Removed from v.196  
changed lines
  Added in v.323

  ViewVC Help
Powered by ViewVC 1.1.22