/[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	2012/06/05 15:40:48	317
+++ trunk/RomCheater/Main.cs	2012/06/05 17:57:37	318
@@ -34,6 +34,7 @@
         private FloatingMemoryView m_memoryview = new FloatingMemoryView();
         private FloatingDataTypeConverter m_typeconverter = new FloatingDataTypeConverter();
         private FloatingMemorySearcher m_memsearcher = new FloatingMemorySearcher();
+        private FloatingPEViewer m_peviewer = new FloatingPEViewer();
         //private bool log_window_expanded = false;
         //private double log_window_splitter_default_position = 1.4045;
         PluginLoader loader = null;
@@ -71,6 +72,10 @@
             m_memsearcher.AcceptedPlugin = this.ConfigPlugin;
             m_memsearcher.AcceptedProcess = SelectedProcess;
             m_memsearcher.OnBrowseMemoryRegion += new BaseEventHandler<BrowseMemoryRegionEvent>(OnBrowseMemoryRegion);
+
+            m_peviewer.AcceptedPlugin = this.ConfigPlugin;
+            m_peviewer.AcceptedProcess = SelectedProcess;
+
         }
         private void OnBrowseMemoryRegion(BrowseMemoryRegionEvent e)
         {
@@ -110,6 +115,7 @@
             if (persistString == typeof(FloatingMemoryView).ToString()) { return m_memoryview; }
             if (persistString == typeof(FloatingDataTypeConverter).ToString()) { return m_typeconverter; }
             if (persistString == typeof(FloatingMemorySearcher).ToString()) { return m_memsearcher; }
+            if (persistString == typeof(FloatingPEViewer).ToString()) { return m_peviewer; }
             else { return null; }
         }
         public void SetupDocks()
@@ -123,6 +129,7 @@
             m_typeconverter = new FloatingDataTypeConverter();
             m_memsearcher = new FloatingMemorySearcher();
             m_memsearcher.OnBrowseMemoryRegion += new BaseEventHandler<BrowseMemoryRegionEvent>(OnBrowseMemoryRegion);
+            m_peviewer = new FloatingPEViewer();
             m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);
         }
         #region SetupDockWindowHandler support
@@ -134,6 +141,7 @@
             SetupPIDSelectorWindowHandler();
             SetupDataTypeConverterWindowHandler();
             SetupMemorySearchWindowHandler();
+            SetupPEViewerWindowHandler();
         }
         private void SetupLogWindowHandler()
         {
@@ -177,6 +185,13 @@
             m_memsearcher.FormClosed += new FormClosedEventHandler(RemoveDockFromWindowList);
             m_memsearcher.Activate();
         }
+        private void SetupPEViewerWindowHandler()
+        {
+            if (m_peviewer == null) return;
+            m_peviewer.Shown += new EventHandler(AddDockToWindowList);
+            m_peviewer.FormClosed += new FormClosedEventHandler(RemoveDockFromWindowList);
+            m_peviewer.Activate();
+        }
         #endregion
         public void ShowDocks()
         {
@@ -193,6 +208,8 @@
             SetupDataTypeConverterWindowHandler();
             ShowMemorySearch();
             SetupMemorySearchWindowHandler();
+            ShowPEViewer();
+            SetupPEViewerWindowHandler();
         }
         public void ShowLogWindow()
         {
@@ -241,7 +258,13 @@
             m_memsearcher.OnBrowseMemoryRegion += new BaseEventHandler<BrowseMemoryRegionEvent>(OnBrowseMemoryRegion);
             m_memsearcher.Show(dockPanel);
         }
-
+        public void ShowPEViewer()
+        {
+            load_plugins();
+            m_peviewer = new FloatingPEViewer(ConfigPlugin);
+            m_peviewer.AcceptedProcess = SelectedProcess;
+            m_peviewer.Show(dockPanel);
+        }
        
         #endregion
 
@@ -450,6 +473,12 @@
             d = t.Day;
             ushort v4 = (ushort)(y | m | d);
         }
+
+        private void mnuItemShowPEViewer_Click(object sender, EventArgs e)
+        {
+            ShowPEViewer();
+        }
+
         
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22