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

Diff of /trunk/RomCheater/Main.cs

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

--- trunk/RomCheater/Main.cs	2013/05/28 18:22:07	438
+++ trunk/RomCheater/Main.cs	2013/05/28 18:39:39	439
@@ -49,6 +49,9 @@
         private FloatingMemorySearcher m_memsearcher = new FloatingMemorySearcher();
         private FloatingPEViewer m_peviewer = new FloatingPEViewer();
         private FloatingRVACalculator m_rvacalc = new FloatingRVACalculator();
+
+        private FloatingUserControlDock m_ucd = new FloatingUserControlDock();
+
         //private bool log_window_expanded = false;
         //private double log_window_splitter_default_position = 1.4045;
         PluginLoader loader = null;
@@ -139,6 +142,7 @@
             if (persistString == typeof(FloatingMemorySearcher).ToString()) { return m_memsearcher; }
             if (persistString == typeof(FloatingPEViewer).ToString()) { return m_peviewer; }
             if (persistString == typeof(FloatingRVACalculator).ToString()) { return m_rvacalc; }
+            if (persistString == typeof(FloatingUserControlDock).ToString()) { return m_ucd; }
             else { return null; }
         }
         public void SetupDocks()
@@ -155,6 +159,7 @@
             m_peviewer = new FloatingPEViewer();
             m_peviewer.OnPEDataUpdated += new BaseEventHandler<PEViewerDataUpdatedEventArgs>(OnPEDataUpdated);
             m_rvacalc = new FloatingRVACalculator();
+            m_ucd = new FloatingUserControlDock();
             m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);
         }
         #region SetupDockWindowHandler support
@@ -168,6 +173,7 @@
             SetupMemorySearchWindowHandler();
             SetupPEViewerWindowHandler();
             SetupRVACalculatorWindowHandler();
+            SetupUserControlDockWindowHandler();
         }
         private void SetupLogWindowHandler()
         {
@@ -230,6 +236,13 @@
             m_rvacalc.AcceptedPlugin = ConfigPlugin;
             m_rvacalc.Activate();
         }
+        private void SetupUserControlDockWindowHandler()
+        {
+            if (m_ucd == null) return;
+            m_ucd.Shown += new EventHandler(AddDockToWindowList);
+            m_ucd.FormClosed += new FormClosedEventHandler(RemoveDockFromWindowList);
+            m_ucd.Activate();
+        }
         #endregion
         public void ShowDocks()
         {
@@ -248,11 +261,16 @@
             ShowRVACalculator();
             SetupRVACalculatorWindowHandler();
 
+
+            ShowUserControlDock();
+            SetupUserControlDockWindowHandler();
+
             ShowMemorySearch();
             SetupMemorySearchWindowHandler();
             ShowPEViewer();
             SetupPEViewerWindowHandler();
-            
+
+          
         }
         public void ShowLogWindow()
         {
@@ -316,6 +334,12 @@
             m_rvacalc.AcceptedProcess = SelectedProcess;
             m_rvacalc.Show(dockPanel, DockState.DockRightAutoHide);
         }
+        public void ShowUserControlDock()
+        {
+            load_plugins_silent();
+            m_ucd = new FloatingUserControlDock(UserControlPlugins);
+            m_ucd.Show(dockPanel, DockState.DockRightAutoHide);
+        }
         #endregion
 
 
@@ -545,6 +569,11 @@
         private void mnuItemShowRVACalculator_Click(object sender, EventArgs e)
         {
             ShowRVACalculator();
+        }
+
+        private void mnuItemShowUserControlDock_Click(object sender, EventArgs e)
+        {
+            ShowUserControlDock();
         }        
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22