/[RomCheater]/trunk/RomCheater.CheatPlugin/CheatCodeDockContent.cs
ViewVC logotype

Contents of /trunk/RomCheater.CheatPlugin/CheatCodeDockContent.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 838 - (show annotations) (download)
Tue Sep 16 00:57:18 2014 UTC (6 years, 5 months ago) by william
File size: 2671 byte(s)
+ add an icon resource

1 #region Logging Defines
2 // include this any class or method that required logging, and comment-out what is not needed
3 #define LOGGING_ENABLED // this is only valid within the logger class
4 #region Enabled logging levels
5 #define LOGGING_ENABLE_INFO
6 #define LOGGING_ENABLE_WARN
7 #define LOGGING_ENABLE_DEBUG
8 #define LOGGING_ENABLE_VERBOSEDEBUG
9 #define LOGGING_ENABLE_ERROR
10 #define LOGGING_ENABLE_VERBOSEERROR
11 #define LOGGING_ENABLE_PROFILER
12 #endregion
13 #endregion
14
15 using System;
16 using System.Collections.Generic;
17 using System.ComponentModel;
18 using System.Data;
19 using System.Drawing;
20 using System.Linq;
21 using System.Text;
22 using System.Windows.Forms;
23 using WeifenLuo.WinFormsUI.Docking;
24 using RomCheater.PluginFramework.Core;
25 using RomCheater.Logging;
26 using RomCheater.Core;
27
28 namespace RomCheater.CheatPlugin
29 {
30 public partial class CheatCodeDockContent : DockContent
31 {
32 private UserControlPlugin plugin;
33 public CheatCodeDockContent(UserControlPlugin plugin)
34 {
35 this.plugin = plugin;
36 InitPluginFramework();
37 InitializeComponent();
38 this.Icon = Core.Properties.Resources.romcheater_icon;
39 }
40 private void InitPluginFramework()
41 {
42 if (this.plugin == null) { return; }
43 this.plugin.OnSelectedProcessChanged += new BaseEventHandler<ProcessChangedEventArgs>(plugin_OnSelectedProcessChanged);
44 this.plugin.OnSelectedConfigChanged += new BaseEventHandler<ConfigChangedEventArgs>(plugin_OnSelectedConfigChanged);
45 this.plugin.OnPEDataUpdated += new BaseEventHandler<PEViewerDataUpdatedEventArgs>(plugin_OnPEDataUpdated);
46 RaisePluginFrameworkEvents();
47 }
48
49 bool EventsRaised = false;
50 private void RaisePluginFrameworkEvents()
51 {
52
53 if (this.plugin == null) { EventsRaised = true; return; }
54 if (!EventsRaised)
55 {
56 this.plugin.RaisePluginFrameworkEvents();
57 EventsRaised = true;
58 }
59 }
60 void plugin_OnPEDataUpdated(PEViewerDataUpdatedEventArgs e)
61 {
62 //logger.Warn.WriteLine("plugin_OnPEDataUpdated::has not been implemented!");
63 }
64 void plugin_OnSelectedConfigChanged(ConfigChangedEventArgs e)
65 {
66 //logger.Warn.WriteLine("plugin_OnSelectedConfigChanged::has not been implemented!");
67 }
68 void plugin_OnSelectedProcessChanged(ProcessChangedEventArgs e)
69 {
70 //logger.Warn.WriteLine("plugin_OnSelectedProcessChanged::has not been implemented!");
71 }
72 }
73 }

  ViewVC Help
Powered by ViewVC 1.1.22