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 |
} |
39 |
private void InitPluginFramework() |
40 |
{ |
41 |
if (this.plugin == null) { return; } |
42 |
this.plugin.OnSelectedProcessChanged += new BaseEventHandler<ProcessChangedEventArgs>(plugin_OnSelectedProcessChanged); |
43 |
this.plugin.OnSelectedConfigChanged += new BaseEventHandler<ConfigChangedEventArgs>(plugin_OnSelectedConfigChanged); |
44 |
this.plugin.OnPEDataUpdated += new BaseEventHandler<PEViewerDataUpdatedEventArgs>(plugin_OnPEDataUpdated); |
45 |
RaisePluginFrameworkEvents(); |
46 |
} |
47 |
|
48 |
bool EventsRaised = false; |
49 |
private void RaisePluginFrameworkEvents() |
50 |
{ |
51 |
|
52 |
if (this.plugin == null) { EventsRaised = true; return; } |
53 |
if (!EventsRaised) |
54 |
{ |
55 |
this.plugin.RaisePluginFrameworkEvents(); |
56 |
EventsRaised = true; |
57 |
} |
58 |
} |
59 |
void plugin_OnPEDataUpdated(PEViewerDataUpdatedEventArgs e) |
60 |
{ |
61 |
//logger.Warn.WriteLine("plugin_OnPEDataUpdated::has not been implemented!"); |
62 |
} |
63 |
void plugin_OnSelectedConfigChanged(ConfigChangedEventArgs e) |
64 |
{ |
65 |
//logger.Warn.WriteLine("plugin_OnSelectedConfigChanged::has not been implemented!"); |
66 |
} |
67 |
void plugin_OnSelectedProcessChanged(ProcessChangedEventArgs e) |
68 |
{ |
69 |
//logger.Warn.WriteLine("plugin_OnSelectedProcessChanged::has not been implemented!"); |
70 |
} |
71 |
} |
72 |
} |