/[RomCheater]/trunk/RomCheater.RVAScratchPad/Form1.cs
ViewVC logotype

Diff of /trunk/RomCheater.RVAScratchPad/Form1.cs

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

--- trunk/RomCheater.RVAScratchPad/Form1.cs	2013/06/18 10:59:36	716
+++ trunk/RomCheater.RVAScratchPad/Form1.cs	2013/06/18 11:27:53	717
@@ -41,7 +41,7 @@
         {
             InitializeComponent();
             load_loggerflags();
-            //SetupDocks();
+            SetupDocks();
             LoggerInstance = m_LogWindow.Logwriter;
             LoggerInstance.CreateNewLog(false);
             logger.ForceLog.Info.WriteLine("LoggingFlags = 0x{0:x4} ({1})", logger.GetLoggingFlags().Value, logger.GetLoggingFlags().Name);
@@ -73,40 +73,24 @@
 
 
         #region Dock Support
-        //void AddDockToWindowList(object sender, EventArgs e)
-        //{
-        //    DockContent dc;
-        //    TypeBinder.Bind(sender, out dc);
-        //    ToolStripMenuItem tsmi = new ToolStripMenuItem(dc.Text);
-        //    tsmi.Name = dc.Name;
-        //    tsmi.Tag = dc;
-        //    tsmi.Click += new EventHandler(tsmi_Click);
-        //    mnuWindows.DropDownItems.Add(tsmi);
-        //}
-        //void tsmi_Click(object sender, EventArgs e)
-        //{
-        //    ToolStripMenuItem tsmi;
-        //    TypeBinder.Bind(sender, out tsmi);
-        //    DockContent dc;
-        //    TypeBinder.Bind(tsmi.Tag, out dc);
-        //    dc.Activate();
-        //}
-        //void RemoveDockFromWindowList(object sender, FormClosedEventArgs e)
-        //{
-        //    DockContent dc;
-        //    TypeBinder.Bind(sender, out dc);
-        //    mnuWindows.DropDownItems.RemoveByKey(dc.Name);
-        //}
         private IDockContent GetContentFromPersistString(string persistString)
         {
             if (persistString == typeof(FloatingLogWindow).ToString()) { return m_LogWindow; }
             if (persistString == typeof(FloatingWebBrowser).ToString()) { return m_wb; }
-            else { return null; }
+            if (RVACalcPlugin != null) { if (persistString == RVACalcPlugin.IDockContentTypeName) { return RVACalcPlugin.DockContent; } }
+            if (ScratchPadPlugin != null) { if (persistString == ScratchPadPlugin.IDockContentTypeName) { return ScratchPadPlugin.DockContent; } }            
+            return null;
         }
         public void SetupDocks()
         {
             m_LogWindow = new FloatingLogWindow();
+            m_LogWindow.CloseButton = false;
+            m_LogWindow.CloseButtonVisible = false;
+
             m_wb = new FloatingWebBrowser();
+            m_wb.CloseButton = false;
+            m_wb.CloseButtonVisible = false;
+
             m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);
         }
         #region SetupDockWindowHandler support
@@ -118,13 +102,14 @@
         }
         private void SetupPluginWindowHandlers()
         {
-            //if (RVACalcPlugin != null)
-            //{
-                
-            //}
-            //if (ScratchPadPlugin != null)
-            //{
-            //}
+            if (RVACalcPlugin != null)
+            {
+                RVACalcPlugin.Activate();
+            }
+            if (ScratchPadPlugin != null)
+            {
+                ScratchPadPlugin.Activate();
+            }
         }
         private void SetupLogWindowHandler()
         {

 

  ViewVC Help
Powered by ViewVC 1.1.22