├── README.md
├── Imitate
├── App.config
├── Properties
│ ├── Settings.settings
│ ├── AssemblyInfo.cs
│ ├── Settings.Designer.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Program.cs
├── Form1.cs
├── Imitate.csproj
├── Form1.resx
└── Form1.Designer.cs
├── ImitateLib
├── Properties
│ └── AssemblyInfo.cs
├── KeyBoard.cs
├── ImitateLib.csproj
└── Mouse.cs
├── LICENSE
├── Imitate.sln
└── .gitignore
/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/js94766524/Win_Imitate/HEAD/README.md
--------------------------------------------------------------------------------
/Imitate/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Imitate/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Imitate/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Imitate
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Imitate/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Imitate")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Imitate")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("f6fac63d-69ba-4a12-b098-270681567890")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ImitateLib/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("ImitateLib")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ImitateLib")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("32e17541-0d31-4016-9622-1d4305cd7275")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Jack Stone
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 |
--------------------------------------------------------------------------------
/Imitate/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Imitate.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ImitateLib/KeyBoard.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 |
8 | namespace ImitateLib
9 | {
10 | public static class Keyboard
11 | {
12 | [System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "keybd_event", SetLastError = true)]
13 | public static extern void keybd_event(Keys bVk, byte bScan, uint dwFlags, uint dwExtraInfo);
14 |
15 | public static void Press(params Keys[] inputs)
16 | {
17 | foreach (Keys key in inputs)
18 | {
19 | keybd_event(key, 0, 0, 0);
20 | }
21 | }
22 |
23 | public static void Ctrl(params Keys[] keys)
24 | {
25 | keybd_event(Keys.ControlKey, 0, 0, 0);
26 | Press(keys);
27 | keybd_event(Keys.ControlKey, 0, 2, 0);
28 | }
29 |
30 | public static void Alt(params Keys[] keys)
31 | {
32 | keybd_event(Keys.Alt, 0, 0, 0);
33 | Press(keys);
34 | keybd_event(Keys.Alt, 0, 2, 0);
35 | }
36 |
37 | public static void Shift(params Keys[] keys)
38 | {
39 | keybd_event(Keys.ShiftKey, 0, 0, 0);
40 | Press(keys);
41 | keybd_event(Keys.ShiftKey, 0, 2, 0);
42 | }
43 |
44 | public static void InputByClipboard(string data)
45 | {
46 | Clipboard.SetDataObject(data,false);
47 | Ctrl(Keys.V);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Imitate.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26430.16
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Imitate", "Imitate\Imitate.csproj", "{78164F8F-D748-4096-ABDB-5A4A6CD9AD32}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImitateLib", "ImitateLib\ImitateLib.csproj", "{EC8F2050-3BEA-4E74-950D-7183992E48BA}"
9 | EndProject
10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BC372065-0DC2-4597-AC46-827F7F594C87}"
11 | ProjectSection(SolutionItems) = preProject
12 | README.md = README.md
13 | EndProjectSection
14 | EndProject
15 | Global
16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
17 | Debug|Any CPU = Debug|Any CPU
18 | Release|Any CPU = Release|Any CPU
19 | EndGlobalSection
20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
21 | {78164F8F-D748-4096-ABDB-5A4A6CD9AD32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22 | {78164F8F-D748-4096-ABDB-5A4A6CD9AD32}.Debug|Any CPU.Build.0 = Debug|Any CPU
23 | {78164F8F-D748-4096-ABDB-5A4A6CD9AD32}.Release|Any CPU.ActiveCfg = Release|Any CPU
24 | {78164F8F-D748-4096-ABDB-5A4A6CD9AD32}.Release|Any CPU.Build.0 = Release|Any CPU
25 | {EC8F2050-3BEA-4E74-950D-7183992E48BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26 | {EC8F2050-3BEA-4E74-950D-7183992E48BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
27 | {EC8F2050-3BEA-4E74-950D-7183992E48BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
28 | {EC8F2050-3BEA-4E74-950D-7183992E48BA}.Release|Any CPU.Build.0 = Release|Any CPU
29 | EndGlobalSection
30 | GlobalSection(SolutionProperties) = preSolution
31 | HideSolutionNode = FALSE
32 | EndGlobalSection
33 | EndGlobal
34 |
--------------------------------------------------------------------------------
/Imitate/Form1.cs:
--------------------------------------------------------------------------------
1 | using ImitateLib;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Data;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace Imitate
14 | {
15 | public partial class Form1 : Form
16 | {
17 | public Form1()
18 | {
19 | InitializeComponent();
20 | }
21 |
22 |
23 | private void button1_Click(object sender, EventArgs e)
24 | {
25 | webBrowser1.Navigate("http://huodong.37.com/zt/publish/pc/275/cqfg2017021620170216/index.html?refer=baidu_tg&ad_param=35483cqhuaijiu&bid=&wd=JUU0JUI4JTgwJUU1JTg4JTgwOTk5JUU3JUJBJUE3JUU0JUJDJUEwJUU1JUE1JTg3&landingpage=http%3A%2F%2Fbdtg.37.com%2Fs%2F1%2F296%2F28108.html%3Fuid%3D2738335&ext=1%7C296%7C28108%7C2738335%7C0&uid=2738335");
26 |
27 | }
28 |
29 | private void button2_Click(object sender, EventArgs e)
30 | {
31 | var p = PointToScreen(webBrowser1.Location);
32 | webBrowser1.Focus();
33 | Mouse.MoveTo(p.X + 400, p.Y + 310);
34 | Mouse.LeftClick();
35 | Keyboard.InputByClipboard("what are you 弄啥咧");
36 | Mouse.WheelRoll(10);
37 | }
38 |
39 | private void Form1_Load(object sender, EventArgs e)
40 | {
41 | toolStripProgressBar1.Maximum = 1000;
42 | webBrowser1.StatusTextChanged += (s, arg) => { toolStripStatusLabel1.Text = webBrowser1.StatusText; };
43 | webBrowser1.ProgressChanged += (s, arg) =>
44 | {
45 | var c = 1.0 * arg.CurrentProgress / arg.MaximumProgress;
46 | if (c < 0) c = 0;
47 | if (c > 1) c = 1;
48 | if (arg.MaximumProgress == 0) c = 0;
49 | toolStripProgressBar1.Value = (int)(c * 1000);
50 | };
51 |
52 | System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
53 | timer.Interval = 20;
54 | timer.Tick += (s, args) =>
55 | {
56 | var l = webBrowser1.Location;
57 | var p = PointToClient(MousePosition);
58 | toolStripStatusLabel2.Text = (p.X - l.X) + " , " + (p.Y - l.Y);
59 | };
60 | timer.Start();
61 | }
62 |
63 | private void button1_Click_1(object sender, EventArgs e)
64 | {
65 | webBrowser1.Navigate(textBox1.Text.Trim());
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/ImitateLib/ImitateLib.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {EC8F2050-3BEA-4E74-950D-7183992E48BA}
8 | Library
9 | Properties
10 | ImitateLib
11 | ImitateLib
12 | v4.5
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
56 |
--------------------------------------------------------------------------------
/Imitate/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Imitate.Properties
12 | {
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", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的、缓存的 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Imitate.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 为所有资源查找重写当前线程的 CurrentUICulture 属性,
56 | /// 方法是使用此强类型资源类。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/ImitateLib/Mouse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Drawing;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace ImitateLib
9 | {
10 | public static class Mouse
11 | {
12 | #region Base
13 |
14 | const int MOVE = 0x0001; //移动鼠标
15 | const int LEFTDOWN = 0x0002; //模拟鼠标左键按下
16 | const int LEFTUP = 0x0004; //模拟鼠标左键抬起
17 | const int RIGHTDOWN = 0x0008; //模拟鼠标右键按下
18 | const int RIGHTUP = 0x0010; //模拟鼠标右键抬起
19 | const int MIDDLEDOWN = 0x0020; //模拟鼠标中键按下
20 | const int MIDDLEUP = 0x0040; //模拟鼠标中键抬起
21 | const int WHEEL = 0x0800; //模拟鼠标滚轮滚动
22 | const int ABSOLUTE = 0x8000; //标示是否采用绝对坐标
23 |
24 | readonly static int WIDTH; //屏幕宽度
25 | readonly static int HEIGHT; //屏幕高度
26 |
27 | [System.Runtime.InteropServices.DllImport("user32")]
28 | private static extern int mouse_event( int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo );
29 |
30 | static Mouse()
31 | {
32 | try
33 | {
34 | System.Windows.Forms.Screen screen = System.Windows.Forms.Screen.PrimaryScreen;
35 | Rectangle b = screen.Bounds;
36 | WIDTH = b.Width;
37 | HEIGHT = b.Height;
38 |
39 | }
40 | catch
41 | {
42 | WIDTH = 65536;
43 | HEIGHT = 65536;
44 | }
45 | }
46 |
47 | #endregion
48 |
49 | #region Methods
50 |
51 | ///
52 | /// 左键单击
53 | ///
54 | public static void LeftClick( int dx = 0, int dy = 0 )
55 | {
56 | mouse_event(LEFTDOWN | LEFTUP, dx * 65536 / WIDTH, dy * 65536 / HEIGHT, 0, 0);
57 | }
58 |
59 | ///
60 | /// 右键单击
61 | ///
62 | public static void RightClick( int dx = 0, int dy = 0 )
63 | {
64 | mouse_event(RIGHTDOWN | RIGHTUP, dx * 65536 / WIDTH, dy * 65536 / HEIGHT, 0, 0);
65 | }
66 |
67 | ///
68 | /// 中键单击
69 | ///
70 | public static void MiddleClick( int dx = 0, int dy = 0 )
71 | {
72 | mouse_event(MIDDLEDOWN | MIDDLEUP, dx * 65536 / WIDTH, dy * 65536 / HEIGHT, 0, 0);
73 | }
74 |
75 | ///
76 | /// 移动鼠标到指定位置
77 | ///
78 | public static void MoveTo( int dx, int dy )
79 | {
80 | mouse_event(ABSOLUTE | MOVE, dx * 65536 / WIDTH, dy * 65536 / HEIGHT, 0, 0);
81 | }
82 |
83 | ///
84 | /// 拖拽到指定位置
85 | ///
86 | public static void DragTo( int dx, int dy )
87 | {
88 | mouse_event(LEFTDOWN, 0, 0, 0, 0);
89 | MoveTo(dx, dy);
90 | mouse_event(LEFTUP, 0, 0, 0, 0);
91 | }
92 |
93 | ///
94 | /// 按照一个向量移动
95 | ///
96 | public static void MoveTowards( int dx, int dy )
97 | {
98 | mouse_event(MOVE, dx * 65536 / WIDTH, dy * 65536 / HEIGHT, 0, 0);
99 | }
100 |
101 | ///
102 | /// 按照一个向量拖拽
103 | ///
104 | public static void DragTowards( int dx, int dy )
105 | {
106 | mouse_event(LEFTDOWN, 0, 0, 0, 0);
107 | MoveTowards(dx, dy);
108 | mouse_event(LEFTUP, 0, 0, 0, 0);
109 | }
110 |
111 | ///
112 | /// 滚动鼠标滚轮
113 | ///
114 | /// 正数为向下滚动,负数为向上滚动,数值为滚动距离
115 | public static void WheelRoll( int towards )
116 | {
117 | mouse_event(WHEEL, 0, 0, -towards, 0);
118 | }
119 |
120 | #endregion
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/Imitate/Imitate.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {78164F8F-D748-4096-ABDB-5A4A6CD9AD32}
8 | WinExe
9 | Properties
10 | Imitate
11 | Imitate
12 | v4.5
13 | 512
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | Form
49 |
50 |
51 | Form1.cs
52 |
53 |
54 |
55 |
56 | Form1.cs
57 |
58 |
59 | ResXFileCodeGenerator
60 | Resources.Designer.cs
61 | Designer
62 |
63 |
64 | True
65 | Resources.resx
66 |
67 |
68 | SettingsSingleFileGenerator
69 | Settings.Designer.cs
70 |
71 |
72 | True
73 | Settings.settings
74 | True
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | {ec8f2050-3bea-4e74-950d-7183992e48ba}
83 | ImitateLib
84 |
85 |
86 |
87 |
94 |
--------------------------------------------------------------------------------
/Imitate/Properties/Resources.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 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # User-specific files (MonoDevelop/Xamarin Studio)
13 | *.userprefs
14 |
15 | # Build results
16 | [Dd]ebug/
17 | [Dd]ebugPublic/
18 | [Rr]elease/
19 | [Rr]eleases/
20 | x64/
21 | x86/
22 | bld/
23 | [Bb]in/
24 | [Oo]bj/
25 | [Ll]og/
26 |
27 | # Visual Studio 2015 cache/options directory
28 | .vs/
29 | # Uncomment if you have tasks that create the project's static files in wwwroot
30 | #wwwroot/
31 |
32 | # MSTest test Results
33 | [Tt]est[Rr]esult*/
34 | [Bb]uild[Ll]og.*
35 |
36 | # NUNIT
37 | *.VisualState.xml
38 | TestResult.xml
39 |
40 | # Build Results of an ATL Project
41 | [Dd]ebugPS/
42 | [Rr]eleasePS/
43 | dlldata.c
44 |
45 | # .NET Core
46 | project.lock.json
47 | project.fragment.lock.json
48 | artifacts/
49 | **/Properties/launchSettings.json
50 |
51 | *_i.c
52 | *_p.c
53 | *_i.h
54 | *.ilk
55 | *.meta
56 | *.obj
57 | *.pch
58 | *.pdb
59 | *.pgc
60 | *.pgd
61 | *.rsp
62 | *.sbr
63 | *.tlb
64 | *.tli
65 | *.tlh
66 | *.tmp
67 | *.tmp_proj
68 | *.log
69 | *.vspscc
70 | *.vssscc
71 | .builds
72 | *.pidb
73 | *.svclog
74 | *.scc
75 |
76 | # Chutzpah Test files
77 | _Chutzpah*
78 |
79 | # Visual C++ cache files
80 | ipch/
81 | *.aps
82 | *.ncb
83 | *.opendb
84 | *.opensdf
85 | *.sdf
86 | *.cachefile
87 | *.VC.db
88 | *.VC.VC.opendb
89 |
90 | # Visual Studio profiler
91 | *.psess
92 | *.vsp
93 | *.vspx
94 | *.sap
95 |
96 | # TFS 2012 Local Workspace
97 | $tf/
98 |
99 | # Guidance Automation Toolkit
100 | *.gpState
101 |
102 | # ReSharper is a .NET coding add-in
103 | _ReSharper*/
104 | *.[Rr]e[Ss]harper
105 | *.DotSettings.user
106 |
107 | # JustCode is a .NET coding add-in
108 | .JustCode
109 |
110 | # TeamCity is a build add-in
111 | _TeamCity*
112 |
113 | # DotCover is a Code Coverage Tool
114 | *.dotCover
115 |
116 | # Visual Studio code coverage results
117 | *.coverage
118 | *.coveragexml
119 |
120 | # NCrunch
121 | _NCrunch_*
122 | .*crunch*.local.xml
123 | nCrunchTemp_*
124 |
125 | # MightyMoose
126 | *.mm.*
127 | AutoTest.Net/
128 |
129 | # Web workbench (sass)
130 | .sass-cache/
131 |
132 | # Installshield output folder
133 | [Ee]xpress/
134 |
135 | # DocProject is a documentation generator add-in
136 | DocProject/buildhelp/
137 | DocProject/Help/*.HxT
138 | DocProject/Help/*.HxC
139 | DocProject/Help/*.hhc
140 | DocProject/Help/*.hhk
141 | DocProject/Help/*.hhp
142 | DocProject/Help/Html2
143 | DocProject/Help/html
144 |
145 | # Click-Once directory
146 | publish/
147 |
148 | # Publish Web Output
149 | *.[Pp]ublish.xml
150 | *.azurePubxml
151 | # TODO: Comment the next line if you want to checkin your web deploy settings
152 | # but database connection strings (with potential passwords) will be unencrypted
153 | *.pubxml
154 | *.publishproj
155 |
156 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
157 | # checkin your Azure Web App publish settings, but sensitive information contained
158 | # in these scripts will be unencrypted
159 | PublishScripts/
160 |
161 | # NuGet Packages
162 | *.nupkg
163 | # The packages folder can be ignored because of Package Restore
164 | **/packages/*
165 | # except build/, which is used as an MSBuild target.
166 | !**/packages/build/
167 | # Uncomment if necessary however generally it will be regenerated when needed
168 | #!**/packages/repositories.config
169 | # NuGet v3's project.json files produces more ignorable files
170 | *.nuget.props
171 | *.nuget.targets
172 |
173 | # Microsoft Azure Build Output
174 | csx/
175 | *.build.csdef
176 |
177 | # Microsoft Azure Emulator
178 | ecf/
179 | rcf/
180 |
181 | # Windows Store app package directories and files
182 | AppPackages/
183 | BundleArtifacts/
184 | Package.StoreAssociation.xml
185 | _pkginfo.txt
186 |
187 | # Visual Studio cache files
188 | # files ending in .cache can be ignored
189 | *.[Cc]ache
190 | # but keep track of directories ending in .cache
191 | !*.[Cc]ache/
192 |
193 | # Others
194 | ClientBin/
195 | ~$*
196 | *~
197 | *.dbmdl
198 | *.dbproj.schemaview
199 | *.jfm
200 | *.pfx
201 | *.publishsettings
202 | orleans.codegen.cs
203 |
204 | # Since there are multiple workflows, uncomment next line to ignore bower_components
205 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
206 | #bower_components/
207 |
208 | # RIA/Silverlight projects
209 | Generated_Code/
210 |
211 | # Backup & report files from converting an old project file
212 | # to a newer Visual Studio version. Backup files are not needed,
213 | # because we have git ;-)
214 | _UpgradeReport_Files/
215 | Backup*/
216 | UpgradeLog*.XML
217 | UpgradeLog*.htm
218 |
219 | # SQL Server files
220 | *.mdf
221 | *.ldf
222 | *.ndf
223 |
224 | # Business Intelligence projects
225 | *.rdl.data
226 | *.bim.layout
227 | *.bim_*.settings
228 |
229 | # Microsoft Fakes
230 | FakesAssemblies/
231 |
232 | # GhostDoc plugin setting file
233 | *.GhostDoc.xml
234 |
235 | # Node.js Tools for Visual Studio
236 | .ntvs_analysis.dat
237 | node_modules/
238 |
239 | # Typescript v1 declaration files
240 | typings/
241 |
242 | # Visual Studio 6 build log
243 | *.plg
244 |
245 | # Visual Studio 6 workspace options file
246 | *.opt
247 |
248 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
249 | *.vbw
250 |
251 | # Visual Studio LightSwitch build output
252 | **/*.HTMLClient/GeneratedArtifacts
253 | **/*.DesktopClient/GeneratedArtifacts
254 | **/*.DesktopClient/ModelManifest.xml
255 | **/*.Server/GeneratedArtifacts
256 | **/*.Server/ModelManifest.xml
257 | _Pvt_Extensions
258 |
259 | # Paket dependency manager
260 | .paket/paket.exe
261 | paket-files/
262 |
263 | # FAKE - F# Make
264 | .fake/
265 |
266 | # JetBrains Rider
267 | .idea/
268 | *.sln.iml
269 |
270 | # CodeRush
271 | .cr/
272 |
273 | # Python Tools for Visual Studio (PTVS)
274 | __pycache__/
275 | *.pyc
276 |
277 | # Cake - Uncomment if you are using it
278 | # tools/**
279 | # !tools/packages.config
280 |
281 | # Telerik's JustMock configuration file
282 | *.jmconfig
283 |
284 | # BizTalk build output
285 | *.btp.cs
286 | *.btm.cs
287 | *.odx.cs
288 | *.xsd.cs
289 |
--------------------------------------------------------------------------------
/Imitate/Form1.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 |
121 | 17, 17
122 |
123 |
124 | 137, 17
125 |
126 |
--------------------------------------------------------------------------------
/Imitate/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace Imitate
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 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 窗体设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.menuStrip1 = new System.Windows.Forms.MenuStrip();
32 | this.navigateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
33 | this.fillToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
34 | this.statusStrip1 = new System.Windows.Forms.StatusStrip();
35 | this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
36 | this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
37 | this.toolStripProgressBar1 = new System.Windows.Forms.ToolStripProgressBar();
38 | this.panel1 = new System.Windows.Forms.Panel();
39 | this.button1 = new System.Windows.Forms.Button();
40 | this.textBox1 = new System.Windows.Forms.TextBox();
41 | this.webBrowser1 = new System.Windows.Forms.WebBrowser();
42 | this.menuStrip1.SuspendLayout();
43 | this.statusStrip1.SuspendLayout();
44 | this.panel1.SuspendLayout();
45 | this.SuspendLayout();
46 | //
47 | // menuStrip1
48 | //
49 | this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
50 | this.navigateToolStripMenuItem,
51 | this.fillToolStripMenuItem});
52 | this.menuStrip1.Location = new System.Drawing.Point(0, 0);
53 | this.menuStrip1.Name = "menuStrip1";
54 | this.menuStrip1.Size = new System.Drawing.Size(994, 25);
55 | this.menuStrip1.TabIndex = 4;
56 | this.menuStrip1.Text = "menuStrip1";
57 | //
58 | // navigateToolStripMenuItem
59 | //
60 | this.navigateToolStripMenuItem.Name = "navigateToolStripMenuItem";
61 | this.navigateToolStripMenuItem.Size = new System.Drawing.Size(72, 21);
62 | this.navigateToolStripMenuItem.Text = "Navigate";
63 | this.navigateToolStripMenuItem.Click += new System.EventHandler(this.button1_Click);
64 | //
65 | // fillToolStripMenuItem
66 | //
67 | this.fillToolStripMenuItem.Name = "fillToolStripMenuItem";
68 | this.fillToolStripMenuItem.Size = new System.Drawing.Size(35, 21);
69 | this.fillToolStripMenuItem.Text = "Fill";
70 | this.fillToolStripMenuItem.Click += new System.EventHandler(this.button2_Click);
71 | //
72 | // statusStrip1
73 | //
74 | this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
75 | this.toolStripStatusLabel1,
76 | this.toolStripStatusLabel2,
77 | this.toolStripProgressBar1});
78 | this.statusStrip1.Location = new System.Drawing.Point(0, 576);
79 | this.statusStrip1.Name = "statusStrip1";
80 | this.statusStrip1.Size = new System.Drawing.Size(994, 22);
81 | this.statusStrip1.TabIndex = 5;
82 | this.statusStrip1.Text = "statusStrip1";
83 | //
84 | // toolStripStatusLabel1
85 | //
86 | this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
87 | this.toolStripStatusLabel1.Size = new System.Drawing.Size(726, 17);
88 | this.toolStripStatusLabel1.Spring = true;
89 | this.toolStripStatusLabel1.Text = "toolStripStatusLabel1";
90 | this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
91 | //
92 | // toolStripStatusLabel2
93 | //
94 | this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
95 | this.toolStripStatusLabel2.Size = new System.Drawing.Size(131, 17);
96 | this.toolStripStatusLabel2.Text = "toolStripStatusLabel2";
97 | //
98 | // toolStripProgressBar1
99 | //
100 | this.toolStripProgressBar1.Name = "toolStripProgressBar1";
101 | this.toolStripProgressBar1.Size = new System.Drawing.Size(120, 16);
102 | //
103 | // panel1
104 | //
105 | this.panel1.Controls.Add(this.button1);
106 | this.panel1.Controls.Add(this.textBox1);
107 | this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
108 | this.panel1.Location = new System.Drawing.Point(0, 25);
109 | this.panel1.Name = "panel1";
110 | this.panel1.Size = new System.Drawing.Size(994, 23);
111 | this.panel1.TabIndex = 7;
112 | //
113 | // button1
114 | //
115 | this.button1.Dock = System.Windows.Forms.DockStyle.Left;
116 | this.button1.Location = new System.Drawing.Point(421, 0);
117 | this.button1.Name = "button1";
118 | this.button1.Size = new System.Drawing.Size(60, 23);
119 | this.button1.TabIndex = 1;
120 | this.button1.Text = "GO";
121 | this.button1.UseVisualStyleBackColor = true;
122 | this.button1.Click += new System.EventHandler(this.button1_Click_1);
123 | //
124 | // textBox1
125 | //
126 | this.textBox1.Dock = System.Windows.Forms.DockStyle.Left;
127 | this.textBox1.Location = new System.Drawing.Point(0, 0);
128 | this.textBox1.Name = "textBox1";
129 | this.textBox1.Size = new System.Drawing.Size(421, 21);
130 | this.textBox1.TabIndex = 0;
131 | //
132 | // webBrowser1
133 | //
134 | this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
135 | this.webBrowser1.Location = new System.Drawing.Point(0, 48);
136 | this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
137 | this.webBrowser1.Name = "webBrowser1";
138 | this.webBrowser1.Size = new System.Drawing.Size(994, 528);
139 | this.webBrowser1.TabIndex = 8;
140 | //
141 | // Form1
142 | //
143 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
144 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
145 | this.ClientSize = new System.Drawing.Size(994, 598);
146 | this.Controls.Add(this.webBrowser1);
147 | this.Controls.Add(this.panel1);
148 | this.Controls.Add(this.statusStrip1);
149 | this.Controls.Add(this.menuStrip1);
150 | this.MainMenuStrip = this.menuStrip1;
151 | this.Name = "Form1";
152 | this.Text = "Form1";
153 | this.Load += new System.EventHandler(this.Form1_Load);
154 | this.menuStrip1.ResumeLayout(false);
155 | this.menuStrip1.PerformLayout();
156 | this.statusStrip1.ResumeLayout(false);
157 | this.statusStrip1.PerformLayout();
158 | this.panel1.ResumeLayout(false);
159 | this.panel1.PerformLayout();
160 | this.ResumeLayout(false);
161 | this.PerformLayout();
162 |
163 | }
164 |
165 | #endregion
166 |
167 | private System.Windows.Forms.MenuStrip menuStrip1;
168 | private System.Windows.Forms.ToolStripMenuItem navigateToolStripMenuItem;
169 | private System.Windows.Forms.ToolStripMenuItem fillToolStripMenuItem;
170 | private System.Windows.Forms.StatusStrip statusStrip1;
171 | private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
172 | private System.Windows.Forms.ToolStripProgressBar toolStripProgressBar1;
173 | private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
174 | private System.Windows.Forms.Panel panel1;
175 | private System.Windows.Forms.Button button1;
176 | private System.Windows.Forms.TextBox textBox1;
177 | private System.Windows.Forms.WebBrowser webBrowser1;
178 | }
179 | }
180 |
181 |
--------------------------------------------------------------------------------