/[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

revision 709 by william, Tue Jun 18 07:24:44 2013 UTC revision 712 by william, Tue Jun 18 08:38:20 2013 UTC
# Line 9  using RomCheater.Logging; Line 9  using RomCheater.Logging;
9  using RomCheater.Docking;  using RomCheater.Docking;
10  using WeifenLuo.WinFormsUI.Docking;  using WeifenLuo.WinFormsUI.Docking;
11  using System.IO;  using System.IO;
12    using RomCheater.PluginFramework.Core;
13    using RomCheater.Core;
14    
15  namespace RomCheater.RVAScratchPad  namespace RomCheater.RVAScratchPad
16  {  {
17      public partial class Form1 : Form      public partial class Form1 : Form
18      {      {
19          private bool m_bSaveLayout = true;          private bool m_bSaveLayout = true;
20            PluginLoader loader = null;
21            IConfigPlugin ConfigPlugin = null;
22    
23            IUserControlPlugin RVACalcPlugin = null;
24            IUserControlPlugin ScratchPadPlugin = null;
25    
26          private DeserializeDockContent m_deserializeDockContent;          private DeserializeDockContent m_deserializeDockContent;
27          private FloatingLogWindow m_LogWindow = new FloatingLogWindow();          private FloatingLogWindow m_LogWindow = new FloatingLogWindow();
28          private FloatingWebBrowser m_wb = new FloatingWebBrowser();          private FloatingWebBrowser m_wb = new FloatingWebBrowser();
# Line 52  namespace RomCheater.RVAScratchPad Line 60  namespace RomCheater.RVAScratchPad
60          private void load_plugins_silent() { load_plugins(true); }          private void load_plugins_silent() { load_plugins(true); }
61          private void load_plugins(bool silent)          private void load_plugins(bool silent)
62          {          {
63                loader = new PluginLoader();
64                loader.LoadPlugins(silent);
65    
66    
67                ConfigPlugin = loader.GetGenericConfigPlugin();
68                if (ConfigPlugin != null && !silent)
69                    logger.Info.WriteLine("Loaded Config Plugin: {0}", ConfigPlugin.ToString());
70    
71                //var UserControlPlugins = new List<IUserControlPlugin>(loader.LoadedUserControlPlugins);
72                //foreach (var userplugin in UserControlPlugins) { }
73    
74    
75                var config_guids = loader.GetKnownPluginGuids<IConfigPlugin>();
76                var input_guids = loader.GetKnownPluginGuids<IInputPlugin>();
77                var window_guids = loader.GetKnownPluginGuids<IWindowPlugin>();
78                var userplugin_guids = loader.GetKnownPluginGuids<IUserControlPlugin>();
79                var plugin1 = loader.GetPluginByName<IUserControlPlugin>("ScratchPad Plugin");
80                var plugin2 = loader.GetPluginByName<IUserControlPlugin>("RVA Calculator Plugin");
81    
82                
83    
84          }          }
85    
86    
# Line 103  namespace RomCheater.RVAScratchPad Line 132  namespace RomCheater.RVAScratchPad
132              if (m_LogWindow == null) return;              if (m_LogWindow == null) return;
133              //m_LogWindow.Shown += new EventHandler(AddDockToWindowList);              //m_LogWindow.Shown += new EventHandler(AddDockToWindowList);
134              //m_LogWindow.FormClosed += new FormClosedEventHandler(RemoveDockFromWindowList);              //m_LogWindow.FormClosed += new FormClosedEventHandler(RemoveDockFromWindowList);
135              //m_LogWindow.Activate();              m_LogWindow.Activate();
136          }          }
137          private void SetupWebBrowserWindowHandler()          private void SetupWebBrowserWindowHandler()
138          {          {
139              if (m_wb == null) return;              if (m_wb == null) return;
140              //m_wb.Shown += new EventHandler(AddDockToWindowList);              //m_wb.Shown += new EventHandler(AddDockToWindowList);
141              //m_wb.FormClosed += new FormClosedEventHandler(RemoveDockFromWindowList);              //m_wb.FormClosed += new FormClosedEventHandler(RemoveDockFromWindowList);
142              //m_msv.Activate();              //m_wb.Activate();
143          }          }
144          #endregion          #endregion
145          public void ShowDocks()          public void ShowDocks()
# Line 159  namespace RomCheater.RVAScratchPad Line 188  namespace RomCheater.RVAScratchPad
188          {          {
189              //dockPanel.SuspendLayout(true);              //dockPanel.SuspendLayout(true);
190              //ShowDocks();              //ShowDocks();
191              string configFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "DockPanel.config");              string configFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "RVAScratchPad-DockPanel.config");
192              if (File.Exists(configFile))              if (File.Exists(configFile))
193              {              {
194                  try                  try
# Line 184  namespace RomCheater.RVAScratchPad Line 213  namespace RomCheater.RVAScratchPad
213    
214              //dockPanel.ResumeLayout(true, true);              //dockPanel.ResumeLayout(true, true);
215          }          }
216    
217            private void mnuItemExit_Click(object sender, EventArgs e)
218            {
219                this.Close();
220            }
221      }      }
222  }  }

Legend:
Removed from v.709  
changed lines
  Added in v.712

  ViewVC Help
Powered by ViewVC 1.1.22