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

Diff of /trunk/RomCheater/Main.cs

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

revision 86 by william, Wed May 9 19:41:06 2012 UTC revision 87 by william, Wed May 9 19:51:42 2012 UTC
# Line 11  using RomCheater.Properties; Line 11  using RomCheater.Properties;
11  using RomCheater.UserSettingsSupport;  using RomCheater.UserSettingsSupport;
12  using RomCheater.PluginFramework.Core;  using RomCheater.PluginFramework.Core;
13  using System.Diagnostics;  using System.Diagnostics;
14    using RomCheater.PluginFramework.Interfaces;
15    
16  namespace RomCheater  namespace RomCheater
17  {  {
18      public partial class Main : Form      public partial class Main : Form
19      {      {
20          PluginLoader loader = null;          PluginLoader loader = null;
21            IConfigPlugin ConfigPlugin = null;
22            IInputPlugin InputPlugin = null;
23            IWindowPlugin WindowPlugin = null;
24          static Main()          static Main()
25          {          {
26              SettingSubscriber.AddSubscriber(Settings.Default);              SettingSubscriber.AddSubscriber(Settings.Default);
# Line 38  namespace RomCheater Line 42  namespace RomCheater
42              load_loggerflags();              load_loggerflags();
43              LoggerInstance = logwriter;              LoggerInstance = logwriter;
44              LoggerInstance.CreateNewLog(false);              LoggerInstance.CreateNewLog(false);
45                load_plugins();
46          }          }
47    
48          private void load_loggerflags()          private void load_loggerflags()
49          {          {
50              logger.SetLoggingFlags((loggerflags)Logging.Properties.Settings.Default.LoggingFlags);              logger.SetLoggingFlags((loggerflags)Logging.Properties.Settings.Default.LoggingFlags);
51          }          }
52            private void load_plugins()
53            {
54                loader = new PluginLoader();
55                loader.LoadPlugins();
56    
57                ConfigPlugin = loader.GetConfigPlugin(RomCheater.Properties.Settings.Default.LastConfigPlugin);
58                if (ConfigPlugin != null)
59                    logger.Info.WriteLine("Loaded Config Plugin: {0}", ConfigPlugin.ToString());
60                InputPlugin = loader.GetInputPlugin(RomCheater.Properties.Settings.Default.LastInputPlugin);
61                if (InputPlugin != null)
62                    logger.Info.WriteLine("Loaded Input Plugin: {0}", InputPlugin.ToString());
63                WindowPlugin = loader.GetWindowPlugin(RomCheater.Properties.Settings.Default.LastWindowPlugin);
64                if (WindowPlugin != null)
65                    logger.Info.WriteLine("Loaded Window Plugin: {0}", WindowPlugin.ToString());
66    
67            }
68    
69          private void mnuItemExit_Click(object sender, EventArgs e)          private void mnuItemExit_Click(object sender, EventArgs e)
70          {          {
# Line 56  namespace RomCheater Line 77  namespace RomCheater
77          }          }
78    
79          private void Main_Load(object sender, EventArgs e)          private void Main_Load(object sender, EventArgs e)
80          {          {        
             loader = new PluginLoader();  
             loader.LoadPlugins();              
81          }          }
82    
83          private void mnuItemConfig_Click(object sender, EventArgs e)          private void mnuItemConfig_Click(object sender, EventArgs e)

Legend:
Removed from v.86  
changed lines
  Added in v.87

  ViewVC Help
Powered by ViewVC 1.1.22