/[RomCheater]/trunk/RomCheater/Docking/FloatingMemoryView.cs
ViewVC logotype

Annotation of /trunk/RomCheater/Docking/FloatingMemoryView.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 237 - (hide annotations) (download)
Sun Jun 3 12:48:09 2012 UTC (9 years, 3 months ago) by william
File size: 2003 byte(s)
+ change inteface implementation

1 william 196 using System;
2     using System.Collections.Generic;
3     using System.ComponentModel;
4     using System.Data;
5     using System.Drawing;
6     using System.Linq;
7     using System.Text;
8     using System.Windows.Forms;
9     using WeifenLuo.WinFormsUI.Docking;
10     using RomCheater.PluginFramework.Interfaces;
11     using RomCheater.PluginFramework.Events;
12     using System.Diagnostics;
13    
14     namespace RomCheater.Docking
15     {
16 william 237 public partial class FloatingMemoryView : DockContent, IAcceptsProcess<Process>, IAcceptsPlugin<IConfigPlugin>, IAcceptsExternalMemoryAddress
17 william 196 {
18 william 198 public FloatingMemoryView() {
19     InitializeComponent();
20     this.AcceptedPlugin = null;
21     this.AcceptedProcess = null;
22 william 201 //this.MemoryStart = uint.MinValue;
23     //this.MemorySize = uint.MaxValue;
24 william 198 }
25 william 196 public FloatingMemoryView(IConfigPlugin config) : this() { this.AcceptedPlugin = config; }
26     public FloatingMemoryView(IConfigPlugin config, Process process) : this() { this.AcceptedPlugin = config; this.AcceptedProcess = process; }
27 william 237 #region IAcceptsProcess<Process> Members
28 william 198 public Process AcceptedProcess { get { return MemView.AcceptedProcess; } set { MemView.AcceptedProcess = value; } }
29 william 196 #endregion
30     #region IAcceptsPlugin<IConfigPlugin> Members
31 william 198 public IConfigPlugin AcceptedPlugin { get { return MemView.AcceptedPlugin; } set { MemView.AcceptedPlugin = value; } }
32 william 196 #endregion
33 william 206 #region IAcceptsMemoryRange members
34     private uint MemoryStart { get { return MemView.MemoryStart; } }
35     private uint MemorySize { get { return MemView.MemorySize; } }
36     #endregion
37    
38     #region IAcceptsExternalMemoryAddress
39     public bool AcceptExternalMemoryAddress(uint address)
40     {
41     if (!((MemoryStart <= address) && (address <= (MemoryStart + MemorySize)))) { return false; }
42     MemView.GotoAddress(address);
43     return true;
44     }
45     #endregion
46 william 196 }
47     }

  ViewVC Help
Powered by ViewVC 1.1.22