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

Annotation of /trunk/RomCheater/Main.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 86 - (hide annotations) (download)
Wed May 9 19:41:06 2012 UTC (9 years, 2 months ago) by william
File size: 2060 byte(s)
+ add support to set plugins in user settings

1 william 5 using System;
2     using System.Collections.Generic;
3     using System.ComponentModel;
4     using System.Data;
5     using System.Drawing;
6     using System.Linq;
7     using System.Text;
8     using System.Windows.Forms;
9 william 17 using RomCheater.Logging;
10 william 34 using RomCheater.Properties;
11     using RomCheater.UserSettingsSupport;
12 william 83 using RomCheater.PluginFramework.Core;
13 william 86 using System.Diagnostics;
14 william 5
15     namespace RomCheater
16     {
17 william 13 public partial class Main : Form
18 william 5 {
19 william 86 PluginLoader loader = null;
20 william 34 static Main()
21     {
22     SettingSubscriber.AddSubscriber(Settings.Default);
23     }
24 william 20 private const string t = "RomCheater";
25 william 17 #region LogWriterSupport
26     static LogWriter _LoggerInstance;
27     static LogWriter LoggerInstance
28     {
29     get { return _LoggerInstance; }
30     set { _LoggerInstance = value; }
31     }
32     #endregion
33    
34    
35 william 13 public Main()
36 william 5 {
37     InitializeComponent();
38 william 83 load_loggerflags();
39 william 17 LoggerInstance = logwriter;
40 william 23 LoggerInstance.CreateNewLog(false);
41 william 5 }
42 william 14
43 william 83 private void load_loggerflags()
44     {
45     logger.SetLoggingFlags((loggerflags)Logging.Properties.Settings.Default.LoggingFlags);
46     }
47    
48 william 14 private void mnuItemExit_Click(object sender, EventArgs e)
49     {
50     this.Close();
51     }
52 william 16
53     private void btnCopyLogToClipboard_Click(object sender, EventArgs e)
54     {
55    
56     }
57 william 17
58     private void Main_Load(object sender, EventArgs e)
59 william 83 {
60 william 86 loader = new PluginLoader();
61     loader.LoadPlugins();
62 william 17 }
63 william 63
64     private void mnuItemConfig_Click(object sender, EventArgs e)
65     {
66 william 86 RomCheaterConfigDialog dlg = new RomCheaterConfigDialog(loader);
67 william 63 dlg.ShowDialog();
68     }
69 william 69
70     private void mnuItemOpenProcess_Click(object sender, EventArgs e)
71     {
72 william 86 //List<Process> procs = loader.LoadedConfigPlugins[0].ValidProcessesForPlugin;
73 william 69 }
74 william 5 }
75     }

  ViewVC Help
Powered by ViewVC 1.1.22