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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 473 - (hide annotations) (download)
Mon Jun 3 09:21:03 2013 UTC (8 years, 6 months ago) by william
File size: 2828 byte(s)

1 william 408 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     uint CurrentIndex { get; }
44     uint TotalCount { get; }
45 william 446 bool Canceled { get; set; }
46 william 473 bool ReportProgress { get; }
47 william 408 };
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, uint currentIndex, uint totalCount)
53 william 473 : this(sender, userState, data, currentIndex, totalCount, true) { }
54     public OnBytesReadEventArgs(object sender, object userState, byte[] data, uint currentIndex, uint totalCount, bool reportprogess)
55 william 408 : base(sender)
56     {
57     this.UserState = userState;
58     Data = data;
59     this.CurrentIndex = currentIndex;
60     this.TotalCount = totalCount;
61 william 473 this.ReportProgress = reportprogess;
62 william 408 }
63     #region OnBytesReadEventArgs members
64     public object UserState { get; private set; }
65     public byte[] Data { get; private set; }
66     public uint CurrentIndex { get; private set; }
67     public uint TotalCount { get; private set; }
68 william 446 public bool Canceled { get; set; }
69 william 473 public bool ReportProgress { get; private set; }
70 william 408 #endregion
71     }
72     #endregion
73     }

  ViewVC Help
Powered by ViewVC 1.1.22