ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/Win32/Sojaner.MemoryScanner/Events.cs
Revision: 889
Committed: Wed Sep 17 04:55:52 2014 UTC (9 years, 2 months ago) by william
File size: 1880 byte(s)
Log Message:

File Contents

# Content
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using Sojaner.MemoryScanner;
6 using RomCheater.Interfaces;
7
8 namespace Sojaner.MemoryScanner.Events
9 {
10
11
12 #region OnBytesReadEventArgs
13 public interface IAcceptsBytesReadEvent
14 {
15 event BaseEventHandler<OnBytesReadEventArgs> OnBytesRead;
16 }
17 public interface IOnBytesReadEventArgs
18 {
19 object UserState { get; }
20 byte[] Data { get; }
21 ulong CurrentIndex { get; }
22 ulong TotalCount { get; }
23 bool Canceled { get; set; }
24 bool ReportProgress { get; }
25 };
26 public class OnBytesReadEventArgs : BaseEventArgs, IOnBytesReadEventArgs
27 {
28 public OnBytesReadEventArgs() : this(null) { }
29 public OnBytesReadEventArgs(object sender) : this(sender, null, new byte[] { }, 0, 1) { }
30 public OnBytesReadEventArgs(object sender, object userState, byte[] data, ulong currentIndex, ulong totalCount)
31 : this(sender, userState, data, currentIndex, totalCount, true) { }
32 public OnBytesReadEventArgs(object sender, object userState, byte[] data, ulong currentIndex, ulong totalCount, bool reportprogess)
33 : base(sender)
34 {
35 this.UserState = userState;
36 Data = data;
37 this.CurrentIndex = currentIndex;
38 this.TotalCount = totalCount;
39 this.ReportProgress = reportprogess;
40 }
41 #region OnBytesReadEventArgs members
42 public object UserState { get; private set; }
43 public byte[] Data { get; private set; }
44 public ulong CurrentIndex { get; private set; }
45 public ulong TotalCount { get; private set; }
46 public bool Canceled { get; set; }
47 public bool ReportProgress { get; private set; }
48 #endregion
49 }
50 #endregion
51 }