/[RomCheater]/trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs
ViewVC logotype

Annotation of /trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 440 - (hide annotations) (download)
Tue May 28 19:10:10 2013 UTC (8 years, 3 months ago) by william
File size: 4578 byte(s)
+ add support to usercontrol plugins to dock the controls on the form

1 william 83 using System;
2     using System.Collections.Generic;
3     using System.Linq;
4     using System.Text;
5     using System.Diagnostics;
6 william 88 using RomCheater.PluginFramework.Core;
7 william 399 using RomCheater.PluginFramework.Events;
8 william 440 using WeifenLuo.WinFormsUI.Docking;
9 william 83
10     namespace RomCheater.PluginFramework.Interfaces
11     {
12 william 399 #region IPluginBase
13 william 94 public interface IPluginBase : IPluginName, IPluginDescription, IPluginID, IToString, IPluginRefresh { }
14     #region IPluginBase SubMembers
15     public interface IToString { string ToString(); }
16     public interface IPluginName { string Name { get; } }
17     public interface IPluginDescription { string Description { get; } }
18     public interface IPluginID { Guid ID { get; } }
19 william 329 public interface IPluginRefresh { void Reload(); void Reload(bool silent); }
20 william 83 #endregion
21 william 94 #endregion
22 william 83 #region IConfigPlugin
23 william 399 public interface IConfigPlugin : IPluginBase, IAcceptsReadOnlyMemoryRange, ISearchInProgress, IAcceptsMemorySearch
24 william 83 {
25 william 88 List<ProcContainer> ValidProcessesForPlugin { get; }
26 william 83 }
27     #endregion
28     #region IInputPlugin
29     public interface IInputPlugin : IPluginBase
30     {
31     }
32     #endregion
33     #region IWindowPlugin
34     public interface IWindowPlugin : IPluginBase
35     {
36     }
37     #endregion
38 william 437 #region IUserControlPlugin
39     public interface IUserControlPlugin : IPluginBase
40     {
41 william 440 void Show();
42     void Show(DockPanel dockPanel);
43     void Show(DockPanel dockPanel, DockState dockState);
44     void Config();
45 william 437 }
46     #endregion
47 william 83 #region IPluginLoader
48     public interface IPluginLoader
49     {
50     void LoadPlugins();
51 william 366 void LoadPlugins(bool silent);
52 william 83 List<IConfigPlugin> LoadedConfigPlugins { get; }
53     List<IInputPlugin> LoadedInputPlugins { get; }
54     List<IWindowPlugin> LoadedWindowPlugins { get; }
55 william 437 List<IUserControlPlugin> LoadedUserControlPlugins { get; }
56    
57 william 87 IConfigPlugin GetConfigPlugin(string t);
58     IInputPlugin GetInputPlugin(string t);
59     IWindowPlugin GetWindowPlugin(string t);
60    
61 william 86 string ToString();
62 william 83 }
63     #endregion
64 william 234 #region AcceptsPlugin
65 william 228 public interface IAcceptsPlugin<TPlugin>
66     where TPlugin : IPluginBase
67 william 153 {
68 william 228 TPlugin AcceptedPlugin { get; set; }
69 william 153 }
70 william 357 public interface IAcceptsConfig : IAcceptsPlugin<IConfigPlugin> { }
71     public interface IAcceptsProcess : IAcceptsProcess<Process> { }
72 william 234 public interface IAcceptsProcess<TProcess>
73     where TProcess : Process
74 william 153 {
75 william 234 TProcess AcceptedProcess { get; set; }
76 william 153 }
77 william 234 #endregion
78 william 357 public interface IAcceptsProcessAndConfig<TProcess> : IAcceptsConfig, IAcceptsProcess<TProcess> where TProcess : Process { }
79     public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { }
80 william 389
81     public class AcceptedProcessAndConfig<TProcess> : IAcceptsProcessAndConfig<TProcess> where TProcess : Process
82     {
83     public AcceptedProcessAndConfig() : this(null, default(TProcess)) { }
84     public AcceptedProcessAndConfig(IConfigPlugin config, TProcess process) { AcceptedPlugin = config; AcceptedProcess = process; }
85     #region IAcceptsProcessAndConfig<TProcess> members
86     #endregion
87    
88     #region IAcceptsPlugin<IConfigPlugin> Members
89     public IConfigPlugin AcceptedPlugin { get; set; }
90     #endregion
91    
92     #region IAcceptsProcess<TProcess> Members
93     public TProcess AcceptedProcess { get; set; }
94     #endregion
95     }
96     public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
97     {
98     public AcceptedProcessAndConfig() : this(null, null) { }
99     public AcceptedProcessAndConfig(IConfigPlugin config, Process process) { AcceptedPlugin = config; AcceptedProcess = process; }
100    
101     #region IAcceptsProcess<Process> Members
102     public Process AcceptedProcess { get; set; }
103     #endregion
104     #region IAcceptsPlugin<IConfigPlugin> Members
105     public IConfigPlugin AcceptedPlugin { get; set; }
106     #endregion
107     }
108    
109 william 196 public interface IAcceptsProcessPID
110     {
111     int ProcessPID { get; set; }
112     }
113 william 198 public interface IAcceptsMemoryRange
114     {
115 william 378 uint MemoryRangeStart { get; set; }
116 william 287 uint MemoryRangeSize { get; set; }
117 william 198 }
118 william 389 public interface IAcceptsReadOnlyMemoryRange
119     {
120     uint MemoryRangeStart { get; }
121     uint MemoryRangeSize { get; }
122     }
123 william 228 public interface IOutputsData<TData> { TData Data { get; } }
124     public interface ISearchInProgress { bool SearchInProgess { get; } }
125 william 83 }

  ViewVC Help
Powered by ViewVC 1.1.22