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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs	2012/06/02 16:02:01	228
+++ trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs	2013/05/28 19:10:10	440
@@ -4,21 +4,23 @@
 using System.Text;
 using System.Diagnostics;
 using RomCheater.PluginFramework.Core;
+using RomCheater.PluginFramework.Events;
+using WeifenLuo.WinFormsUI.Docking;
 
 namespace RomCheater.PluginFramework.Interfaces
 {
-    #region IPluginBase  
+    #region IPluginBase
     public interface IPluginBase : IPluginName, IPluginDescription, IPluginID, IToString, IPluginRefresh { }
     #region IPluginBase SubMembers
     public interface IToString { string ToString();    }
     public interface IPluginName { string Name { get; } }
     public interface IPluginDescription { string Description { get; } }
     public interface IPluginID { Guid ID { get; } }
-    public interface IPluginRefresh { void Reload();    }
+    public interface IPluginRefresh { void Reload(); void Reload(bool silent);   }
     #endregion
     #endregion
     #region IConfigPlugin
-    public interface IConfigPlugin : IPluginBase
+    public interface IConfigPlugin : IPluginBase, IAcceptsReadOnlyMemoryRange, ISearchInProgress, IAcceptsMemorySearch
     {
         List<ProcContainer> ValidProcessesForPlugin { get; }
     }
@@ -33,14 +35,25 @@
     {
     }
     #endregion
+    #region IUserControlPlugin
+    public interface IUserControlPlugin : IPluginBase
+    {
+        void Show();
+        void Show(DockPanel dockPanel);
+        void Show(DockPanel dockPanel, DockState dockState);
+        void Config();
+    }
+    #endregion
     #region IPluginLoader
     public interface IPluginLoader
     {
         void LoadPlugins();
+        void LoadPlugins(bool silent);
         List<IConfigPlugin> LoadedConfigPlugins { get; }
         List<IInputPlugin> LoadedInputPlugins { get; }
         List<IWindowPlugin> LoadedWindowPlugins { get; }
-        
+        List<IUserControlPlugin> LoadedUserControlPlugins { get; }
+
         IConfigPlugin GetConfigPlugin(string t);
         IInputPlugin GetInputPlugin(string t);
         IWindowPlugin GetWindowPlugin(string t);
@@ -48,25 +61,64 @@
         string ToString();
     }
     #endregion
-#region AcceptsPlugin
+    #region AcceptsPlugin
     public interface IAcceptsPlugin<TPlugin>
         where TPlugin : IPluginBase
     {
         TPlugin AcceptedPlugin { get; set; }
     }
-#endregion
-    public interface IProcessConfig : IAcceptsPlugin<IConfigPlugin>
+    public interface IAcceptsConfig : IAcceptsPlugin<IConfigPlugin> { }
+    public interface IAcceptsProcess : IAcceptsProcess<Process>    {    }
+    public interface IAcceptsProcess<TProcess>
+        where TProcess : Process
+    {
+        TProcess AcceptedProcess { get; set; }
+    }
+    #endregion
+    public interface IAcceptsProcessAndConfig<TProcess> : IAcceptsConfig, IAcceptsProcess<TProcess> where TProcess : Process { }
+    public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { }
+
+    public class AcceptedProcessAndConfig<TProcess> : IAcceptsProcessAndConfig<TProcess> where TProcess : Process
+    {
+        public AcceptedProcessAndConfig() : this(null, default(TProcess)) { }
+        public AcceptedProcessAndConfig(IConfigPlugin config, TProcess process) { AcceptedPlugin = config; AcceptedProcess = process; }
+        #region IAcceptsProcessAndConfig<TProcess> members
+        #endregion
+
+        #region IAcceptsPlugin<IConfigPlugin> Members
+        public IConfigPlugin AcceptedPlugin { get; set; }
+        #endregion
+
+        #region IAcceptsProcess<TProcess> Members
+        public TProcess AcceptedProcess { get; set; }
+        #endregion
+    }
+    public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
     {
-        Process AcceptedProcess { get; set; }
+        public AcceptedProcessAndConfig() : this(null, null) { }
+        public AcceptedProcessAndConfig(IConfigPlugin config, Process process) { AcceptedPlugin = config; AcceptedProcess = process; }
+
+        #region IAcceptsProcess<Process> Members
+        public Process AcceptedProcess { get; set; }
+        #endregion
+        #region IAcceptsPlugin<IConfigPlugin> Members
+        public IConfigPlugin AcceptedPlugin { get; set; }
+        #endregion
     }
+
     public interface IAcceptsProcessPID
     {
         int ProcessPID { get; set; }
     }
     public interface IAcceptsMemoryRange
     {
-        uint MemoryStart { get; set; }
-        uint MemorySize { get; set; }
+        uint MemoryRangeStart { get; set; }
+        uint MemoryRangeSize { get; set; }
+    }
+    public interface IAcceptsReadOnlyMemoryRange
+    {
+        uint MemoryRangeStart { get; }
+        uint MemoryRangeSize { get; }
     }
     public interface IOutputsData<TData> { TData Data { get; } }
     public interface ISearchInProgress { bool SearchInProgess { get; } }

 

  ViewVC Help
Powered by ViewVC 1.1.22