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

Comparing trunk/RomCheater/Main.cs (file contents):
Revision 195 by william, Mon May 28 09:37:16 2012 UTC vs.
Revision 196 by william, Thu May 31 05:52:41 2012 UTC

# Line 18 | Line 18 | using WeifenLuo.WinFormsUI.Docking;
18   using RomCheater.Docking;
19   using System.IO;
20   using Sojaner.MemoryScanner;
21 + using RomCheater.PluginFramework.Events;
22  
23   namespace RomCheater
24   {
25      public partial class Main : Form
26      {
27          private bool m_bSaveLayout = true;
28 <        private Process SelectedProcess = null;
28 >        private Process SelectedProcess = null;        
29          private DeserializeDockContent m_deserializeDockContent;
30          private FloatingLogWindow m_LogWindow = new FloatingLogWindow();
31          private FloatingAboutBox m_AboutBox = new FloatingAboutBox();
32          private FloatingRamDumperDialog m_RamDump = new FloatingRamDumperDialog();
33          private PIDSelector m_PIDSelector = new PIDSelector();
34 +        private FloatingMemoryView m_memoryview = new FloatingMemoryView();
35          //private bool log_window_expanded = false;
36          //private double log_window_splitter_default_position = 1.4045;
37          PluginLoader loader = null;
# Line 48 | Line 50 | namespace RomCheater
50          #endregion
51  
52  
53 <        private void OnProcessChanged(object sender, ProcessChangedEventArgs e)
53 >        private void OnProcessChanged(ProcessChangedEventArgs e)
54          {
55              SelectedProcess = Process.GetProcessById(e.ProcessID);
56              m_RamDump.AcceptedProcess = SelectedProcess;
57 +            m_RamDump.AcceptedPlugin = this.ConfigPlugin;
58 +
59 +            m_memoryview.AcceptedProcess = SelectedProcess;
60 +            m_memoryview.AcceptedPlugin = this.ConfigPlugin;
61          }
62  
63          #region Dock Support
# Line 73 | Line 79 | namespace RomCheater
79              {
80                  return m_PIDSelector;
81              }
82 +            if (persistString == typeof(FloatingMemoryView).ToString())
83 +            {
84 +                return m_memoryview;
85 +            }
86              else
87              {
88                  // not sure if this is appropriate
# Line 85 | Line 95 | namespace RomCheater
95              m_AboutBox = new FloatingAboutBox();
96              m_RamDump = new FloatingRamDumperDialog();
97              m_PIDSelector = new PIDSelector();
98 <            m_PIDSelector.OnSelectedProcessChanged += new EventHandler<ProcessChangedEventArgs>(OnProcessChanged);
98 >            m_PIDSelector.OnSelectedProcessChanged += new BaseEventHandler<ProcessChangedEventArgs>(OnProcessChanged);
99 >            m_memoryview = new FloatingMemoryView();
100              m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);
101          }
102          public void ShowDocks()
# Line 93 | Line 104 | namespace RomCheater
104              ShowLogWindow();
105              //ShowAboutBox();
106              ShowRamDump();
107 +            ShowMemoryView();
108              ShowPidSelector();
109          }
110          public void ShowLogWindow()
# Line 106 | Line 118 | namespace RomCheater
118          public void ShowRamDump()
119          {
120              m_RamDump = new FloatingRamDumperDialog(ConfigPlugin);
121 <            m_RamDump.Show(dockPanel);
122 <            
121 >            m_RamDump.Show(dockPanel);            
122 >        }
123 >        public void ShowMemoryView()
124 >        {
125 >            m_memoryview = new FloatingMemoryView(ConfigPlugin);
126 >            m_memoryview.Show(dockPanel);
127          }
128          public void ShowPidSelector()
129          {
130              //List<Process> procs = ConfigPlugin.ValidProcessesForPlugin;
131              m_PIDSelector = new PIDSelector(ConfigPlugin);
132 <            m_PIDSelector.OnSelectedProcessChanged += new EventHandler<ProcessChangedEventArgs>(OnProcessChanged);
132 >            m_PIDSelector.OnSelectedProcessChanged += new BaseEventHandler<ProcessChangedEventArgs>(OnProcessChanged);
133              m_PIDSelector.Show(dockPanel);
134          }
135          #endregion

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines