├── .gitignore
├── LICENSE
├── OPTestTool.sln
├── OPTestTool
├── From
│ ├── ChangeDisplayForm.Designer.cs
│ ├── ChangeDisplayForm.cs
│ ├── ChangeDisplayForm.resx
│ ├── ChangeKeypadForm.Designer.cs
│ ├── ChangeKeypadForm.cs
│ ├── ChangeKeypadForm.resx
│ ├── ChangeMouseForm.Designer.cs
│ ├── ChangeMouseForm.cs
│ ├── ChangeMouseForm.resx
│ ├── GetScreenDataBmpForm.Designer.cs
│ ├── GetScreenDataBmpForm.cs
│ ├── GetScreenDataBmpForm.resx
│ ├── ReadDataForm.Designer.cs
│ ├── ReadDataForm.cs
│ ├── ReadDataForm.resx
│ ├── ReadIntForm.Designer.cs
│ ├── ReadIntForm.cs
│ ├── ReadIntForm.resx
│ ├── ReadStringForm.Designer.cs
│ ├── ReadStringForm.cs
│ ├── ReadStringForm.resx
│ ├── SetKeypadDelayForm.Designer.cs
│ ├── SetKeypadDelayForm.cs
│ ├── SetKeypadDelayForm.resx
│ ├── SetMouseDelayForm.Designer.cs
│ ├── SetMouseDelayForm.cs
│ ├── SetMouseDelayForm.resx
│ ├── SetPathForm.Designer.cs
│ ├── SetPathForm.cs
│ ├── SetPathForm.resx
│ ├── WriteDataForm.Designer.cs
│ ├── WriteDataForm.cs
│ ├── WriteDataForm.resx
│ ├── WriteDoubleForm.Designer.cs
│ ├── WriteDoubleForm.cs
│ ├── WriteDoubleForm.resx
│ ├── WriteFloatForm.Designer.cs
│ ├── WriteFloatForm.cs
│ ├── WriteFloatForm.resx
│ ├── WriteIntForm.Designer.cs
│ ├── WriteIntForm.cs
│ ├── WriteIntForm.resx
│ ├── WriteStringForm.Designer.cs
│ ├── WriteStringForm.cs
│ └── WriteStringForm.resx
├── Lib
│ ├── op_x64.dll
│ └── op_x86.dll
├── MainForm.Designer.cs
├── MainForm.cs
├── MainForm.resx
├── OPTestTool.csproj
├── Program.cs
├── Properties
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Resources
│ ├── Desktop.png
│ ├── HiddenWindow.png
│ ├── Window.png
│ ├── libop.h
│ └── op.idl
└── Scripts
│ ├── Logger.cs
│ ├── OpSoft.cs
│ └── Utils.cs
├── README.md
└── WindowFinder
├── LocationFinder
├── LocationFinder.Designer.cs
├── LocationFinder.cs
├── LocationFinder.resx
├── LocationFinderDesigner.cs
└── ResourceLocationFinder.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
└── Resources.resx
├── Resources
├── WindowFinder.bmp
├── bmpFind.bmp
├── bmpFinda.bmp
├── bmpLocationFind.bmp
├── curFindTarget.cur
└── curLocationFindTarget.cur
├── Win32.cs
├── WindowFinder.csproj
└── WindowFinder
├── ResourceFinder.cs
├── WindowFinder.Designer.cs
├── WindowFinder.cs
├── WindowFinder.resx
└── WindowFinderDesigner.cs
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 flaot
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/OPTestTool.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.7.34031.279
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowFinder", "WindowFinder\WindowFinder.csproj", "{84F4C41B-6887-4CDF-AC1C-E9C3AE1378A1}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OPTestTool", "OPTestTool\OPTestTool.csproj", "{AA02FEB8-AE80-443B-ACAE-36F8DE6F954B}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Debug|x64 = Debug|x64
14 | Release|Any CPU = Release|Any CPU
15 | Release|x64 = Release|x64
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {84F4C41B-6887-4CDF-AC1C-E9C3AE1378A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {84F4C41B-6887-4CDF-AC1C-E9C3AE1378A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {84F4C41B-6887-4CDF-AC1C-E9C3AE1378A1}.Debug|x64.ActiveCfg = Debug|Any CPU
21 | {84F4C41B-6887-4CDF-AC1C-E9C3AE1378A1}.Debug|x64.Build.0 = Debug|Any CPU
22 | {84F4C41B-6887-4CDF-AC1C-E9C3AE1378A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {84F4C41B-6887-4CDF-AC1C-E9C3AE1378A1}.Release|Any CPU.Build.0 = Release|Any CPU
24 | {84F4C41B-6887-4CDF-AC1C-E9C3AE1378A1}.Release|x64.ActiveCfg = Release|Any CPU
25 | {84F4C41B-6887-4CDF-AC1C-E9C3AE1378A1}.Release|x64.Build.0 = Release|Any CPU
26 | {AA02FEB8-AE80-443B-ACAE-36F8DE6F954B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {AA02FEB8-AE80-443B-ACAE-36F8DE6F954B}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {AA02FEB8-AE80-443B-ACAE-36F8DE6F954B}.Debug|x64.ActiveCfg = Debug|Any CPU
29 | {AA02FEB8-AE80-443B-ACAE-36F8DE6F954B}.Debug|x64.Build.0 = Debug|Any CPU
30 | {AA02FEB8-AE80-443B-ACAE-36F8DE6F954B}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 | {AA02FEB8-AE80-443B-ACAE-36F8DE6F954B}.Release|Any CPU.Build.0 = Release|Any CPU
32 | {AA02FEB8-AE80-443B-ACAE-36F8DE6F954B}.Release|x64.ActiveCfg = Release|Any CPU
33 | {AA02FEB8-AE80-443B-ACAE-36F8DE6F954B}.Release|x64.Build.0 = Release|Any CPU
34 | EndGlobalSection
35 | GlobalSection(SolutionProperties) = preSolution
36 | HideSolutionNode = FALSE
37 | EndGlobalSection
38 | GlobalSection(ExtensibilityGlobals) = postSolution
39 | SolutionGuid = {EAF32FFA-CD08-4ED2-BC54-95667E5E10B7}
40 | EndGlobalSection
41 | EndGlobal
42 |
--------------------------------------------------------------------------------
/OPTestTool/From/ChangeDisplayForm.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | public partial class ChangeDisplayForm : Form
4 | {
5 | public ChangeDisplayForm()
6 | {
7 | InitializeComponent();
8 | }
9 | public void SetSelect(string selectMode)
10 | {
11 | if (string.IsNullOrEmpty(selectMode))
12 | return;
13 | foreach (var item in groupBox1.Controls)
14 | {
15 | var btn = item as RadioButton;
16 | if (btn == null)
17 | continue;
18 | if (btn.Text != selectMode)
19 | continue;
20 | btn.Checked = true;
21 | break;
22 | }
23 | }
24 | public string GetSelect()
25 | {
26 | foreach (var item in groupBox1.Controls)
27 | {
28 | var btn = item as RadioButton;
29 | if (btn == null)
30 | continue;
31 | if (btn.Checked)
32 | return btn.Text;
33 | }
34 | return string.Empty;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/OPTestTool/From/ChangeDisplayForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/ChangeKeypadForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class ChangeKeypadForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | groupBox1 = new GroupBox();
32 | radioButton3 = new RadioButton();
33 | radioButton2 = new RadioButton();
34 | radioButton1 = new RadioButton();
35 | button1 = new Button();
36 | button2 = new Button();
37 | groupBox1.SuspendLayout();
38 | SuspendLayout();
39 | //
40 | // groupBox1
41 | //
42 | groupBox1.Controls.Add(radioButton3);
43 | groupBox1.Controls.Add(radioButton2);
44 | groupBox1.Controls.Add(radioButton1);
45 | groupBox1.Location = new Point(12, 12);
46 | groupBox1.Name = "groupBox1";
47 | groupBox1.Size = new Size(356, 174);
48 | groupBox1.TabIndex = 0;
49 | groupBox1.TabStop = false;
50 | groupBox1.Text = "键盘(必选)";
51 | //
52 | // radioButton3
53 | //
54 | radioButton3.AutoSize = true;
55 | radioButton3.Location = new Point(89, 22);
56 | radioButton3.Name = "radioButton3";
57 | radioButton3.Size = new Size(76, 21);
58 | radioButton3.TabIndex = 1;
59 | radioButton3.TabStop = true;
60 | radioButton3.Text = "windows";
61 | radioButton3.UseVisualStyleBackColor = true;
62 | //
63 | // radioButton2
64 | //
65 | radioButton2.AutoSize = true;
66 | radioButton2.Location = new Point(6, 49);
67 | radioButton2.Name = "radioButton2";
68 | radioButton2.Size = new Size(85, 21);
69 | radioButton2.TabIndex = 3;
70 | radioButton2.TabStop = true;
71 | radioButton2.Text = "normal.hd";
72 | radioButton2.UseVisualStyleBackColor = true;
73 | //
74 | // radioButton1
75 | //
76 | radioButton1.AutoSize = true;
77 | radioButton1.Checked = true;
78 | radioButton1.Location = new Point(6, 22);
79 | radioButton1.Name = "radioButton1";
80 | radioButton1.Size = new Size(67, 21);
81 | radioButton1.TabIndex = 0;
82 | radioButton1.TabStop = true;
83 | radioButton1.Text = "normal";
84 | radioButton1.UseVisualStyleBackColor = true;
85 | //
86 | // button1
87 | //
88 | button1.DialogResult = DialogResult.OK;
89 | button1.Location = new Point(111, 192);
90 | button1.Name = "button1";
91 | button1.Size = new Size(75, 23);
92 | button1.TabIndex = 1;
93 | button1.Text = "确定";
94 | button1.UseVisualStyleBackColor = true;
95 | //
96 | // button2
97 | //
98 | button2.DialogResult = DialogResult.Cancel;
99 | button2.Location = new Point(202, 192);
100 | button2.Name = "button2";
101 | button2.Size = new Size(75, 23);
102 | button2.TabIndex = 2;
103 | button2.Text = "取消";
104 | button2.UseVisualStyleBackColor = true;
105 | //
106 | // ChangeKeypadForm
107 | //
108 | AutoScaleDimensions = new SizeF(7F, 17F);
109 | AutoScaleMode = AutoScaleMode.Font;
110 | ClientSize = new Size(380, 228);
111 | Controls.Add(button2);
112 | Controls.Add(button1);
113 | Controls.Add(groupBox1);
114 | MaximizeBox = false;
115 | MinimizeBox = false;
116 | Name = "ChangeKeypadForm";
117 | ShowIcon = false;
118 | StartPosition = FormStartPosition.CenterParent;
119 | Text = "请选择";
120 | groupBox1.ResumeLayout(false);
121 | groupBox1.PerformLayout();
122 | ResumeLayout(false);
123 | }
124 |
125 | #endregion
126 |
127 | private GroupBox groupBox1;
128 | private RadioButton radioButton3;
129 | private RadioButton radioButton2;
130 | private RadioButton radioButton1;
131 | private Button button1;
132 | private Button button2;
133 | }
134 | }
--------------------------------------------------------------------------------
/OPTestTool/From/ChangeKeypadForm.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | public partial class ChangeKeypadForm : Form
4 | {
5 | public ChangeKeypadForm()
6 | {
7 | InitializeComponent();
8 | }
9 | public void SetSelect(string selectMode)
10 | {
11 | if (string.IsNullOrEmpty(selectMode))
12 | return;
13 | foreach (var item in groupBox1.Controls)
14 | {
15 | var btn = item as RadioButton;
16 | if (btn == null)
17 | continue;
18 | if (btn.Text != selectMode)
19 | continue;
20 | btn.Checked = true;
21 | break;
22 | }
23 | }
24 | public string GetSelect()
25 | {
26 | foreach (var item in groupBox1.Controls)
27 | {
28 | var btn = item as RadioButton;
29 | if (btn == null)
30 | continue;
31 | if (btn.Checked)
32 | return btn.Text;
33 | }
34 | return string.Empty;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/OPTestTool/From/ChangeKeypadForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/ChangeMouseForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class ChangeMouseForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | groupBox1 = new GroupBox();
32 | radioButton4 = new RadioButton();
33 | radioButton3 = new RadioButton();
34 | radioButton2 = new RadioButton();
35 | radioButton1 = new RadioButton();
36 | button1 = new Button();
37 | button2 = new Button();
38 | groupBox1.SuspendLayout();
39 | SuspendLayout();
40 | //
41 | // groupBox1
42 | //
43 | groupBox1.Controls.Add(radioButton4);
44 | groupBox1.Controls.Add(radioButton3);
45 | groupBox1.Controls.Add(radioButton2);
46 | groupBox1.Controls.Add(radioButton1);
47 | groupBox1.Location = new Point(12, 12);
48 | groupBox1.Name = "groupBox1";
49 | groupBox1.Size = new Size(356, 174);
50 | groupBox1.TabIndex = 0;
51 | groupBox1.TabStop = false;
52 | groupBox1.Text = "鼠标(必选)";
53 | //
54 | // radioButton4
55 | //
56 | radioButton4.AutoSize = true;
57 | radioButton4.Location = new Point(171, 22);
58 | radioButton4.Name = "radioButton4";
59 | radioButton4.Size = new Size(40, 21);
60 | radioButton4.TabIndex = 2;
61 | radioButton4.TabStop = true;
62 | radioButton4.Text = "dx";
63 | radioButton4.UseVisualStyleBackColor = true;
64 | //
65 | // radioButton3
66 | //
67 | radioButton3.AutoSize = true;
68 | radioButton3.Location = new Point(89, 22);
69 | radioButton3.Name = "radioButton3";
70 | radioButton3.Size = new Size(76, 21);
71 | radioButton3.TabIndex = 1;
72 | radioButton3.TabStop = true;
73 | radioButton3.Text = "windows";
74 | radioButton3.UseVisualStyleBackColor = true;
75 | //
76 | // radioButton2
77 | //
78 | radioButton2.AutoSize = true;
79 | radioButton2.Location = new Point(6, 49);
80 | radioButton2.Name = "radioButton2";
81 | radioButton2.Size = new Size(85, 21);
82 | radioButton2.TabIndex = 3;
83 | radioButton2.TabStop = true;
84 | radioButton2.Text = "normal.hd";
85 | radioButton2.UseVisualStyleBackColor = true;
86 | //
87 | // radioButton1
88 | //
89 | radioButton1.AutoSize = true;
90 | radioButton1.Checked = true;
91 | radioButton1.Location = new Point(6, 22);
92 | radioButton1.Name = "radioButton1";
93 | radioButton1.Size = new Size(67, 21);
94 | radioButton1.TabIndex = 0;
95 | radioButton1.TabStop = true;
96 | radioButton1.Text = "normal";
97 | radioButton1.UseVisualStyleBackColor = true;
98 | //
99 | // button1
100 | //
101 | button1.DialogResult = DialogResult.OK;
102 | button1.Location = new Point(111, 192);
103 | button1.Name = "button1";
104 | button1.Size = new Size(75, 23);
105 | button1.TabIndex = 1;
106 | button1.Text = "确定";
107 | button1.UseVisualStyleBackColor = true;
108 | //
109 | // button2
110 | //
111 | button2.DialogResult = DialogResult.Cancel;
112 | button2.Location = new Point(202, 192);
113 | button2.Name = "button2";
114 | button2.Size = new Size(75, 23);
115 | button2.TabIndex = 2;
116 | button2.Text = "取消";
117 | button2.UseVisualStyleBackColor = true;
118 | //
119 | // ChangeMouseForm
120 | //
121 | AutoScaleDimensions = new SizeF(7F, 17F);
122 | AutoScaleMode = AutoScaleMode.Font;
123 | ClientSize = new Size(380, 228);
124 | Controls.Add(button2);
125 | Controls.Add(button1);
126 | Controls.Add(groupBox1);
127 | MaximizeBox = false;
128 | MinimizeBox = false;
129 | Name = "ChangeMouseForm";
130 | ShowIcon = false;
131 | StartPosition = FormStartPosition.CenterParent;
132 | Text = "请选择";
133 | groupBox1.ResumeLayout(false);
134 | groupBox1.PerformLayout();
135 | ResumeLayout(false);
136 | }
137 |
138 | #endregion
139 |
140 | private GroupBox groupBox1;
141 | private RadioButton radioButton4;
142 | private RadioButton radioButton3;
143 | private RadioButton radioButton2;
144 | private RadioButton radioButton1;
145 | private Button button1;
146 | private Button button2;
147 | }
148 | }
--------------------------------------------------------------------------------
/OPTestTool/From/ChangeMouseForm.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | public partial class ChangeMouseForm : Form
4 | {
5 | public ChangeMouseForm()
6 | {
7 | InitializeComponent();
8 | }
9 | public void SetSelect(string selectMode)
10 | {
11 | if (string.IsNullOrEmpty(selectMode))
12 | return;
13 | foreach (var item in groupBox1.Controls)
14 | {
15 | var btn = item as RadioButton;
16 | if (btn == null)
17 | continue;
18 | if (btn.Text != selectMode)
19 | continue;
20 | btn.Checked = true;
21 | break;
22 | }
23 | }
24 | public string GetSelect()
25 | {
26 | foreach (var item in groupBox1.Controls)
27 | {
28 | var btn = item as RadioButton;
29 | if (btn == null)
30 | continue;
31 | if (btn.Checked)
32 | return btn.Text;
33 | }
34 | return string.Empty;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/OPTestTool/From/ChangeMouseForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/GetScreenDataBmpForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class GetScreenDataBmpForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | pictureBox1 = new PictureBox();
32 | Txt_Tip = new Label();
33 | ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
34 | SuspendLayout();
35 | //
36 | // pictureBox1
37 | //
38 | pictureBox1.Dock = DockStyle.Fill;
39 | pictureBox1.Location = new Point(0, 0);
40 | pictureBox1.Name = "pictureBox1";
41 | pictureBox1.Size = new Size(307, 144);
42 | pictureBox1.TabIndex = 0;
43 | pictureBox1.TabStop = false;
44 | //
45 | // Txt_Tip
46 | //
47 | Txt_Tip.ForeColor = Color.Red;
48 | Txt_Tip.Location = new Point(79, 56);
49 | Txt_Tip.Name = "Txt_Tip";
50 | Txt_Tip.Size = new Size(155, 23);
51 | Txt_Tip.TabIndex = 1;
52 | Txt_Tip.Text = "未绑定窗口";
53 | Txt_Tip.TextAlign = ContentAlignment.MiddleCenter;
54 | //
55 | // GetScreenDataBmpForm
56 | //
57 | AutoScaleDimensions = new SizeF(7F, 17F);
58 | AutoScaleMode = AutoScaleMode.Font;
59 | ClientSize = new Size(307, 144);
60 | Controls.Add(Txt_Tip);
61 | Controls.Add(pictureBox1);
62 | MaximizeBox = false;
63 | MinimizeBox = false;
64 | Name = "GetScreenDataBmpForm";
65 | ShowIcon = false;
66 | StartPosition = FormStartPosition.CenterParent;
67 | Text = "GetScreenDataBmp";
68 | ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
69 | ResumeLayout(false);
70 | }
71 |
72 | #endregion
73 |
74 | private PictureBox pictureBox1;
75 | private Label Txt_Tip;
76 | }
77 | }
--------------------------------------------------------------------------------
/OPTestTool/From/GetScreenDataBmpForm.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | public partial class GetScreenDataBmpForm : Form
4 | {
5 | private OpSoft opSoft;
6 | public bool IsShow;
7 | private System.IntPtr pBmp = IntPtr.Zero;
8 | private int bmpSize = 0;
9 | public GetScreenDataBmpForm(OpSoft opSoft)
10 | {
11 | this.opSoft = opSoft;
12 | InitializeComponent();
13 | }
14 | public void Update(int x1, int y1, int x2, int y2)
15 | {
16 | if (!IsShow)
17 | return;
18 | if (opSoft.IsBind() != 1)
19 | {
20 | Txt_Tip.Visible = true;
21 | return;
22 | }
23 | Txt_Tip.Visible = false;
24 | opSoft.GetScreenDataBmp(x1, y1, x2, y2, out pBmp, out bmpSize);
25 | if (pBmp == IntPtr.Zero)
26 | return;
27 | Byte[] tbuf = new Byte[bmpSize];
28 | unsafe
29 | {
30 | byte* memBytePtr = (byte*)pBmp.ToPointer();
31 | using (UnmanagedMemoryStream ms = new UnmanagedMemoryStream(memBytePtr, (long)bmpSize, (long)bmpSize, FileAccess.Read))
32 | {
33 | ms.Read(tbuf, 0, tbuf.Length);
34 | }
35 | }
36 | Image iamge = null;
37 | try
38 | {
39 | using (MemoryStream ms = new MemoryStream(tbuf))
40 | {
41 | iamge = Image.FromStream(ms);
42 | }
43 | }
44 | catch (Exception)
45 | {
46 | }
47 | pictureBox1.Image = iamge;
48 | }
49 | public new void Show()
50 | {
51 | IsShow = true;
52 | base.Show();
53 | }
54 | public new void Hide()
55 | {
56 | IsShow = false;
57 | base.Hide();
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/OPTestTool/From/GetScreenDataBmpForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/ReadDataForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class ReadDataForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | button1 = new Button();
32 | button2 = new Button();
33 | label2 = new Label();
34 | Txt_Length = new TextBox();
35 | SuspendLayout();
36 | //
37 | // button1
38 | //
39 | button1.DialogResult = DialogResult.OK;
40 | button1.Location = new Point(77, 92);
41 | button1.Name = "button1";
42 | button1.Size = new Size(75, 23);
43 | button1.TabIndex = 10;
44 | button1.Text = "确定";
45 | button1.UseVisualStyleBackColor = true;
46 | //
47 | // button2
48 | //
49 | button2.DialogResult = DialogResult.Cancel;
50 | button2.Location = new Point(168, 92);
51 | button2.Name = "button2";
52 | button2.Size = new Size(75, 23);
53 | button2.TabIndex = 11;
54 | button2.Text = "取消";
55 | button2.UseVisualStyleBackColor = true;
56 | //
57 | // label2
58 | //
59 | label2.AutoSize = true;
60 | label2.Cursor = Cursors.SizeWE;
61 | label2.Location = new Point(93, 49);
62 | label2.Name = "label2";
63 | label2.Size = new Size(35, 17);
64 | label2.TabIndex = 3;
65 | label2.Tag = "Txt_Length";
66 | label2.Text = "长度:";
67 | label2.MouseDown += LabelUInt_MouseDown;
68 | label2.MouseMove += LabelUInt_MouseMove;
69 | label2.MouseUp += LabelUInt_MouseUp;
70 | //
71 | // Txt_Length
72 | //
73 | Txt_Length.Location = new Point(144, 46);
74 | Txt_Length.Name = "Txt_Length";
75 | Txt_Length.Size = new Size(75, 23);
76 | Txt_Length.TabIndex = 4;
77 | Txt_Length.Text = "0";
78 | Txt_Length.TextChanged += TextBoxUInt_TextChanged;
79 | Txt_Length.KeyPress += TextBoxUInt_KeyPress;
80 | //
81 | // ReadDataForm
82 | //
83 | AutoScaleDimensions = new SizeF(7F, 17F);
84 | AutoScaleMode = AutoScaleMode.Font;
85 | ClientSize = new Size(307, 144);
86 | Controls.Add(Txt_Length);
87 | Controls.Add(label2);
88 | Controls.Add(button2);
89 | Controls.Add(button1);
90 | MaximizeBox = false;
91 | MinimizeBox = false;
92 | Name = "ReadDataForm";
93 | ShowIcon = false;
94 | StartPosition = FormStartPosition.CenterParent;
95 | Text = "请选择";
96 | ResumeLayout(false);
97 | PerformLayout();
98 | }
99 |
100 | #endregion
101 | private Button button1;
102 | private Button button2;
103 | private Label label2;
104 | private TextBox Txt_Length;
105 | }
106 | }
--------------------------------------------------------------------------------
/OPTestTool/From/ReadDataForm.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace OPTestTool
3 | {
4 | public partial class ReadDataForm : Form
5 | {
6 | public ReadDataForm()
7 | {
8 | InitializeComponent();
9 | }
10 | public int Length => int.Parse(Txt_Length.Text);
11 |
12 | private void LabelUInt_MouseDown(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseDown(sender, e);
13 | private void LabelUInt_MouseMove(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseMove(sender, e);
14 | private void LabelUInt_MouseUp(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseUp(sender, e);
15 | private void TextBoxUInt_TextChanged(object sender, EventArgs e) => Utils.TextBoxUInt_TextChanged(sender, e);
16 | private void TextBoxUInt_KeyPress(object sender, KeyPressEventArgs e) => Utils.TextBoxUInt_KeyPress(sender, e);
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/OPTestTool/From/ReadDataForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/ReadIntForm.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace OPTestTool
3 | {
4 | public partial class ReadIntForm : Form
5 | {
6 | public ReadIntForm()
7 | {
8 | InitializeComponent();
9 | }
10 | public string GetSelect()
11 | {
12 | foreach (var item in Controls)
13 | {
14 | var btn = item as RadioButton;
15 | if (btn == null)
16 | continue;
17 | if (btn.Checked)
18 | return btn.Tag as string;
19 | }
20 | return string.Empty;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/OPTestTool/From/ReadIntForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/ReadStringForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class ReadStringForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | radioButton3 = new RadioButton();
32 | radioButton1 = new RadioButton();
33 | button1 = new Button();
34 | button2 = new Button();
35 | label1 = new Label();
36 | label2 = new Label();
37 | Txt_Length = new TextBox();
38 | SuspendLayout();
39 | //
40 | // radioButton3
41 | //
42 | radioButton3.AutoSize = true;
43 | radioButton3.Location = new Point(186, 26);
44 | radioButton3.Name = "radioButton3";
45 | radioButton3.Size = new Size(74, 21);
46 | radioButton3.TabIndex = 2;
47 | radioButton3.TabStop = true;
48 | radioButton3.Tag = "utf-16";
49 | radioButton3.Text = "Unicode";
50 | radioButton3.UseVisualStyleBackColor = true;
51 | //
52 | // radioButton1
53 | //
54 | radioButton1.AutoSize = true;
55 | radioButton1.Checked = true;
56 | radioButton1.Location = new Point(117, 26);
57 | radioButton1.Name = "radioButton1";
58 | radioButton1.Size = new Size(51, 21);
59 | radioButton1.TabIndex = 1;
60 | radioButton1.TabStop = true;
61 | radioButton1.Tag = "gbk";
62 | radioButton1.Text = "GBK";
63 | radioButton1.UseVisualStyleBackColor = true;
64 | //
65 | // button1
66 | //
67 | button1.DialogResult = DialogResult.OK;
68 | button1.Location = new Point(77, 101);
69 | button1.Name = "button1";
70 | button1.Size = new Size(75, 23);
71 | button1.TabIndex = 10;
72 | button1.Text = "确定";
73 | button1.UseVisualStyleBackColor = true;
74 | //
75 | // button2
76 | //
77 | button2.DialogResult = DialogResult.Cancel;
78 | button2.Location = new Point(168, 101);
79 | button2.Name = "button2";
80 | button2.Size = new Size(75, 23);
81 | button2.TabIndex = 11;
82 | button2.Text = "取消";
83 | button2.UseVisualStyleBackColor = true;
84 | //
85 | // label1
86 | //
87 | label1.AutoSize = true;
88 | label1.Location = new Point(66, 28);
89 | label1.Name = "label1";
90 | label1.Size = new Size(35, 17);
91 | label1.TabIndex = 0;
92 | label1.Text = "编码:";
93 | //
94 | // label2
95 | //
96 | label2.AutoSize = true;
97 | label2.Cursor = Cursors.SizeWE;
98 | label2.Location = new Point(66, 64);
99 | label2.Name = "label2";
100 | label2.Size = new Size(35, 17);
101 | label2.TabIndex = 3;
102 | label2.Tag = "Txt_Length";
103 | label2.Text = "长度:";
104 | label2.MouseDown += LabelUInt_MouseDown;
105 | label2.MouseMove += LabelUInt_MouseMove;
106 | label2.MouseUp += LabelUInt_MouseUp;
107 | //
108 | // Txt_Length
109 | //
110 | Txt_Length.Location = new Point(117, 61);
111 | Txt_Length.Name = "Txt_Length";
112 | Txt_Length.Size = new Size(75, 23);
113 | Txt_Length.TabIndex = 4;
114 | Txt_Length.Text = "0";
115 | Txt_Length.TextChanged += TextBoxUInt_TextChanged;
116 | Txt_Length.KeyPress += TextBoxUInt_KeyPress;
117 | //
118 | // ReadStringForm
119 | //
120 | AutoScaleDimensions = new SizeF(7F, 17F);
121 | AutoScaleMode = AutoScaleMode.Font;
122 | ClientSize = new Size(307, 144);
123 | Controls.Add(Txt_Length);
124 | Controls.Add(label2);
125 | Controls.Add(label1);
126 | Controls.Add(button2);
127 | Controls.Add(button1);
128 | Controls.Add(radioButton3);
129 | Controls.Add(radioButton1);
130 | MaximizeBox = false;
131 | MinimizeBox = false;
132 | Name = "ReadStringForm";
133 | ShowIcon = false;
134 | StartPosition = FormStartPosition.CenterParent;
135 | Text = "请选择";
136 | ResumeLayout(false);
137 | PerformLayout();
138 | }
139 |
140 | #endregion
141 | private RadioButton radioButton3;
142 | private RadioButton radioButton1;
143 | private Button button1;
144 | private Button button2;
145 | private Label label1;
146 | private Label label2;
147 | private TextBox Txt_Length;
148 | }
149 | }
--------------------------------------------------------------------------------
/OPTestTool/From/ReadStringForm.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace OPTestTool
3 | {
4 | public partial class ReadStringForm : Form
5 | {
6 | public ReadStringForm()
7 | {
8 | InitializeComponent();
9 | }
10 | public string GetSelect()
11 | {
12 | foreach (var item in Controls)
13 | {
14 | var btn = item as RadioButton;
15 | if (btn == null)
16 | continue;
17 | if (btn.Checked)
18 | return btn.Tag as string;
19 | }
20 | return string.Empty;
21 | }
22 | public int Length => int.Parse(Txt_Length.Text);
23 |
24 | private void LabelUInt_MouseDown(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseDown(sender, e);
25 | private void LabelUInt_MouseMove(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseMove(sender, e);
26 | private void LabelUInt_MouseUp(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseUp(sender, e);
27 | private void TextBoxUInt_TextChanged(object sender, EventArgs e) => Utils.TextBoxUInt_TextChanged(sender, e);
28 | private void TextBoxUInt_KeyPress(object sender, KeyPressEventArgs e) => Utils.TextBoxUInt_KeyPress(sender, e);
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/OPTestTool/From/ReadStringForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/SetKeypadDelayForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class SetKeypadDelayForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | button1 = new Button();
32 | button2 = new Button();
33 | label1 = new Label();
34 | Txt_Delay = new TextBox();
35 | label2 = new Label();
36 | label3 = new Label();
37 | ComboBox_Mode = new ComboBox();
38 | SuspendLayout();
39 | //
40 | // button1
41 | //
42 | button1.DialogResult = DialogResult.OK;
43 | button1.Location = new Point(65, 92);
44 | button1.Name = "button1";
45 | button1.Size = new Size(75, 23);
46 | button1.TabIndex = 1;
47 | button1.Text = "确定";
48 | button1.UseVisualStyleBackColor = true;
49 | //
50 | // button2
51 | //
52 | button2.DialogResult = DialogResult.Cancel;
53 | button2.Location = new Point(156, 92);
54 | button2.Name = "button2";
55 | button2.Size = new Size(75, 23);
56 | button2.TabIndex = 2;
57 | button2.Text = "取消";
58 | button2.UseVisualStyleBackColor = true;
59 | //
60 | // label1
61 | //
62 | label1.AutoSize = true;
63 | label1.Cursor = Cursors.SizeWE;
64 | label1.Location = new Point(66, 43);
65 | label1.Name = "label1";
66 | label1.Size = new Size(35, 17);
67 | label1.TabIndex = 3;
68 | label1.Tag = "Txt_Delay";
69 | label1.Text = "延时:";
70 | label1.MouseDown += LabelUInt_MouseDown;
71 | label1.MouseMove += LabelUInt_MouseMove;
72 | label1.MouseUp += LabelUInt_MouseUp;
73 | //
74 | // Txt_Delay
75 | //
76 | Txt_Delay.Location = new Point(107, 40);
77 | Txt_Delay.Name = "Txt_Delay";
78 | Txt_Delay.Size = new Size(67, 23);
79 | Txt_Delay.TabIndex = 4;
80 | Txt_Delay.Text = "50";
81 | Txt_Delay.TextChanged += TextBoxUInt_TextChanged;
82 | Txt_Delay.KeyPress += TextBoxUInt_KeyPress;
83 | //
84 | // label2
85 | //
86 | label2.AutoSize = true;
87 | label2.Location = new Point(185, 43);
88 | label2.Name = "label2";
89 | label2.Size = new Size(32, 17);
90 | label2.TabIndex = 5;
91 | label2.Text = "毫秒";
92 | //
93 | // label3
94 | //
95 | label3.AutoSize = true;
96 | label3.Location = new Point(43, 15);
97 | label3.Name = "label3";
98 | label3.Size = new Size(59, 17);
99 | label3.TabIndex = 6;
100 | label3.Text = "键盘模式:";
101 | //
102 | // ComboBox_Mode
103 | //
104 | ComboBox_Mode.DropDownStyle = ComboBoxStyle.DropDownList;
105 | ComboBox_Mode.FormattingEnabled = true;
106 | ComboBox_Mode.Items.AddRange(new object[] { "normal", "normal.hd", "windows" });
107 | ComboBox_Mode.Location = new Point(108, 10);
108 | ComboBox_Mode.Name = "ComboBox_Mode";
109 | ComboBox_Mode.Size = new Size(66, 25);
110 | ComboBox_Mode.TabIndex = 7;
111 | //
112 | // SetKeypadDelayForm
113 | //
114 | AutoScaleDimensions = new SizeF(7F, 17F);
115 | AutoScaleMode = AutoScaleMode.Font;
116 | ClientSize = new Size(294, 139);
117 | Controls.Add(ComboBox_Mode);
118 | Controls.Add(label3);
119 | Controls.Add(label2);
120 | Controls.Add(Txt_Delay);
121 | Controls.Add(label1);
122 | Controls.Add(button2);
123 | Controls.Add(button1);
124 | MaximizeBox = false;
125 | MinimizeBox = false;
126 | Name = "SetKeypadDelayForm";
127 | ShowIcon = false;
128 | StartPosition = FormStartPosition.CenterParent;
129 | Text = "请选择";
130 | ResumeLayout(false);
131 | PerformLayout();
132 | }
133 |
134 | #endregion
135 | private Button button1;
136 | private Button button2;
137 | private Label label1;
138 | private TextBox Txt_Delay;
139 | private Label label2;
140 | private Label label3;
141 | private ComboBox ComboBox_Mode;
142 | }
143 | }
--------------------------------------------------------------------------------
/OPTestTool/From/SetKeypadDelayForm.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | public partial class SetKeypadDelayForm : Form
4 | {
5 | public SetKeypadDelayForm()
6 | {
7 | InitializeComponent();
8 | ComboBox_Mode.SelectedIndex = 0;
9 | }
10 | public string GetDelay()
11 | {
12 | return Txt_Delay.Text;
13 | }
14 | public string GetMode()
15 | {
16 | return ComboBox_Mode.Text;
17 | }
18 |
19 | private void LabelUInt_MouseDown(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseDown(sender, e);
20 | private void LabelUInt_MouseMove(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseMove(sender, e);
21 | private void LabelUInt_MouseUp(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseUp(sender, e);
22 | private void TextBoxUInt_TextChanged(object sender, EventArgs e) => Utils.TextBoxUInt_TextChanged(sender, e);
23 | private void TextBoxUInt_KeyPress(object sender, KeyPressEventArgs e) => Utils.TextBoxUInt_KeyPress(sender, e);
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/OPTestTool/From/SetKeypadDelayForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/SetMouseDelayForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class SetMouseDelayForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | button1 = new Button();
32 | button2 = new Button();
33 | label1 = new Label();
34 | Txt_Delay = new TextBox();
35 | label2 = new Label();
36 | label3 = new Label();
37 | ComboBox_Mode = new ComboBox();
38 | SuspendLayout();
39 | //
40 | // button1
41 | //
42 | button1.DialogResult = DialogResult.OK;
43 | button1.Location = new Point(65, 92);
44 | button1.Name = "button1";
45 | button1.Size = new Size(75, 23);
46 | button1.TabIndex = 1;
47 | button1.Text = "确定";
48 | button1.UseVisualStyleBackColor = true;
49 | //
50 | // button2
51 | //
52 | button2.DialogResult = DialogResult.Cancel;
53 | button2.Location = new Point(156, 92);
54 | button2.Name = "button2";
55 | button2.Size = new Size(75, 23);
56 | button2.TabIndex = 2;
57 | button2.Text = "取消";
58 | button2.UseVisualStyleBackColor = true;
59 | //
60 | // label1
61 | //
62 | label1.AutoSize = true;
63 | label1.Cursor = Cursors.SizeWE;
64 | label1.Location = new Point(66, 43);
65 | label1.Name = "label1";
66 | label1.Size = new Size(35, 17);
67 | label1.TabIndex = 3;
68 | label1.Tag = "Txt_Delay";
69 | label1.Text = "延时:";
70 | label1.MouseDown += LabelUInt_MouseDown;
71 | label1.MouseMove += LabelUInt_MouseMove;
72 | label1.MouseUp += LabelUInt_MouseUp;
73 | //
74 | // Txt_Delay
75 | //
76 | Txt_Delay.Location = new Point(107, 40);
77 | Txt_Delay.Name = "Txt_Delay";
78 | Txt_Delay.Size = new Size(67, 23);
79 | Txt_Delay.TabIndex = 4;
80 | Txt_Delay.Text = "50";
81 | Txt_Delay.TextChanged += TextBoxUInt_TextChanged;
82 | Txt_Delay.KeyPress += TextBoxUInt_KeyPress;
83 | //
84 | // label2
85 | //
86 | label2.AutoSize = true;
87 | label2.Location = new Point(185, 43);
88 | label2.Name = "label2";
89 | label2.Size = new Size(32, 17);
90 | label2.TabIndex = 5;
91 | label2.Text = "毫秒";
92 | //
93 | // label3
94 | //
95 | label3.AutoSize = true;
96 | label3.Location = new Point(43, 15);
97 | label3.Name = "label3";
98 | label3.Size = new Size(59, 17);
99 | label3.TabIndex = 6;
100 | label3.Text = "鼠标模式:";
101 | //
102 | // ComboBox_Mode
103 | //
104 | ComboBox_Mode.DropDownStyle = ComboBoxStyle.DropDownList;
105 | ComboBox_Mode.FormattingEnabled = true;
106 | ComboBox_Mode.Items.AddRange(new object[] { "normal", "normal.hd", "windows", "dx" });
107 | ComboBox_Mode.Location = new Point(108, 10);
108 | ComboBox_Mode.Name = "ComboBox_Mode";
109 | ComboBox_Mode.Size = new Size(66, 25);
110 | ComboBox_Mode.TabIndex = 7;
111 | //
112 | // SetMouseDelayForm
113 | //
114 | AutoScaleDimensions = new SizeF(7F, 17F);
115 | AutoScaleMode = AutoScaleMode.Font;
116 | ClientSize = new Size(294, 139);
117 | Controls.Add(ComboBox_Mode);
118 | Controls.Add(label3);
119 | Controls.Add(label2);
120 | Controls.Add(Txt_Delay);
121 | Controls.Add(label1);
122 | Controls.Add(button2);
123 | Controls.Add(button1);
124 | MaximizeBox = false;
125 | MinimizeBox = false;
126 | Name = "SetMouseDelayForm";
127 | ShowIcon = false;
128 | StartPosition = FormStartPosition.CenterParent;
129 | Text = "请选择";
130 | ResumeLayout(false);
131 | PerformLayout();
132 | }
133 |
134 | #endregion
135 | private Button button1;
136 | private Button button2;
137 | private Label label1;
138 | private TextBox Txt_Delay;
139 | private Label label2;
140 | private Label label3;
141 | private ComboBox ComboBox_Mode;
142 | }
143 | }
--------------------------------------------------------------------------------
/OPTestTool/From/SetMouseDelayForm.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | public partial class SetMouseDelayForm : Form
4 | {
5 | public SetMouseDelayForm()
6 | {
7 | InitializeComponent();
8 | ComboBox_Mode.SelectedIndex = 0;
9 | }
10 | public string GetDelay()
11 | {
12 | return Txt_Delay.Text;
13 | }
14 | public string GetMode()
15 | {
16 | return ComboBox_Mode.Text;
17 | }
18 |
19 | private void LabelUInt_MouseDown(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseDown(sender, e);
20 | private void LabelUInt_MouseMove(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseMove(sender, e);
21 | private void LabelUInt_MouseUp(object sender, MouseEventArgs e) => Utils.LabelUInt_MouseUp(sender, e);
22 | private void TextBoxUInt_TextChanged(object sender, EventArgs e) => Utils.TextBoxUInt_TextChanged(sender, e);
23 | private void TextBoxUInt_KeyPress(object sender, KeyPressEventArgs e) => Utils.TextBoxUInt_KeyPress(sender, e);
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/OPTestTool/From/SetMouseDelayForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/SetPathForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class SetPathForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | button1 = new Button();
32 | button2 = new Button();
33 | label1 = new Label();
34 | Txt_Path = new TextBox();
35 | SuspendLayout();
36 | //
37 | // button1
38 | //
39 | button1.DialogResult = DialogResult.OK;
40 | button1.Location = new Point(165, 100);
41 | button1.Name = "button1";
42 | button1.Size = new Size(75, 23);
43 | button1.TabIndex = 1;
44 | button1.Text = "确定";
45 | button1.UseVisualStyleBackColor = true;
46 | //
47 | // button2
48 | //
49 | button2.DialogResult = DialogResult.Cancel;
50 | button2.Location = new Point(256, 100);
51 | button2.Name = "button2";
52 | button2.Size = new Size(75, 23);
53 | button2.TabIndex = 2;
54 | button2.Text = "取消";
55 | button2.UseVisualStyleBackColor = true;
56 | //
57 | // label1
58 | //
59 | label1.AutoSize = true;
60 | label1.Location = new Point(32, 39);
61 | label1.Name = "label1";
62 | label1.Size = new Size(35, 17);
63 | label1.TabIndex = 3;
64 | label1.Text = "路径:";
65 | //
66 | // Txt_Path
67 | //
68 | Txt_Path.AllowDrop = true;
69 | Txt_Path.Location = new Point(73, 36);
70 | Txt_Path.Name = "Txt_Path";
71 | Txt_Path.Size = new Size(376, 23);
72 | Txt_Path.TabIndex = 4;
73 | Txt_Path.DragDrop += Txt_Path_DragDrop;
74 | Txt_Path.DragEnter += Txt_Path_DragEnter;
75 | //
76 | // SetPathForm
77 | //
78 | AutoScaleDimensions = new SizeF(7F, 17F);
79 | AutoScaleMode = AutoScaleMode.Font;
80 | ClientSize = new Size(475, 144);
81 | Controls.Add(Txt_Path);
82 | Controls.Add(label1);
83 | Controls.Add(button2);
84 | Controls.Add(button1);
85 | MaximizeBox = false;
86 | MinimizeBox = false;
87 | Name = "SetPathForm";
88 | ShowIcon = false;
89 | StartPosition = FormStartPosition.CenterParent;
90 | Text = "请输入";
91 | Load += SetPathForm_Load;
92 | ResumeLayout(false);
93 | PerformLayout();
94 | }
95 |
96 | #endregion
97 | private Button button1;
98 | private Button button2;
99 | private Label label1;
100 | private TextBox Txt_Path;
101 | }
102 | }
--------------------------------------------------------------------------------
/OPTestTool/From/SetPathForm.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | public partial class SetPathForm : Form
4 | {
5 | private string curPath;
6 | public SetPathForm(string curPath)
7 | {
8 | this.curPath = curPath;
9 | InitializeComponent();
10 | }
11 | public string GetSelect()
12 | {
13 | return Txt_Path.Text;
14 | }
15 | private void SetPathForm_Load(object sender, EventArgs e)
16 | {
17 | Txt_Path.Text = curPath;
18 | }
19 |
20 | private void Txt_Path_DragEnter(object sender, DragEventArgs e) => Utils.TextBoxFileFolder_DragEnter(sender, e);
21 | private void Txt_Path_DragDrop(object sender, DragEventArgs e) => Utils.TextBoxFileFolder_DragDrop(sender, e);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/OPTestTool/From/SetPathForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/WriteDataForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class WriteDataForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | button1 = new Button();
32 | button2 = new Button();
33 | label2 = new Label();
34 | Txt_Value = new TextBox();
35 | SuspendLayout();
36 | //
37 | // button1
38 | //
39 | button1.DialogResult = DialogResult.OK;
40 | button1.Location = new Point(91, 132);
41 | button1.Name = "button1";
42 | button1.Size = new Size(75, 23);
43 | button1.TabIndex = 10;
44 | button1.Text = "确定";
45 | button1.UseVisualStyleBackColor = true;
46 | //
47 | // button2
48 | //
49 | button2.DialogResult = DialogResult.Cancel;
50 | button2.Location = new Point(207, 132);
51 | button2.Name = "button2";
52 | button2.Size = new Size(75, 23);
53 | button2.TabIndex = 11;
54 | button2.Text = "取消";
55 | button2.UseVisualStyleBackColor = true;
56 | //
57 | // label2
58 | //
59 | label2.AutoSize = true;
60 | label2.Location = new Point(5, 11);
61 | label2.Name = "label2";
62 | label2.Size = new Size(71, 17);
63 | label2.TabIndex = 5;
64 | label2.Text = "写入的内容:";
65 | //
66 | // Txt_Number
67 | //
68 | Txt_Value.Location = new Point(82, 8);
69 | Txt_Value.Multiline = true;
70 | Txt_Value.Name = "Txt_Number";
71 | Txt_Value.Size = new Size(213, 102);
72 | Txt_Value.TabIndex = 6;
73 | //
74 | // WriteDataForm
75 | //
76 | AutoScaleDimensions = new SizeF(7F, 17F);
77 | AutoScaleMode = AutoScaleMode.Font;
78 | ClientSize = new Size(337, 167);
79 | Controls.Add(label2);
80 | Controls.Add(Txt_Value);
81 | Controls.Add(button2);
82 | Controls.Add(button1);
83 | MaximizeBox = false;
84 | MinimizeBox = false;
85 | Name = "WriteDataForm";
86 | ShowIcon = false;
87 | StartPosition = FormStartPosition.CenterParent;
88 | Text = "请选择";
89 | ResumeLayout(false);
90 | PerformLayout();
91 | }
92 |
93 | #endregion
94 | private Button button1;
95 | private Button button2;
96 | private Label label2;
97 | private TextBox Txt_Value;
98 | }
99 | }
--------------------------------------------------------------------------------
/OPTestTool/From/WriteDataForm.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace OPTestTool
3 | {
4 | public partial class WriteDataForm : Form
5 | {
6 | public WriteDataForm()
7 | {
8 | InitializeComponent();
9 | }
10 |
11 | public string Context => Txt_Value.Text;
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/OPTestTool/From/WriteDataForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/WriteDoubleForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class WriteDoubleForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | button1 = new Button();
32 | button2 = new Button();
33 | label2 = new Label();
34 | Txt_Value = new TextBox();
35 | SuspendLayout();
36 | //
37 | // button1
38 | //
39 | button1.DialogResult = DialogResult.OK;
40 | button1.Location = new Point(77, 101);
41 | button1.Name = "button1";
42 | button1.Size = new Size(75, 23);
43 | button1.TabIndex = 10;
44 | button1.Text = "确定";
45 | button1.UseVisualStyleBackColor = true;
46 | //
47 | // button2
48 | //
49 | button2.DialogResult = DialogResult.Cancel;
50 | button2.Location = new Point(168, 101);
51 | button2.Name = "button2";
52 | button2.Size = new Size(75, 23);
53 | button2.TabIndex = 11;
54 | button2.Text = "取消";
55 | button2.UseVisualStyleBackColor = true;
56 | //
57 | // label2
58 | //
59 | label2.AutoSize = true;
60 | label2.Location = new Point(59, 48);
61 | label2.Name = "label2";
62 | label2.Size = new Size(59, 17);
63 | label2.TabIndex = 5;
64 | label2.Text = "写入的值:";
65 | //
66 | // Txt_Number
67 | //
68 | Txt_Value.Location = new Point(124, 45);
69 | Txt_Value.Name = "Txt_Number";
70 | Txt_Value.Size = new Size(129, 23);
71 | Txt_Value.TabIndex = 6;
72 | Txt_Value.Text = "0";
73 | //
74 | // WriteFloatForm
75 | //
76 | AutoScaleDimensions = new SizeF(7F, 17F);
77 | AutoScaleMode = AutoScaleMode.Font;
78 | ClientSize = new Size(307, 144);
79 | Controls.Add(Txt_Value);
80 | Controls.Add(label2);
81 | Controls.Add(button2);
82 | Controls.Add(button1);
83 | MaximizeBox = false;
84 | MinimizeBox = false;
85 | Name = "WriteFloatForm";
86 | ShowIcon = false;
87 | StartPosition = FormStartPosition.CenterParent;
88 | Text = "请选择";
89 | ResumeLayout(false);
90 | PerformLayout();
91 | }
92 |
93 | #endregion
94 | private Button button1;
95 | private Button button2;
96 | private Label label2;
97 | private TextBox Txt_Value;
98 | }
99 | }
--------------------------------------------------------------------------------
/OPTestTool/From/WriteDoubleForm.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace OPTestTool
3 | {
4 | public partial class WriteDoubleForm : Form
5 | {
6 | public WriteDoubleForm()
7 | {
8 | InitializeComponent();
9 | }
10 |
11 | public double Context()
12 | {
13 | if (double.TryParse(Txt_Value.Text, out var val))
14 | return val;
15 | else
16 | return 0f;
17 | }
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/OPTestTool/From/WriteDoubleForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/WriteFloatForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class WriteFloatForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | button1 = new Button();
32 | button2 = new Button();
33 | label2 = new Label();
34 | Txt_Value = new TextBox();
35 | SuspendLayout();
36 | //
37 | // button1
38 | //
39 | button1.DialogResult = DialogResult.OK;
40 | button1.Location = new Point(77, 101);
41 | button1.Name = "button1";
42 | button1.Size = new Size(75, 23);
43 | button1.TabIndex = 10;
44 | button1.Text = "确定";
45 | button1.UseVisualStyleBackColor = true;
46 | //
47 | // button2
48 | //
49 | button2.DialogResult = DialogResult.Cancel;
50 | button2.Location = new Point(168, 101);
51 | button2.Name = "button2";
52 | button2.Size = new Size(75, 23);
53 | button2.TabIndex = 11;
54 | button2.Text = "取消";
55 | button2.UseVisualStyleBackColor = true;
56 | //
57 | // label2
58 | //
59 | label2.AutoSize = true;
60 | label2.Location = new Point(59, 48);
61 | label2.Name = "label2";
62 | label2.Size = new Size(59, 17);
63 | label2.TabIndex = 5;
64 | label2.Text = "写入的值:";
65 | //
66 | // Txt_Number
67 | //
68 | Txt_Value.Location = new Point(124, 45);
69 | Txt_Value.Name = "Txt_Number";
70 | Txt_Value.Size = new Size(129, 23);
71 | Txt_Value.TabIndex = 6;
72 | Txt_Value.Text = "0";
73 | //
74 | // WriteFloatForm
75 | //
76 | AutoScaleDimensions = new SizeF(7F, 17F);
77 | AutoScaleMode = AutoScaleMode.Font;
78 | ClientSize = new Size(307, 144);
79 | Controls.Add(Txt_Value);
80 | Controls.Add(label2);
81 | Controls.Add(button2);
82 | Controls.Add(button1);
83 | MaximizeBox = false;
84 | MinimizeBox = false;
85 | Name = "WriteFloatForm";
86 | ShowIcon = false;
87 | StartPosition = FormStartPosition.CenterParent;
88 | Text = "请选择";
89 | ResumeLayout(false);
90 | PerformLayout();
91 | }
92 |
93 | #endregion
94 | private Button button1;
95 | private Button button2;
96 | private Label label2;
97 | private TextBox Txt_Value;
98 | }
99 | }
--------------------------------------------------------------------------------
/OPTestTool/From/WriteFloatForm.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace OPTestTool
3 | {
4 | public partial class WriteFloatForm : Form
5 | {
6 | public WriteFloatForm()
7 | {
8 | InitializeComponent();
9 | }
10 |
11 | public float Context()
12 | {
13 | if (float.TryParse(Txt_Value.Text, out var val))
14 | return val;
15 | else
16 | return 0f;
17 | }
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/OPTestTool/From/WriteFloatForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/WriteIntForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class WriteIntForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | radioButton3 = new RadioButton();
32 | radioButton1 = new RadioButton();
33 | button1 = new Button();
34 | button2 = new Button();
35 | label2 = new Label();
36 | Txt_Number = new TextBox();
37 | radioButton2 = new RadioButton();
38 | radioButton4 = new RadioButton();
39 | SuspendLayout();
40 | //
41 | // radioButton3
42 | //
43 | radioButton3.AutoSize = true;
44 | radioButton3.Location = new Point(104, 26);
45 | radioButton3.Name = "radioButton3";
46 | radioButton3.Size = new Size(52, 21);
47 | radioButton3.TabIndex = 2;
48 | radioButton3.TabStop = true;
49 | radioButton3.Tag = "+16";
50 | radioButton3.Text = "16位";
51 | radioButton3.UseVisualStyleBackColor = true;
52 | //
53 | // radioButton1
54 | //
55 | radioButton1.AutoSize = true;
56 | radioButton1.Checked = true;
57 | radioButton1.Location = new Point(46, 26);
58 | radioButton1.Name = "radioButton1";
59 | radioButton1.Size = new Size(52, 21);
60 | radioButton1.TabIndex = 1;
61 | radioButton1.TabStop = true;
62 | radioButton1.Tag = "+32";
63 | radioButton1.Text = "32位";
64 | radioButton1.UseVisualStyleBackColor = true;
65 | //
66 | // button1
67 | //
68 | button1.DialogResult = DialogResult.OK;
69 | button1.Location = new Point(77, 101);
70 | button1.Name = "button1";
71 | button1.Size = new Size(75, 23);
72 | button1.TabIndex = 10;
73 | button1.Text = "确定";
74 | button1.UseVisualStyleBackColor = true;
75 | //
76 | // button2
77 | //
78 | button2.DialogResult = DialogResult.Cancel;
79 | button2.Location = new Point(168, 101);
80 | button2.Name = "button2";
81 | button2.Size = new Size(75, 23);
82 | button2.TabIndex = 11;
83 | button2.Text = "取消";
84 | button2.UseVisualStyleBackColor = true;
85 | //
86 | // label2
87 | //
88 | label2.AutoSize = true;
89 | label2.Cursor = Cursors.SizeWE;
90 | label2.Location = new Point(66, 64);
91 | label2.Name = "label2";
92 | label2.Size = new Size(59, 17);
93 | label2.TabIndex = 5;
94 | label2.Tag = "Txt_Number";
95 | label2.Text = "写入的值:";
96 | label2.MouseDown += LabelInt_MouseDown;
97 | label2.MouseMove += LabelInt_MouseMove;
98 | label2.MouseUp += LabelInt_MouseUp;
99 | //
100 | // Txt_Number
101 | //
102 | Txt_Number.Location = new Point(131, 61);
103 | Txt_Number.Name = "Txt_Number";
104 | Txt_Number.Size = new Size(129, 23);
105 | Txt_Number.TabIndex = 6;
106 | Txt_Number.Text = "0";
107 | Txt_Number.TextChanged += TextBoxInt_TextChanged;
108 | Txt_Number.KeyPress += TextBoxInt_KeyPress;
109 | //
110 | // radioButton2
111 | //
112 | radioButton2.AutoSize = true;
113 | radioButton2.Location = new Point(162, 26);
114 | radioButton2.Name = "radioButton2";
115 | radioButton2.Size = new Size(45, 21);
116 | radioButton2.TabIndex = 3;
117 | radioButton2.TabStop = true;
118 | radioButton2.Tag = "+8";
119 | radioButton2.Text = "8位";
120 | radioButton2.UseVisualStyleBackColor = true;
121 | //
122 | // radioButton4
123 | //
124 | radioButton4.AutoSize = true;
125 | radioButton4.Location = new Point(213, 26);
126 | radioButton4.Name = "radioButton4";
127 | radioButton4.Size = new Size(52, 21);
128 | radioButton4.TabIndex = 4;
129 | radioButton4.TabStop = true;
130 | radioButton4.Tag = "+64";
131 | radioButton4.Text = "64位";
132 | radioButton4.UseVisualStyleBackColor = true;
133 | //
134 | // WriteIntForm
135 | //
136 | AutoScaleDimensions = new SizeF(7F, 17F);
137 | AutoScaleMode = AutoScaleMode.Font;
138 | ClientSize = new Size(307, 144);
139 | Controls.Add(radioButton4);
140 | Controls.Add(radioButton2);
141 | Controls.Add(Txt_Number);
142 | Controls.Add(label2);
143 | Controls.Add(button2);
144 | Controls.Add(button1);
145 | Controls.Add(radioButton3);
146 | Controls.Add(radioButton1);
147 | MaximizeBox = false;
148 | MinimizeBox = false;
149 | Name = "WriteIntForm";
150 | ShowIcon = false;
151 | StartPosition = FormStartPosition.CenterParent;
152 | Text = "请选择";
153 | ResumeLayout(false);
154 | PerformLayout();
155 | }
156 |
157 | #endregion
158 | private RadioButton radioButton3;
159 | private RadioButton radioButton1;
160 | private Button button1;
161 | private Button button2;
162 | private Label label2;
163 | private TextBox Txt_Number;
164 | private RadioButton radioButton2;
165 | private RadioButton radioButton4;
166 | }
167 | }
--------------------------------------------------------------------------------
/OPTestTool/From/WriteIntForm.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace OPTestTool
3 | {
4 | public partial class WriteIntForm : Form
5 | {
6 | public WriteIntForm()
7 | {
8 | InitializeComponent();
9 | }
10 | public string GetSelect()
11 | {
12 | foreach (var item in Controls)
13 | {
14 | var btn = item as RadioButton;
15 | if (btn == null)
16 | continue;
17 | if (btn.Checked)
18 | return btn.Tag as string;
19 | }
20 | return string.Empty;
21 | }
22 | public int Length => int.Parse(Txt_Number.Text);
23 |
24 | private void LabelInt_MouseDown(object sender, MouseEventArgs e) => Utils.LabelInt_MouseDown(sender, e);
25 | private void LabelInt_MouseMove(object sender, MouseEventArgs e) => Utils.LabelInt_MouseMove(sender, e);
26 | private void LabelInt_MouseUp(object sender, MouseEventArgs e) => Utils.LabelInt_MouseUp(sender, e);
27 | private void TextBoxInt_TextChanged(object sender, EventArgs e) => Utils.TextBoxInt_TextChanged(sender, e);
28 | private void TextBoxInt_KeyPress(object sender, KeyPressEventArgs e) => Utils.TextBoxInt_KeyPress(sender, e);
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/OPTestTool/From/WriteIntForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/From/WriteStringForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace OPTestTool
2 | {
3 | partial class WriteStringForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | radioButton3 = new RadioButton();
32 | radioButton1 = new RadioButton();
33 | button1 = new Button();
34 | button2 = new Button();
35 | label1 = new Label();
36 | label2 = new Label();
37 | Txt_Value = new TextBox();
38 | SuspendLayout();
39 | //
40 | // radioButton3
41 | //
42 | radioButton3.AutoSize = true;
43 | radioButton3.Location = new Point(186, 26);
44 | radioButton3.Name = "radioButton3";
45 | radioButton3.Size = new Size(74, 21);
46 | radioButton3.TabIndex = 2;
47 | radioButton3.TabStop = true;
48 | radioButton3.Tag = "utf-16";
49 | radioButton3.Text = "Unicode";
50 | radioButton3.UseVisualStyleBackColor = true;
51 | //
52 | // radioButton1
53 | //
54 | radioButton1.AutoSize = true;
55 | radioButton1.Checked = true;
56 | radioButton1.Location = new Point(117, 26);
57 | radioButton1.Name = "radioButton1";
58 | radioButton1.Size = new Size(51, 21);
59 | radioButton1.TabIndex = 1;
60 | radioButton1.TabStop = true;
61 | radioButton1.Tag = "gbk";
62 | radioButton1.Text = "GBK";
63 | radioButton1.UseVisualStyleBackColor = true;
64 | //
65 | // button1
66 | //
67 | button1.DialogResult = DialogResult.OK;
68 | button1.Location = new Point(77, 101);
69 | button1.Name = "button1";
70 | button1.Size = new Size(75, 23);
71 | button1.TabIndex = 10;
72 | button1.Text = "确定";
73 | button1.UseVisualStyleBackColor = true;
74 | //
75 | // button2
76 | //
77 | button2.DialogResult = DialogResult.Cancel;
78 | button2.Location = new Point(168, 101);
79 | button2.Name = "button2";
80 | button2.Size = new Size(75, 23);
81 | button2.TabIndex = 11;
82 | button2.Text = "取消";
83 | button2.UseVisualStyleBackColor = true;
84 | //
85 | // label1
86 | //
87 | label1.AutoSize = true;
88 | label1.Location = new Point(66, 28);
89 | label1.Name = "label1";
90 | label1.Size = new Size(35, 17);
91 | label1.TabIndex = 0;
92 | label1.Text = "编码:";
93 | //
94 | // label2
95 | //
96 | label2.AutoSize = true;
97 | label2.Location = new Point(42, 64);
98 | label2.Name = "label2";
99 | label2.Size = new Size(71, 17);
100 | label2.TabIndex = 3;
101 | label2.Text = "写入的内容:";
102 | //
103 | // Txt_Length
104 | //
105 | Txt_Value.Location = new Point(117, 61);
106 | Txt_Value.Name = "Txt_Length";
107 | Txt_Value.Size = new Size(178, 23);
108 | Txt_Value.TabIndex = 4;
109 | //
110 | // WriteStringForm
111 | //
112 | AutoScaleDimensions = new SizeF(7F, 17F);
113 | AutoScaleMode = AutoScaleMode.Font;
114 | ClientSize = new Size(307, 144);
115 | Controls.Add(Txt_Value);
116 | Controls.Add(label2);
117 | Controls.Add(label1);
118 | Controls.Add(button2);
119 | Controls.Add(button1);
120 | Controls.Add(radioButton3);
121 | Controls.Add(radioButton1);
122 | MaximizeBox = false;
123 | MinimizeBox = false;
124 | Name = "WriteStringForm";
125 | ShowIcon = false;
126 | StartPosition = FormStartPosition.CenterParent;
127 | Text = "请选择";
128 | ResumeLayout(false);
129 | PerformLayout();
130 | }
131 |
132 | #endregion
133 | private RadioButton radioButton3;
134 | private RadioButton radioButton1;
135 | private Button button1;
136 | private Button button2;
137 | private Label label1;
138 | private Label label2;
139 | private TextBox Txt_Value;
140 | }
141 | }
--------------------------------------------------------------------------------
/OPTestTool/From/WriteStringForm.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace OPTestTool
3 | {
4 | public partial class WriteStringForm : Form
5 | {
6 | public WriteStringForm()
7 | {
8 | InitializeComponent();
9 | }
10 | public string GetSelect()
11 | {
12 | foreach (var item in Controls)
13 | {
14 | var btn = item as RadioButton;
15 | if (btn == null)
16 | continue;
17 | if (btn.Checked)
18 | return btn.Tag as string;
19 | }
20 | return string.Empty;
21 | }
22 | public string Context => Txt_Value.Text;
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/OPTestTool/From/WriteStringForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/Lib/op_x64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/OPTestTool/Lib/op_x64.dll
--------------------------------------------------------------------------------
/OPTestTool/Lib/op_x86.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/OPTestTool/Lib/op_x86.dll
--------------------------------------------------------------------------------
/OPTestTool/MainForm.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/OPTestTool/MainForm.cs
--------------------------------------------------------------------------------
/OPTestTool/MainForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/OPTestTool/OPTestTool.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net7.0-windows
6 | disable
7 | true
8 | enable
9 | True
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Form
19 |
20 |
21 | Form
22 |
23 |
24 | Form
25 |
26 |
27 | Form
28 |
29 |
30 | Form
31 |
32 |
33 | Form
34 |
35 |
36 | Form
37 |
38 |
39 | Form
40 |
41 |
42 | Form
43 |
44 |
45 | Form
46 |
47 |
48 | Form
49 |
50 |
51 | Form
52 |
53 |
54 | Form
55 |
56 |
57 | Form
58 |
59 |
60 | True
61 | True
62 | Resources.resx
63 |
64 |
65 |
66 |
67 |
68 | ResXFileCodeGenerator
69 | Resources.Designer.cs
70 |
71 |
72 |
73 |
74 |
75 | PreserveNewest
76 |
77 |
78 | PreserveNewest
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/OPTestTool/Program.cs:
--------------------------------------------------------------------------------
1 | using System.Text;
2 |
3 | namespace OPTestTool
4 | {
5 | internal static class Program
6 | {
7 | ///
8 | /// The main entry point for the application.
9 | ///
10 | [STAThread]
11 | static void Main()
12 | {
13 | Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
14 | // To customize application configuration such as set high DPI settings or default font,
15 | // see https://aka.ms/applicationconfiguration.
16 | ApplicationConfiguration.Initialize();
17 | Application.Run(new MainForm());
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/OPTestTool/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace OPTestTool.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OPTestTool.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 重写当前线程的 CurrentUICulture 属性,对
51 | /// 使用此强类型资源类的所有资源查找执行重写。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
65 | ///
66 | internal static System.Drawing.Bitmap Desktop {
67 | get {
68 | object obj = ResourceManager.GetObject("Desktop", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
75 | ///
76 | internal static System.Drawing.Bitmap HiddenWindow {
77 | get {
78 | object obj = ResourceManager.GetObject("HiddenWindow", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// 查找类似 // libop的声明
85 | ////*
86 | ///所有op的开放接口都从此cpp类衍生而出
87 | ///*/
88 | ///#pragma once
89 | ///#include <string>
90 | /////forward declare
91 | /////class WinApi;
92 | /////class opBackground;
93 | /////class ImageProc;
94 | ///struct op_context;
95 | ///
96 | ///#ifdef U_STATIC_IMPLEMENTATION
97 | ///#define OP_API
98 | ///#else
99 | ///#ifndef OP_API
100 | ///#if defined(OP_EXPORTS)
101 | ///#define OP_API __declspec(dllexport)
102 | ///#else
103 | ///#define OP_API __declspec(dllimport)
104 | ///#endif
105 | ///#endif
106 | ///#endif
107 | ///// libop
108 | ///#undef FindWindow
109 | ///#undef FindWindowEx
110 | ///#undef SetWindowText
111 | ///
112 | ///class OP_API libop{
113 | ///
114 | ///public:
115 | ///
116 | /// libop();
117 | /// ~libop(); [字符串的其余部分被截断]"; 的本地化字符串。
118 | ///
119 | internal static string libop {
120 | get {
121 | return ResourceManager.GetString("libop", resourceCulture);
122 | }
123 | }
124 |
125 | ///
126 | /// 查找类似 // op.idl: op 的 IDL 源
127 | /////
128 | ///
129 | ///// 此文件将由 MIDL 工具处理以
130 | ///// 生成类型库(op.tlb)和封送处理代码。
131 | ///
132 | ///import "oaidl.idl";
133 | ///import "ocidl.idl";
134 | /////
135 | /////[
136 | ///// object,
137 | ///// uuid(a817e7a2-43fa-11d0-9e44-00aa00b6770a),
138 | ///// dual,
139 | ///// pointer_default(unique)
140 | /////]
141 | /////interface IComponentRegistrar : IDispatch
142 | /////{
143 | ///// [id(1)] HRESULT Attach([in] BSTR bstrPath);
144 | ///// [id(2)] HRESULT RegisterAll();
145 | ///// [id(3)] HRESULT UnregisterAll();
146 | ///// [id(4)] HRESULT GetComponents([out] SAFEARRAY(BSTR)* pbstrCLSIDs, [out] SAFEARRAY(BSTR)* pbstrDescriptions) [字符串的其余部分被截断]"; 的本地化字符串。
147 | ///
148 | internal static string op {
149 | get {
150 | return ResourceManager.GetString("op", resourceCulture);
151 | }
152 | }
153 |
154 | ///
155 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
156 | ///
157 | internal static System.Drawing.Bitmap Window {
158 | get {
159 | object obj = ResourceManager.GetObject("Window", resourceCulture);
160 | return ((System.Drawing.Bitmap)(obj));
161 | }
162 | }
163 | }
164 | }
165 |
--------------------------------------------------------------------------------
/OPTestTool/Resources/Desktop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/OPTestTool/Resources/Desktop.png
--------------------------------------------------------------------------------
/OPTestTool/Resources/HiddenWindow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/OPTestTool/Resources/HiddenWindow.png
--------------------------------------------------------------------------------
/OPTestTool/Resources/Window.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/OPTestTool/Resources/Window.png
--------------------------------------------------------------------------------
/OPTestTool/Scripts/Logger.cs:
--------------------------------------------------------------------------------
1 | using System.Text;
2 |
3 | namespace OPTestTool
4 | {
5 | public enum LogType
6 | {
7 | Log = 1,
8 | Warning,
9 | Error,
10 | Exception
11 | }
12 | public static class Logger
13 | {
14 | public static event Action LogMessageReceived;
15 | private static readonly ThreadLocal stringBuilder = new ThreadLocal();
16 | public static void Log(string msg)
17 | {
18 | if (LogMessageReceived != null)
19 | {
20 | LogMessageReceived(LogType.Log, (msg != null) ? msg.ToString() : "[null]");
21 | return;
22 | }
23 | if (stringBuilder.Value == null)
24 | {
25 | stringBuilder.Value = new StringBuilder();
26 | }
27 | stringBuilder.Value.Clear();
28 | stringBuilder.Value.AppendFormat("{0:HH:mm:ss} ", DateTime.Now);
29 | stringBuilder.Value.Append((msg != null) ? msg.ToString() : "[null]");
30 | string text = stringBuilder.ToString();
31 | System.Diagnostics.Debug.WriteLine("[logr] " + text);
32 | }
33 | public static void LogWarning(object msg)
34 | {
35 | if (LogMessageReceived != null)
36 | {
37 | LogMessageReceived(LogType.Warning, (msg != null) ? msg.ToString() : "[null]");
38 | return;
39 | }
40 | if (stringBuilder.Value == null)
41 | {
42 | stringBuilder.Value = new StringBuilder();
43 | }
44 | stringBuilder.Value.Clear();
45 | stringBuilder.Value.AppendFormat("{0:HH:mm:ss} ", DateTime.Now);
46 | stringBuilder.Value.Append((msg != null) ? msg.ToString() : "[null]");
47 | string text = stringBuilder.ToString();
48 | System.Diagnostics.Debug.WriteLine("[Warn] " + text);
49 | }
50 | public static void LogError(string msg)
51 | {
52 | if (LogMessageReceived != null)
53 | {
54 | LogMessageReceived(LogType.Error, (msg != null) ? msg.ToString() : "[null]");
55 | return;
56 | }
57 | if (stringBuilder.Value == null)
58 | {
59 | stringBuilder.Value = new StringBuilder();
60 | }
61 | stringBuilder.Value.Clear();
62 | stringBuilder.Value.AppendFormat("{0:HH:mm:ss} ", DateTime.Now);
63 | stringBuilder.Value.Append((msg != null) ? msg.ToString() : "[null]");
64 | string text = stringBuilder.ToString();
65 | System.Diagnostics.Debug.WriteLine("[Eror] " + text);
66 | }
67 | public static void LogException(Exception exception)
68 | {
69 | if (LogMessageReceived != null)
70 | {
71 | LogMessageReceived(LogType.Exception, exception.Message + "\n" + exception.StackTrace);
72 | return;
73 | }
74 | if (stringBuilder.Value == null)
75 | {
76 | stringBuilder.Value = new StringBuilder();
77 | }
78 | stringBuilder.Value.Clear();
79 | stringBuilder.Value.AppendFormat("{0:HH:mm:ss} ", DateTime.Now);
80 | stringBuilder.Value.Append(exception.Message + "\n" + exception.StackTrace);
81 | string text = stringBuilder.ToString();
82 | System.Diagnostics.Debug.WriteLine("[Exce] " + text);
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Overview
2 | ===========
3 | OPTestTool([OP](https://github.com/WallBreaker2/op) & Export)是一个OP的绑定测试工具.主要功能有:窗口句柄查看、绑定窗口测试、找图找色测试、鼠标测试、键盘测试、文本输入测试、内存读写测试、[OPExport](https://github.com/flaot/OPExport)的GUI
4 |
5 | OPTestTool是为OP在不同环境下的快捷测试工具,不局限于某个APP。它可以帮助开发者和用户快捷测试OP的常用功能,例如在工具中用不同的绑定模式去绑定窗口等。
6 | ## 功能特色
7 | - 快捷查看指定窗口句柄、窗口类名、窗口标题
8 | - 测试OP与某个APP的交互
9 | - 生成开发者快捷调用OP的胶水代码的操作界面
10 |
11 | ## 交流
12 | * QQ group:743710486
13 | * [Discussion](https://github.com/WallBreaker2/op/discussions)
14 |
15 | ## 编译
16 |
17 | ### 编译环境
18 | * 操作系统: Visual Studio 2022
19 | * 目标框架:.NET 7.0
20 |
21 |
--------------------------------------------------------------------------------
/WindowFinder/LocationFinder/LocationFinder.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WindowFinder
2 | {
3 | partial class LocationFinder
4 | {
5 | ///
6 | ///
7 | /// true to release both managed and unmanaged resources; false to release only unmanaged resources.
8 | protected override void Dispose(bool disposing)
9 | {
10 | if(disposing)
11 | {
12 | if(components != null)
13 | components.Dispose();
14 | }
15 | base.Dispose(disposing);
16 | }
17 |
18 | #region Component Designer generated code
19 |
20 | ///
21 | /// Required method for Designer support - do not modify
22 | /// the contents of this method with the code editor.
23 | ///
24 | private void InitializeComponent()
25 | {
26 | this.picTarget = new System.Windows.Forms.PictureBox();
27 | this.SuspendLayout();
28 | //
29 | // picTarget
30 | //
31 | this.picTarget.BackColor = System.Drawing.Color.White;
32 | this.picTarget.Name = "picTarget";
33 | this.picTarget.Size = new System.Drawing.Size(92, 104);
34 | this.picTarget.TabIndex = 0;
35 | this.picTarget.TabStop = false;
36 | this.picTarget.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picTarget_MouseUp);
37 | this.picTarget.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picTarget_MouseMove);
38 | this.picTarget.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picTarget_MouseDown);
39 | //
40 | // WindowFinder
41 | //
42 | this.Controls.AddRange(new System.Windows.Forms.Control[] {
43 | this.picTarget});
44 | this.Name = "WindowFinder";
45 | this.Size = new System.Drawing.Size(272, 216);
46 | this.Load += new System.EventHandler(this.WindowFinder_Load);
47 | this.ResumeLayout(false);
48 |
49 | }
50 |
51 | #endregion
52 |
53 | ///
54 | /// Required designer variable.
55 | ///
56 | private System.ComponentModel.IContainer components;
57 | private System.Windows.Forms.PictureBox picTarget;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/WindowFinder/LocationFinder/LocationFinder.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/WindowFinder/LocationFinder/LocationFinder.cs
--------------------------------------------------------------------------------
/WindowFinder/LocationFinder/LocationFinder.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | text/microsoft-resx
89 |
90 |
91 | 1.3
92 |
93 |
94 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
95 |
96 |
97 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
98 |
99 |
100 | WindowFinder
101 |
102 |
--------------------------------------------------------------------------------
/WindowFinder/LocationFinder/LocationFinderDesigner.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2014, Joe Esposito
3 |
4 | Permission to use, copy, modify, and/or distribute this software for any
5 | purpose with or without fee is hereby granted, provided that the above
6 | copyright notice and this permission notice appear in all copies.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 | using System.Windows.Forms.Design;
17 |
18 | namespace WindowFinder
19 | {
20 | public class LocationFinderDesigner : ControlDesigner
21 | {
22 | public override SelectionRules SelectionRules
23 | {
24 | get
25 | {
26 | return (SelectionRules.Moveable | SelectionRules.Visible);
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/WindowFinder/LocationFinder/ResourceLocationFinder.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2014, Joe Esposito
3 |
4 | Permission to use, copy, modify, and/or distribute this software for any
5 | purpose with or without fee is hereby granted, provided that the above
6 | copyright notice and this permission notice appear in all copies.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 | ///
17 | /// Finds a resource within the project.
18 | ///
19 | internal class ResourceLocationFinder
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/WindowFinder/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 |
3 | //
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | //
8 | [assembly: AssemblyTitle("WindowFinder")]
9 | [assembly: AssemblyDescription("WindowFinder control, used to find window handles via the mouse.")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("WindowFinder")]
13 | [assembly: AssemblyCopyright("")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //
18 | // Version information for an assembly consists of the following four values:
19 | //
20 | // Major Version
21 | // Minor Version
22 | // Build Number
23 | // Revision
24 | //
25 | // You can specify all the values or you can default the Revision and Build Numbers
26 | // by using the '*' as shown below:
27 |
28 | [assembly: AssemblyVersion("1.1.0.0")]
29 |
--------------------------------------------------------------------------------
/WindowFinder/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WindowFinder.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowFinder.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 重写当前线程的 CurrentUICulture 属性,对
51 | /// 使用此强类型资源类的所有资源查找执行重写。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
65 | ///
66 | internal static System.Drawing.Bitmap bmpFind {
67 | get {
68 | object obj = ResourceManager.GetObject("bmpFind", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
75 | ///
76 | internal static System.Drawing.Bitmap bmpFinda {
77 | get {
78 | object obj = ResourceManager.GetObject("bmpFinda", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
85 | ///
86 | internal static System.Drawing.Bitmap bmpLocationFind {
87 | get {
88 | object obj = ResourceManager.GetObject("bmpLocationFind", resourceCulture);
89 | return ((System.Drawing.Bitmap)(obj));
90 | }
91 | }
92 |
93 | ///
94 | /// 查找 System.Byte[] 类型的本地化资源。
95 | ///
96 | internal static byte[] curFindTarget {
97 | get {
98 | object obj = ResourceManager.GetObject("curFindTarget", resourceCulture);
99 | return ((byte[])(obj));
100 | }
101 | }
102 |
103 | ///
104 | /// 查找 System.Byte[] 类型的本地化资源。
105 | ///
106 | internal static byte[] curLocationFindTarget {
107 | get {
108 | object obj = ResourceManager.GetObject("curLocationFindTarget", resourceCulture);
109 | return ((byte[])(obj));
110 | }
111 | }
112 |
113 | ///
114 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
115 | ///
116 | internal static System.Drawing.Bitmap WindowFinder {
117 | get {
118 | object obj = ResourceManager.GetObject("WindowFinder", resourceCulture);
119 | return ((System.Drawing.Bitmap)(obj));
120 | }
121 | }
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/WindowFinder/Resources/WindowFinder.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/WindowFinder/Resources/WindowFinder.bmp
--------------------------------------------------------------------------------
/WindowFinder/Resources/bmpFind.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/WindowFinder/Resources/bmpFind.bmp
--------------------------------------------------------------------------------
/WindowFinder/Resources/bmpFinda.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/WindowFinder/Resources/bmpFinda.bmp
--------------------------------------------------------------------------------
/WindowFinder/Resources/bmpLocationFind.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/WindowFinder/Resources/bmpLocationFind.bmp
--------------------------------------------------------------------------------
/WindowFinder/Resources/curFindTarget.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/WindowFinder/Resources/curFindTarget.cur
--------------------------------------------------------------------------------
/WindowFinder/Resources/curLocationFindTarget.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/WindowFinder/Resources/curLocationFindTarget.cur
--------------------------------------------------------------------------------
/WindowFinder/WindowFinder.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Local
5 | 9.0.21022
6 | 2.0
7 | {84F4C41B-6887-4CDF-AC1C-E9C3AE1378A1}
8 | Debug
9 | AnyCPU
10 |
11 |
12 |
13 |
14 | WindowFinder
15 |
16 |
17 | JScript
18 | Grid
19 | IE50
20 | false
21 | Library
22 | WindowFinder
23 |
24 |
25 |
26 |
27 | 3.5
28 |
29 |
30 | v2.0
31 |
32 |
33 | ..\Bin\
34 | true
35 | 285212672
36 | false
37 |
38 |
39 | DEBUG;TRACE
40 | ..\Bin\WindowFinder.xml
41 | true
42 | 4096
43 | false
44 | false
45 | false
46 | false
47 | 4
48 | full
49 | prompt
50 |
51 |
52 | ..\Bin\
53 | true
54 | 285212672
55 | false
56 |
57 |
58 | TRACE
59 | ..\Bin\WindowFinder.xml
60 | false
61 | 4096
62 | true
63 | false
64 | false
65 | false
66 | 4
67 | none
68 | prompt
69 |
70 |
71 |
72 | System
73 |
74 |
75 | System.Data
76 |
77 |
78 | System.Design
79 |
80 |
81 | System.Drawing
82 |
83 |
84 | System.Windows.Forms
85 |
86 |
87 | System.XML
88 |
89 |
90 |
91 |
92 | Code
93 |
94 |
95 | True
96 | True
97 | Resources.resx
98 |
99 |
100 |
101 |
102 | Code
103 |
104 |
105 | UserControl
106 |
107 |
108 | LocationFinder.cs
109 |
110 |
111 | UserControl
112 |
113 |
114 | WindowFinder.cs
115 |
116 |
117 |
118 | Code
119 |
120 |
121 | ResXFileCodeGenerator
122 | Designer
123 | Resources.Designer.cs
124 |
125 |
126 | LocationFinder.cs
127 |
128 |
129 | WindowFinder.cs
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
--------------------------------------------------------------------------------
/WindowFinder/WindowFinder/ResourceFinder.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2014, Joe Esposito
3 |
4 | Permission to use, copy, modify, and/or distribute this software for any
5 | purpose with or without fee is hereby granted, provided that the above
6 | copyright notice and this permission notice appear in all copies.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 |
18 | ///
19 | /// Finds a resource within the project.
20 | ///
21 | internal class ResourceFinder
22 | {
23 | }
24 |
--------------------------------------------------------------------------------
/WindowFinder/WindowFinder/WindowFinder.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WindowFinder
2 | {
3 | partial class WindowFinder
4 | {
5 | ///
6 | ///
7 | /// true to release both managed and unmanaged resources; false to release only unmanaged resources.
8 | protected override void Dispose(bool disposing)
9 | {
10 | if(disposing)
11 | {
12 | if(components != null)
13 | components.Dispose();
14 | }
15 | base.Dispose(disposing);
16 | }
17 |
18 | #region Component Designer generated code
19 |
20 | ///
21 | /// Required method for Designer support - do not modify
22 | /// the contents of this method with the code editor.
23 | ///
24 | private void InitializeComponent()
25 | {
26 | this.picTarget = new System.Windows.Forms.PictureBox();
27 | this.SuspendLayout();
28 | //
29 | // picTarget
30 | //
31 | this.picTarget.BackColor = System.Drawing.Color.White;
32 | this.picTarget.Name = "picTarget";
33 | this.picTarget.Size = new System.Drawing.Size(92, 104);
34 | this.picTarget.TabIndex = 0;
35 | this.picTarget.TabStop = false;
36 | this.picTarget.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picTarget_MouseUp);
37 | this.picTarget.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picTarget_MouseMove);
38 | this.picTarget.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picTarget_MouseDown);
39 | //
40 | // WindowFinder
41 | //
42 | this.Controls.AddRange(new System.Windows.Forms.Control[] {
43 | this.picTarget});
44 | this.Name = "WindowFinder";
45 | this.Size = new System.Drawing.Size(272, 216);
46 | this.Load += new System.EventHandler(this.WindowFinder_Load);
47 | this.ResumeLayout(false);
48 |
49 | }
50 |
51 | #endregion
52 |
53 | ///
54 | /// Required designer variable.
55 | ///
56 | private System.ComponentModel.IContainer components;
57 | private System.Windows.Forms.PictureBox picTarget;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/WindowFinder/WindowFinder/WindowFinder.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flaot/OPTestTool/15f416da4ee189ed9a70c7310c51e82e7bede383/WindowFinder/WindowFinder/WindowFinder.cs
--------------------------------------------------------------------------------
/WindowFinder/WindowFinder/WindowFinder.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | text/microsoft-resx
89 |
90 |
91 | 1.3
92 |
93 |
94 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
95 |
96 |
97 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
98 |
99 |
100 | WindowFinder
101 |
102 |
--------------------------------------------------------------------------------
/WindowFinder/WindowFinder/WindowFinderDesigner.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2014, Joe Esposito
3 |
4 | Permission to use, copy, modify, and/or distribute this software for any
5 | purpose with or without fee is hereby granted, provided that the above
6 | copyright notice and this permission notice appear in all copies.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 | using System.Windows.Forms.Design;
17 |
18 | namespace WindowFinder
19 | {
20 | public class WindowFinderDesigner : ControlDesigner
21 | {
22 | public override SelectionRules SelectionRules
23 | {
24 | get
25 | {
26 | return (SelectionRules.Moveable | SelectionRules.Visible);
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------