/[RomCheater]/trunk/Win32/Sojaner.MemoryScanner/Events.cs
ViewVC logotype

Contents of /trunk/Win32/Sojaner.MemoryScanner/Events.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 575 - (show annotations) (download)
Thu Jun 6 07:46:38 2013 UTC (8 years, 5 months ago) by william
File size: 2836 byte(s)

1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using Sojaner.MemoryScanner;
6
7 namespace RomCheater.PluginFramework.Events
8 {
9 #region PEViewerDataUpdatedEvent
10 public interface IAcceptPEData
11 {
12 void SetPEViewerData(IPEDData peData);
13 }
14 public interface IAcceptsPEData
15 {
16 event BaseEventHandler<PEViewerDataUpdatedEventArgs> OnPEDataUpdated;
17 }
18 public interface IPEViewerDataUpdatedEvent
19 {
20 IPEDData peData { get; }
21 }
22 public class PEViewerDataUpdatedEventArgs : BaseEventArgs, IPEViewerDataUpdatedEvent
23 {
24 public PEViewerDataUpdatedEventArgs() : this(PEData.Empty) { }
25 public PEViewerDataUpdatedEventArgs(object sender) : this(sender, PEData.Empty) { }
26 public PEViewerDataUpdatedEventArgs(IPEDData peData) : base() { this.peData = peData; }
27 public PEViewerDataUpdatedEventArgs(object sender, IPEDData peData) : base(sender) { this.peData = peData; }
28 #region IPEViewerDataUpdatedEvent members
29 public IPEDData peData { get; private set; }
30 #endregion
31 }
32 #endregion
33
34 #region OnBytesReadEventArgs
35 public interface IAcceptsBytesReadEvent
36 {
37 event BaseEventHandler<OnBytesReadEventArgs> OnBytesRead;
38 }
39 public interface IOnBytesReadEventArgs
40 {
41 object UserState { get; }
42 byte[] Data { get; }
43 ulong CurrentIndex { get; }
44 ulong TotalCount { get; }
45 bool Canceled { get; set; }
46 bool ReportProgress { get; }
47 };
48 public class OnBytesReadEventArgs : BaseEventArgs, IOnBytesReadEventArgs
49 {
50 public OnBytesReadEventArgs() : this(null) { }
51 public OnBytesReadEventArgs(object sender) : this(sender, null, new byte[] { }, 0, 1) { }
52 public OnBytesReadEventArgs(object sender, object userState, byte[] data, ulong currentIndex, ulong totalCount)
53 : this(sender, userState, data, currentIndex, totalCount, true) { }
54 public OnBytesReadEventArgs(object sender, object userState, byte[] data, ulong currentIndex, ulong totalCount, bool reportprogess)
55 : base(sender)
56 {
57 this.UserState = userState;
58 Data = data;
59 this.CurrentIndex = currentIndex;
60 this.TotalCount = totalCount;
61 this.ReportProgress = reportprogess;
62 }
63 #region OnBytesReadEventArgs members
64 public object UserState { get; private set; }
65 public byte[] Data { get; private set; }
66 public ulong CurrentIndex { get; private set; }
67 public ulong TotalCount { get; private set; }
68 public bool Canceled { get; set; }
69 public bool ReportProgress { get; private set; }
70 #endregion
71 }
72 #endregion
73 }

  ViewVC Help
Powered by ViewVC 1.1.22