/[RomCheater]/trunk/RomCheater.PluginFramework/Core/PluginBase.cs
ViewVC logotype

Diff of /trunk/RomCheater.PluginFramework/Core/PluginBase.cs

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

--- trunk/RomCheater.PluginFramework/Core/PluginBase.cs	2013/06/17 08:33:06	683
+++ trunk/RomCheater.PluginFramework/Core/PluginBase.cs	2013/06/17 08:52:54	684
@@ -35,6 +35,10 @@
         public void SetPEViewerData(IPEDData peData)
         {
             _peData = peData;
+            if (OnPEDataUpdated != null)
+            {
+                OnPEDataUpdated.Invoke(new PEViewerDataUpdatedEventArgs(this, peData));
+            }
         }
 
         private Process _AcceptedProcess;
@@ -42,6 +46,10 @@
         public void SetAcceptedProcess(Process proc)
         {
             _AcceptedProcess = proc;
+            if (OnSelectedProcessChanged != null)
+            {
+                OnSelectedProcessChanged.Invoke(new ProcessChangedEventArgs(this, proc.Id));
+            }
         }
 
         private IConfigPlugin _AcceptedConfig;
@@ -49,6 +57,10 @@
         public void SetAcceptedConfig(IConfigPlugin config)
         {
             _AcceptedConfig = config;
+            if (OnSelectedConfigChanged != null)
+            {
+                OnSelectedConfigChanged.Invoke(new ConfigChangedEventArgs(this, config));
+            }
         }
 
 
@@ -57,5 +69,9 @@
             SetAcceptedConfig(iapc.AcceptedPlugin);
             SetAcceptedProcess(iapc.AcceptedProcess);
         }
+
+        public event BaseEventHandler<PEViewerDataUpdatedEventArgs> OnPEDataUpdated;
+        public event BaseEventHandler<ProcessChangedEventArgs> OnSelectedProcessChanged;
+        public event BaseEventHandler<ConfigChangedEventArgs> OnSelectedConfigChanged;
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22