ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater/Main.cs
(Generate patch)

Comparing trunk/RomCheater/Main.cs (file contents):
Revision 150 by william, Sun May 27 23:33:54 2012 UTC vs.
Revision 151 by william, Mon May 28 00:17:16 2012 UTC

--- trunk/RomCheater/Main.cs	2012/05/27 23:59:22	150
+++ trunk/RomCheater/Main.cs	2012/05/28 00:17:16	151
@@ -20,6 +20,7 @@ namespace RomCheater
 {
     public partial class Main : Form
     {
+        private Process Proc = new Process();
         private DeserializeDockContent m_deserializeDockContent;
         private FloatingLogWindow m_LogWindow = new FloatingLogWindow();
         private FloatingAboutBox m_AboutBox = new FloatingAboutBox();
@@ -43,6 +44,11 @@ namespace RomCheater
         #endregion
 
 
+        private void OnProcessChanged(object sender, ProcessChangedEventArgs e)
+        {
+            Proc = Process.GetProcessById(e.ProcessID);
+        }
+
         #region Dock Support
         private IDockContent GetContentFromPersistString(string persistString)
         {
@@ -70,6 +76,7 @@ namespace RomCheater
             m_AboutBox = new FloatingAboutBox();
             m_RamDump = new FloatingRamDumperDialog();
             m_PIDSelector = new PIDSelector();
+            m_PIDSelector.OnSelectedProcessChanged += new EventHandler<ProcessChangedEventArgs>(OnProcessChanged);
             m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);
         }
         public void ShowDocks()
@@ -94,6 +101,7 @@ namespace RomCheater
         {
             //List<Process> procs = ConfigPlugin.ValidProcessesForPlugin;
             m_PIDSelector = new PIDSelector(ConfigPlugin);
+            m_PIDSelector.OnSelectedProcessChanged += new EventHandler<ProcessChangedEventArgs>(OnProcessChanged);
             m_PIDSelector.Show(dockPanel);
         }
         #endregion