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

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

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

--- trunk/RomCheater/Docking/FloatingPEViewer.cs	2012/06/05 17:57:37	318
+++ trunk/RomCheater/Docking/FloatingPEViewer.cs	2012/06/07 16:33:41	323
@@ -14,15 +14,17 @@
 using RomCheater.PluginFramework.Interfaces;
 using System.Diagnostics;
 using Sojaner.MemoryScanner;
+using RomCheater.PluginFramework.Events;
 
 namespace RomCheater.Docking
 {
     public partial class FloatingPEViewer : DockContent,
         IAcceptsPlugin<IConfigPlugin>,
         IAcceptsProcess<Process>,
-        IAcceptsProcessAndConfig
+        IAcceptsProcessAndConfig,
+        IAcceptsPEData
     {
-        public FloatingPEViewer() { InitializeComponent(); this.AcceptedPlugin = null; this.AcceptedProcess = null; }
+        public FloatingPEViewer() { InitializeComponent(); this.AcceptedPlugin = null; this.AcceptedProcess = null; OnPEDataUpdated = null; }
         public FloatingPEViewer(IConfigPlugin config) : this() { this.AcceptedPlugin = config; }
         public FloatingPEViewer(IConfigPlugin config, Process process) : this() { this.AcceptedPlugin = config; this.AcceptedProcess = process; }
         #region IAcceptsProcess<Process> Members
@@ -33,7 +35,9 @@
         private IConfigPlugin _AcceptedPlugin;
         public IConfigPlugin AcceptedPlugin { get { return _AcceptedPlugin; } set { _AcceptedPlugin = value; UpdateAcceptedPlugin(value); } }
         #endregion
-
+        #region IAcceptsPEData Members
+        public event BaseEventHandler<PEViewerDataUpdatedEvent> OnPEDataUpdated;
+        #endregion
         int MemoryRangeStart { get; set; }
         uint MemoryRangeSize { get; set; }
 
@@ -59,8 +63,11 @@
                 string filename = process.MainModule.FileName;
                 //string filename = @"c:\Windows\notepad.exe";
                 PEReader peReader = new PEReader(filename);
-                peprops.SelectedObject = peReader.GetData;
+                PEReader.PEData peData = peReader.GetPEData;
+                peprops.SelectedObject = peData;
                 peprops.PropertySort = PropertySort.NoSort;
+                if (OnPEDataUpdated != null)
+                    OnPEDataUpdated(new PEViewerDataUpdatedEvent(this, peData));
             }
             else
             {

 

  ViewVC Help
Powered by ViewVC 1.1.22