/[RomCheater]/trunk/RomCheater.PluginFramework/Core/PluginBase.cs
ViewVC logotype

Contents of /trunk/RomCheater.PluginFramework/Core/PluginBase.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 680 - (show annotations) (download)
Mon Jun 17 08:03:34 2013 UTC (8 years, 4 months ago) by william
File size: 1793 byte(s)

1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using RomCheater.PluginFramework.Interfaces;
6 using RomCheater.PluginFramework.Events;
7 using System.Diagnostics;
8
9 namespace RomCheater.PluginFramework.Core
10 {
11 /// <summary>
12 /// The base class for all plugins
13 /// </summary>
14 public abstract class PluginBase : IPluginBase
15 {
16 public PluginBase() { }
17 #region IPluginBase Members
18 public abstract Guid ID { get; }
19 public abstract string Name { get; }
20 public abstract string Description { get; }
21 public virtual void Reload() { Reload(false); }
22 public abstract void Reload(bool silent);
23 #endregion
24 public override string ToString()
25 {
26 return string.Format("{0} [{1}]", Name, ID.ToString());
27 }
28
29 private IPEDData _peData;
30 protected IPEDData peData { get { return _peData; } }
31 public void SetPEViewerData(IPEDData peData)
32 {
33 _peData = peData;
34 }
35
36 private Process _AcceptedProcess;
37 protected Process AcceptedProcess { get { return _AcceptedProcess; } }
38 public void SetAcceptedProcess(Process proc)
39 {
40 _AcceptedProcess = proc;
41 }
42
43 private IConfigPlugin _AcceptedConfig;
44 protected IConfigPlugin AcceptedConfig { get { return _AcceptedConfig; } }
45 public void SetAcceptedConfig(IConfigPlugin config)
46 {
47 _AcceptedConfig = config;
48 }
49
50
51 public void SetAcceptedProcessAndConfig(IAcceptsProcessAndConfig iapc)
52 {
53 SetAcceptedConfig(iapc.AcceptedPlugin);
54 SetAcceptedProcess(iapc.AcceptedProcess);
55 }
56 }
57 }

  ViewVC Help
Powered by ViewVC 1.1.22