/[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

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

Legend:
Removed from v.318  
changed lines
  Added in v.378

  ViewVC Help
Powered by ViewVC 1.1.22