/[RomCheater]/trunk/RomCheater/Main.cs
ViewVC logotype

Diff of /trunk/RomCheater/Main.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 438 by william, Tue May 28 18:22:07 2013 UTC revision 439 by william, Tue May 28 18:39:39 2013 UTC
# Line 49  namespace RomCheater Line 49  namespace RomCheater
49          private FloatingMemorySearcher m_memsearcher = new FloatingMemorySearcher();          private FloatingMemorySearcher m_memsearcher = new FloatingMemorySearcher();
50          private FloatingPEViewer m_peviewer = new FloatingPEViewer();          private FloatingPEViewer m_peviewer = new FloatingPEViewer();
51          private FloatingRVACalculator m_rvacalc = new FloatingRVACalculator();          private FloatingRVACalculator m_rvacalc = new FloatingRVACalculator();
52    
53            private FloatingUserControlDock m_ucd = new FloatingUserControlDock();
54    
55          //private bool log_window_expanded = false;          //private bool log_window_expanded = false;
56          //private double log_window_splitter_default_position = 1.4045;          //private double log_window_splitter_default_position = 1.4045;
57          PluginLoader loader = null;          PluginLoader loader = null;
# Line 139  namespace RomCheater Line 142  namespace RomCheater
142              if (persistString == typeof(FloatingMemorySearcher).ToString()) { return m_memsearcher; }              if (persistString == typeof(FloatingMemorySearcher).ToString()) { return m_memsearcher; }
143              if (persistString == typeof(FloatingPEViewer).ToString()) { return m_peviewer; }              if (persistString == typeof(FloatingPEViewer).ToString()) { return m_peviewer; }
144              if (persistString == typeof(FloatingRVACalculator).ToString()) { return m_rvacalc; }              if (persistString == typeof(FloatingRVACalculator).ToString()) { return m_rvacalc; }
145                if (persistString == typeof(FloatingUserControlDock).ToString()) { return m_ucd; }
146              else { return null; }              else { return null; }
147          }          }
148          public void SetupDocks()          public void SetupDocks()
# Line 155  namespace RomCheater Line 159  namespace RomCheater
159              m_peviewer = new FloatingPEViewer();              m_peviewer = new FloatingPEViewer();
160              m_peviewer.OnPEDataUpdated += new BaseEventHandler<PEViewerDataUpdatedEventArgs>(OnPEDataUpdated);              m_peviewer.OnPEDataUpdated += new BaseEventHandler<PEViewerDataUpdatedEventArgs>(OnPEDataUpdated);
161              m_rvacalc = new FloatingRVACalculator();              m_rvacalc = new FloatingRVACalculator();
162                m_ucd = new FloatingUserControlDock();
163              m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);              m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);
164          }          }
165          #region SetupDockWindowHandler support          #region SetupDockWindowHandler support
# Line 168  namespace RomCheater Line 173  namespace RomCheater
173              SetupMemorySearchWindowHandler();              SetupMemorySearchWindowHandler();
174              SetupPEViewerWindowHandler();              SetupPEViewerWindowHandler();
175              SetupRVACalculatorWindowHandler();              SetupRVACalculatorWindowHandler();
176                SetupUserControlDockWindowHandler();
177          }          }
178          private void SetupLogWindowHandler()          private void SetupLogWindowHandler()
179          {          {
# Line 230  namespace RomCheater Line 236  namespace RomCheater
236              m_rvacalc.AcceptedPlugin = ConfigPlugin;              m_rvacalc.AcceptedPlugin = ConfigPlugin;
237              m_rvacalc.Activate();              m_rvacalc.Activate();
238          }          }
239            private void SetupUserControlDockWindowHandler()
240            {
241                if (m_ucd == null) return;
242                m_ucd.Shown += new EventHandler(AddDockToWindowList);
243                m_ucd.FormClosed += new FormClosedEventHandler(RemoveDockFromWindowList);
244                m_ucd.Activate();
245            }
246          #endregion          #endregion
247          public void ShowDocks()          public void ShowDocks()
248          {          {
# Line 248  namespace RomCheater Line 261  namespace RomCheater
261              ShowRVACalculator();              ShowRVACalculator();
262              SetupRVACalculatorWindowHandler();              SetupRVACalculatorWindowHandler();
263    
264    
265                ShowUserControlDock();
266                SetupUserControlDockWindowHandler();
267    
268              ShowMemorySearch();              ShowMemorySearch();
269              SetupMemorySearchWindowHandler();              SetupMemorySearchWindowHandler();
270              ShowPEViewer();              ShowPEViewer();
271              SetupPEViewerWindowHandler();              SetupPEViewerWindowHandler();
272                
273              
274          }          }
275          public void ShowLogWindow()          public void ShowLogWindow()
276          {          {
# Line 316  namespace RomCheater Line 334  namespace RomCheater
334              m_rvacalc.AcceptedProcess = SelectedProcess;              m_rvacalc.AcceptedProcess = SelectedProcess;
335              m_rvacalc.Show(dockPanel, DockState.DockRightAutoHide);              m_rvacalc.Show(dockPanel, DockState.DockRightAutoHide);
336          }          }
337            public void ShowUserControlDock()
338            {
339                load_plugins_silent();
340                m_ucd = new FloatingUserControlDock(UserControlPlugins);
341                m_ucd.Show(dockPanel, DockState.DockRightAutoHide);
342            }
343          #endregion          #endregion
344    
345    
# Line 545  namespace RomCheater Line 569  namespace RomCheater
569          private void mnuItemShowRVACalculator_Click(object sender, EventArgs e)          private void mnuItemShowRVACalculator_Click(object sender, EventArgs e)
570          {          {
571              ShowRVACalculator();              ShowRVACalculator();
572            }
573    
574            private void mnuItemShowUserControlDock_Click(object sender, EventArgs e)
575            {
576                ShowUserControlDock();
577          }                  }        
578      }      }
579  }  }

Legend:
Removed from v.438  
changed lines
  Added in v.439

  ViewVC Help
Powered by ViewVC 1.1.22