forked from hanmin0822/MisakaTranslator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RecvEventArgs.cs
80 lines (68 loc) · 2.73 KB
/
RecvEventArgs.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TextHookLibrary
{
/// <summary>
/// TextHook数据结构体
/// </summary>
public class TextHookData{
/// <summary>
/// 游戏进程ID
/// </summary>
public int GamePID { set; get; }
/// <summary>
/// Hook入口地址
/// </summary>
public string HookAddress { set; get; }
/// <summary>
/// 通用特殊码
/// </summary>
public string HookCode { set; get; }
/// <summary>
/// MisakaTranslator专用特殊码
/// 注意 本软件单独处理一套特殊码规则:即Textrator输出的从进程到方法名之间的三组数字做记录
/// 格式如下:特殊码【值1:值2:值3】(值1即HookAddress)
/// </summary>
public string MisakaHookCode { set; get; }
/// <summary>
/// Hook方法名
/// </summary>
public string HookFunc { set; get; }
/// <summary>
/// 实际内容
/// </summary>
public string Data { set; get; }
}
/// <summary>
/// Hook功能选择界面提供的数据收到事件,满足条件:任何一个不重复的输出都将触发此事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public delegate void HookFunSelectDataRecvEventHandler(object sender, HookSelectRecvEventArgs e);
/// <summary>
/// Hook功能重新选择界面提供的数据收到事件,满足条件:特殊码满足,但附加特殊码不重复的输出都将触发此事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public delegate void HookFunReSelectDataRecvEventHandler(object sender, HookSelectRecvEventArgs e);
/// <summary>
/// 翻译界面或文本去重界面提供的数据收到事件,满足条件:特殊码满足,且附加特殊码满足或为NoMulti将触发此事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public delegate void SolvedDataRecvEventHandler(object sender, SolvedDataRecvEventArgs e);
public class HookSelectRecvEventArgs : EventArgs
{
//方法序号(仅在HookFunSelectDataRecvEventHandler和HookFunReSelectDataRecvEventHandler事件中有效)
//这个序号可以直接用于ListView
public int Index { get; set;}
public TextHookData Data { get; set; }
}
public class SolvedDataRecvEventArgs : EventArgs
{
public TextHookData Data { get; set; }
}
}