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 438 by william, Tue May 28 18:22:07 2013 UTC vs.
Revision 439 by william, Tue May 28 18:39:39 2013 UTC

# Line 49 | Line 49 | namespace RomCheater
49          private FloatingMemorySearcher m_memsearcher = new FloatingMemorySearcher();
50          private FloatingPEViewer m_peviewer = new FloatingPEViewer();
51          private FloatingRVACalculator m_rvacalc = new FloatingRVACalculator();
52 +
53 +        private FloatingUserControlDock m_ucd = new FloatingUserControlDock();
54 +
55          //private bool log_window_expanded = false;
56          //private double log_window_splitter_default_position = 1.4045;
57          PluginLoader loader = null;
# Line 139 | Line 142 | namespace RomCheater
142              if (persistString == typeof(FloatingMemorySearcher).ToString()) { return m_memsearcher; }
143              if (persistString == typeof(FloatingPEViewer).ToString()) { return m_peviewer; }
144              if (persistString == typeof(FloatingRVACalculator).ToString()) { return m_rvacalc; }
145 +            if (persistString == typeof(FloatingUserControlDock).ToString()) { return m_ucd; }
146              else { return null; }
147          }
148          public void SetupDocks()
# Line 155 | Line 159 | namespace RomCheater
159              m_peviewer = new FloatingPEViewer();
160              m_peviewer.OnPEDataUpdated += new BaseEventHandler<PEViewerDataUpdatedEventArgs>(OnPEDataUpdated);
161              m_rvacalc = new FloatingRVACalculator();
162 +            m_ucd = new FloatingUserControlDock();
163              m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);
164          }
165          #region SetupDockWindowHandler support
# Line 168 | Line 173 | namespace RomCheater
173              SetupMemorySearchWindowHandler();
174              SetupPEViewerWindowHandler();
175              SetupRVACalculatorWindowHandler();
176 +            SetupUserControlDockWindowHandler();
177          }
178          private void SetupLogWindowHandler()
179          {
# Line 230 | Line 236 | namespace RomCheater
236              m_rvacalc.AcceptedPlugin = ConfigPlugin;
237              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
247          public void ShowDocks()
248          {
# Line 248 | Line 261 | namespace RomCheater
261              ShowRVACalculator();
262              SetupRVACalculatorWindowHandler();
263  
264 +
265 +            ShowUserControlDock();
266 +            SetupUserControlDockWindowHandler();
267 +
268              ShowMemorySearch();
269              SetupMemorySearchWindowHandler();
270              ShowPEViewer();
271              SetupPEViewerWindowHandler();
272 <            
272 >
273 >          
274          }
275          public void ShowLogWindow()
276          {
# Line 316 | Line 334 | namespace RomCheater
334              m_rvacalc.AcceptedProcess = SelectedProcess;
335              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
344  
345  
# Line 545 | Line 569 | namespace RomCheater
569          private void mnuItemShowRVACalculator_Click(object sender, EventArgs e)
570          {
571              ShowRVACalculator();
572 +        }
573 +
574 +        private void mnuItemShowUserControlDock_Click(object sender, EventArgs e)
575 +        {
576 +            ShowUserControlDock();
577          }        
578      }
579   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines