/[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 20:32:10	725
+++ trunk/RomCheater.RVAScratchPad/Form1.cs	2013/06/18 20:37:57	726
@@ -29,6 +29,10 @@
         private FloatingLogWindow m_LogWindow = new FloatingLogWindow();
         private FloatingWebBrowser m_wb = new FloatingWebBrowser();
 
+        public IWebBrowserProvider WebBrowserProvider
+        {
+            get { return new WebBrowserProvider(m_wb); }
+        }
         #region LogWriterSupport
         static LogWriter _LoggerInstance;
         static LogWriter LoggerInstance
@@ -78,12 +82,19 @@
                 ConfigPlugin = loader.GetPluginByGuid<IConfigPlugin>(config.ID.ToString());
             }
 
+            // update the Config plugin's reference to the webbrowswer
+            ConfigPlugin.WebBrowserProvider = this.WebBrowserProvider;
+
             SettingsSubscriber.SetValue("LastConfigPlugin", ConfigPlugin.ToString());
 
             var scratchpad = PluginCollection.GetPluginByName(PluginNames.ScratchPadPlugin);
             var rvacalc = PluginCollection.GetPluginByName(PluginNames.RVACalculatorPlugin);            
             ScratchPadPlugin = loader.GetPluginByGuid<IUserControlPlugin>(scratchpad.ID.ToString());
             RVACalcPlugin = loader.GetPluginByGuid<IUserControlPlugin>(rvacalc.ID.ToString());
+
+            // update config of each plugin
+            ScratchPadPlugin.SetAcceptedConfig(ConfigPlugin);
+            RVACalcPlugin.SetAcceptedConfig(ConfigPlugin);
         }
 
 

 

  ViewVC Help
Powered by ViewVC 1.1.22