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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 892 - (hide annotations) (download)
Wed Sep 17 05:56:41 2014 UTC (5 years, 9 months ago) by william
File size: 2609 byte(s)
+ alot of dang work to force an icon to be shown on the docked panels
  ** when it was as simple as setting: DockPanel.ShowDocumentIcon to true

1 william 443 #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 william 440 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 william 683 using RomCheater.PluginFramework.Core;
25 william 684 using RomCheater.Logging;
26 william 889 using RomCheater.Interfaces;
27 william 440
28     namespace RomCheater.CheatPlugin
29     {
30     public partial class CheatCodeDockContent : DockContent
31     {
32 william 683 private UserControlPlugin plugin;
33     public CheatCodeDockContent(UserControlPlugin plugin)
34 william 440 {
35 william 683 this.plugin = plugin;
36 william 684 InitPluginFramework();
37 william 440 InitializeComponent();
38     }
39 william 684 private void InitPluginFramework()
40     {
41     if (this.plugin == null) { return; }
42 william 686 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 william 689 RaisePluginFrameworkEvents();
46 william 684 }
47 william 689
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 william 686 void plugin_OnPEDataUpdated(PEViewerDataUpdatedEventArgs e)
60 william 684 {
61 william 691 //logger.Warn.WriteLine("plugin_OnPEDataUpdated::has not been implemented!");
62 william 684 }
63 william 686 void plugin_OnSelectedConfigChanged(ConfigChangedEventArgs e)
64 william 684 {
65 william 691 //logger.Warn.WriteLine("plugin_OnSelectedConfigChanged::has not been implemented!");
66 william 684 }
67 william 686 void plugin_OnSelectedProcessChanged(ProcessChangedEventArgs e)
68 william 684 {
69 william 691 //logger.Warn.WriteLine("plugin_OnSelectedProcessChanged::has not been implemented!");
70 william 684 }
71 william 440 }
72     }

  ViewVC Help
Powered by ViewVC 1.1.22