/[RomCheater]/trunk/RomCheater.Core/PluginInterfaces.cs
ViewVC logotype

Annotation of /trunk/RomCheater.Core/PluginInterfaces.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 686 - (hide annotations) (download)
Mon Jun 17 09:31:52 2013 UTC (6 years, 5 months ago) by william
File size: 5014 byte(s)
+ massive move of source files

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

  ViewVC Help
Powered by ViewVC 1.1.22