--- trunk/RomCheater/Docking/FloatingPEViewer.cs 2012/06/05 17:57:37 318 +++ trunk/RomCheater/Docking/FloatingPEViewer.cs 2012/06/08 04:03:02 347 @@ -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; } @@ -58,9 +62,13 @@ { string filename = process.MainModule.FileName; //string filename = @"c:\Windows\notepad.exe"; - PEReader peReader = new PEReader(filename); - peprops.SelectedObject = peReader.GetData; + PEReader peReader = new PEReader(filename, (IAcceptsProcessAndConfig)this); + PEReader.PEData peData = peReader.GetPEData; + peprops.SelectedObject = peData; peprops.PropertySort = PropertySort.NoSort; + if (OnPEDataUpdated != null) + if (peData != null) + OnPEDataUpdated(new PEViewerDataUpdatedEvent(this, peData)); } else {