ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/Win32/Sojaner.MemoryScanner/Events.cs
Revision: 679
Committed: Mon Jun 17 07:31:15 2013 UTC (10 years, 3 months ago) by william
File size: 1855 byte(s)
Log Message:
+ move some data into pluginframework

File Contents

# Content
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
10
11 #region OnBytesReadEventArgs
12 public interface IAcceptsBytesReadEvent
13 {
14 event BaseEventHandler<OnBytesReadEventArgs> OnBytesRead;
15 }
16 public interface IOnBytesReadEventArgs
17 {
18 object UserState { get; }
19 byte[] Data { get; }
20 ulong CurrentIndex { get; }
21 ulong TotalCount { get; }
22 bool Canceled { get; set; }
23 bool ReportProgress { get; }
24 };
25 public class OnBytesReadEventArgs : BaseEventArgs, IOnBytesReadEventArgs
26 {
27 public OnBytesReadEventArgs() : this(null) { }
28 public OnBytesReadEventArgs(object sender) : this(sender, null, new byte[] { }, 0, 1) { }
29 public OnBytesReadEventArgs(object sender, object userState, byte[] data, ulong currentIndex, ulong totalCount)
30 : this(sender, userState, data, currentIndex, totalCount, true) { }
31 public OnBytesReadEventArgs(object sender, object userState, byte[] data, ulong currentIndex, ulong totalCount, bool reportprogess)
32 : base(sender)
33 {
34 this.UserState = userState;
35 Data = data;
36 this.CurrentIndex = currentIndex;
37 this.TotalCount = totalCount;
38 this.ReportProgress = reportprogess;
39 }
40 #region OnBytesReadEventArgs members
41 public object UserState { get; private set; }
42 public byte[] Data { get; private set; }
43 public ulong CurrentIndex { get; private set; }
44 public ulong TotalCount { get; private set; }
45 public bool Canceled { get; set; }
46 public bool ReportProgress { get; private set; }
47 #endregion
48 }
49 #endregion
50 }