--- trunk/RomCheater/Docking/FloatingPEViewer.cs 2012/06/05 17:57:37 318 +++ trunk/RomCheater/Docking/FloatingPEViewer.cs 2012/06/10 00:47:58 357 @@ -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, IAcceptsProcess, - 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 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 OnPEDataUpdated; + #endregion int MemoryRangeStart { get; set; } uint MemoryRangeSize { get; set; } @@ -57,10 +61,13 @@ if (process != null) { string filename = process.MainModule.FileName; - //string filename = @"c:\Windows\notepad.exe"; - PEReader peReader = new PEReader(filename); - peprops.SelectedObject = peReader.GetData; + //string filename = @"c:\Windows\notepad.exe"; + IPEDData peData = PEDataWrapper.GetPEData((IAcceptsProcessAndConfig)this); + peprops.SelectedObject = peData; peprops.PropertySort = PropertySort.NoSort; + if (OnPEDataUpdated != null) + if (peData != null) + OnPEDataUpdated(new PEViewerDataUpdatedEvent(this, peData)); } else {