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

Diff of /trunk/RomCheater/PIDSelector.cs

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

--- trunk/RomCheater/PIDSelector.cs	2012/05/09 20:52:20	88
+++ trunk/RomCheater/PIDSelector.cs	2012/05/10 09:03:13	100
@@ -33,12 +33,12 @@
         public new DialogResult ShowDialog(IWin32Window owner) { return this.PreInitDialog(owner); }
         private void PreInitShow(IWin32Window owner)
         {
-            if (!this.RefreshList()) { MessageBox.Show("Could not find any PCSX2 Processes.  Please start an instance of one."); }
+            if (!this.RefreshList()) { MessageBox.Show(string.Format("Could not find any Processes for plugin {0}.  Please start an instance of one.",plugin.ToString())); }
             else { if (owner == null) { base.Show(); } else { base.Show(owner); } }
         }
         private DialogResult PreInitDialog(IWin32Window owner)
         {
-            if (!this.RefreshList()) { MessageBox.Show("Could not find any PCSX2 Processes.  Please start an instance of one."); return DialogResult.Cancel; }
+            if (!this.RefreshList()) { MessageBox.Show(string.Format("Could not find any Processes for plugin {0}.  Please start an instance of one.", plugin.ToString())); return DialogResult.Cancel; }
             else { if (owner == null) { return base.ShowDialog(); } else { return base.ShowDialog(owner); } }
         }
         private void btnLargeIcon_Click(object sender, EventArgs e) { this.lstProcessList.View = View.LargeIcon; }
@@ -68,6 +68,7 @@
         private bool RefreshList()
         {
             lstProcessList.Items.Clear();
+            this.plugin.Reload();
             // create a selection of PCSX2 processes
             List<ProcContainer> proc_list = plugin.ValidProcessesForPlugin;
 
@@ -90,21 +91,21 @@
             large_image_list = new ImageList();
             ListViewItem item = new ListViewItem();
             // process
-            item.Text = p.ProcessInfo.MainModule.ModuleName;
+            item.Text = p.FileName;
             if (p.ProcessIcon != null)
             {
-                Bitmap small_image = ProcContainer.CreateIconFromProcess(p.ProcessInfo, 1);
-                Bitmap large_image = ProcContainer.CreateIconFromProcess(p.ProcessInfo, 2);
-                small_image_list.Images.Add(p.ProcessInfo.MainModule.FileName, ProcContainer.CreateIconFromProcess(p.ProcessInfo, 1));
+                Bitmap small_image = ProcContainer.CreateIconFromProcess(p, 1);
+                Bitmap large_image = ProcContainer.CreateIconFromProcess(p, 2);
+                small_image_list.Images.Add(p.FileName, ProcContainer.CreateIconFromProcess(p, 1));
                 small_image_list.ImageSize = new Size(small_image.Width, small_image.Height);
-                large_image_list.Images.Add(p.ProcessInfo.MainModule.FileName, ProcContainer.CreateIconFromProcess(p.ProcessInfo, 2));
+                large_image_list.Images.Add(p.ProcessInfo.MainModule.FileName, ProcContainer.CreateIconFromProcess(p, 2));
                 large_image_list.ImageSize = new Size(large_image.Width, large_image.Height);
-                item.ImageKey = p.ProcessInfo.MainModule.FileName;
+                item.ImageKey = p.FileName;
             }
             // pid
             item.SubItems.Add(p.ProcessInfo.Id.ToString());
             // FullPath
-            item.SubItems.Add(p.ProcessInfo.MainModule.FileName);
+            item.SubItems.Add(p.FileName);
             if (!items.Contains(item)) items.Add(item);
         }
     }

 

  ViewVC Help
Powered by ViewVC 1.1.22