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

--- trunk/RomCheater/Docking/PIDSelector.cs	2012/05/28 02:01:34	152
+++ trunk/RomCheater/Docking/PIDSelector.cs	2012/05/28 02:20:29	153
@@ -14,12 +14,12 @@
 
 namespace RomCheater.Docking
 {
-    public partial class PIDSelector : DockContent
+    public partial class PIDSelector : DockContent, IAcceptsPlugin<IConfigPlugin>
     {
         //private IConfigPlugin plugin = null;
         //bool isInError = false;
-        public PIDSelector() { InitializeComponent(); this.SelectedPid = -1; OnSelectedProcessChanged = null; }
-        public PIDSelector(IConfigPlugin plugin) : this() { this.ConfigPlugin = plugin; }
+        public PIDSelector() { InitializeComponent(); this.SelectedPid = -1; OnSelectedProcessChanged = null; this.AcceptedPlugin = null; }
+        public PIDSelector(IConfigPlugin plugin) : this() { this.AcceptedPlugin = plugin; }
         // unsued construtor (it's not implmented, may not be)
         [Obsolete("constructor PIDSelector(int pid) is not implemented", false)]
         public PIDSelector(int pid) : this() { this.SelectedPid = pid; }
@@ -29,7 +29,7 @@
         private int _SelectedPid;
         public int SelectedPid { get { return _SelectedPid; } set { _SelectedPid = value; } }
 
-        public IConfigPlugin ConfigPlugin { get; set; }
+        public IConfigPlugin AcceptedPlugin { get; set; }
 
         public EventHandler<ProcessChangedEventArgs> OnSelectedProcessChanged { get; set; }
         
@@ -48,7 +48,7 @@
         private void PreInitShow(DockPanel panel)
         {
             //if (panel == null) return;
-            if (!this.RefreshList()) { MessageBox.Show(string.Format("Could not find any Processes for plugin {0}.  Please start an instance of one.", ConfigPlugin.ToString())); }
+            if (!this.RefreshList()) { MessageBox.Show(string.Format("Could not find any Processes for plugin {0}.  Please start an instance of one.", AcceptedPlugin.ToString())); }
             else { if (panel == null) { base.Show(); } else { base.Show(panel); } }
         }
         //private DialogResult PreInitDialog(IWin32Window owner)
@@ -87,9 +87,9 @@
         private bool RefreshList()
         {
             lstProcessList.Items.Clear();
-            this.ConfigPlugin.Reload();
+            this.AcceptedPlugin.Reload();
             // create a selection of PCSX2 processes
-            List<ProcContainer> proc_list = ConfigPlugin.ValidProcessesForPlugin;
+            List<ProcContainer> proc_list = AcceptedPlugin.ValidProcessesForPlugin;
 
             if (!(proc_list.Count > 0)) { //MessageBox.Show("Could not find any PCSX2 Processes.  Please start an instance of one."); 
                 return false; }
@@ -172,7 +172,7 @@
 
         private void PIDSelector_Load(object sender, EventArgs e)
         {
-            if (ConfigPlugin == null || this.DesignMode) return;
+            if (AcceptedPlugin == null || this.DesignMode) return;
             btnRefresh.PerformClick();
         }
     }

 

  ViewVC Help
Powered by ViewVC 1.1.22