using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using WeifenLuo.WinFormsUI.Docking; using RomCheater.PluginFramework.Interfaces; using System.Diagnostics; using RomCheater.PluginFramework.Events; using Sojaner.MemoryScanner; namespace RomCheater.Docking { public partial class FloatingMemorySectionViewer : DockContent, IAcceptsPlugin, IAcceptsProcess, IAcceptsProcessAndConfig, IAcceptPEData { public FloatingMemorySectionViewer() { InitializeComponent(); } public FloatingMemorySectionViewer(IConfigPlugin config) : this() { this.AcceptedPlugin = config; } public FloatingMemorySectionViewer(IConfigPlugin config, Process process) : this() { this.AcceptedPlugin = config; this.AcceptedProcess = process; } #region IAcceptsPlugin Members private IConfigPlugin _AcceptedPlugin; public IConfigPlugin AcceptedPlugin { get { return _AcceptedPlugin; } set { _AcceptedPlugin = value; UpdateAcceptedPlugin(value); } } private void UpdateAcceptedPlugin(IConfigPlugin config) { if (config == null) { return; } // perform processing when config plugin is updated } #endregion #region IAcceptsProcess Members private Process _AcceptedProcess; public Process AcceptedProcess { get { return _AcceptedProcess; } set { _AcceptedProcess = value; UpdateAcceptedProcess(value); } } private void UpdateAcceptedProcess(Process process) { if (process == null) { return; } // perform processing when process is updated } #endregion #region IAcceptPEData Members private IPEDData _PEData; private IPEDData PEData { get { return _PEData; } set { _PEData = value; } } public void SetPEViewerData(Sojaner.MemoryScanner.IPEDData peData) { this.PEData = peData; } #endregion } }