ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater/Docking/FloatingPEViewer.cs
(Generate patch)

Comparing trunk/RomCheater/Docking/FloatingPEViewer.cs (file contents):
Revision 322 by william, Tue Jun 5 17:57:37 2012 UTC vs.
Revision 323 by william, Thu Jun 7 16:33:41 2012 UTC

# Line 14 | Line 14 | using WeifenLuo.WinFormsUI.Docking;
14   using RomCheater.PluginFramework.Interfaces;
15   using System.Diagnostics;
16   using Sojaner.MemoryScanner;
17 + using RomCheater.PluginFramework.Events;
18  
19   namespace RomCheater.Docking
20   {
21      public partial class FloatingPEViewer : DockContent,
22          IAcceptsPlugin<IConfigPlugin>,
23          IAcceptsProcess<Process>,
24 <        IAcceptsProcessAndConfig
24 >        IAcceptsProcessAndConfig,
25 >        IAcceptsPEData
26      {
27 <        public FloatingPEViewer() { InitializeComponent(); this.AcceptedPlugin = null; this.AcceptedProcess = null; }
27 >        public FloatingPEViewer() { InitializeComponent(); this.AcceptedPlugin = null; this.AcceptedProcess = null; OnPEDataUpdated = null; }
28          public FloatingPEViewer(IConfigPlugin config) : this() { this.AcceptedPlugin = config; }
29          public FloatingPEViewer(IConfigPlugin config, Process process) : this() { this.AcceptedPlugin = config; this.AcceptedProcess = process; }
30          #region IAcceptsProcess<Process> Members
# Line 33 | Line 35 | namespace RomCheater.Docking
35          private IConfigPlugin _AcceptedPlugin;
36          public IConfigPlugin AcceptedPlugin { get { return _AcceptedPlugin; } set { _AcceptedPlugin = value; UpdateAcceptedPlugin(value); } }
37          #endregion
38 <
38 >        #region IAcceptsPEData Members
39 >        public event BaseEventHandler<PEViewerDataUpdatedEvent> OnPEDataUpdated;
40 >        #endregion
41          int MemoryRangeStart { get; set; }
42          uint MemoryRangeSize { get; set; }
43  
# Line 59 | Line 63 | namespace RomCheater.Docking
63                  string filename = process.MainModule.FileName;
64                  //string filename = @"c:\Windows\notepad.exe";
65                  PEReader peReader = new PEReader(filename);
66 <                peprops.SelectedObject = peReader.GetData;
66 >                PEReader.PEData peData = peReader.GetPEData;
67 >                peprops.SelectedObject = peData;
68                  peprops.PropertySort = PropertySort.NoSort;
69 +                if (OnPEDataUpdated != null)
70 +                    OnPEDataUpdated(new PEViewerDataUpdatedEvent(this, peData));
71              }
72              else
73              {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines