1、初始化仓库
This commit is contained in:
		
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| .vs | ||||
| obj | ||||
| bin | ||||
							
								
								
									
										25
									
								
								Yjpp36.sln
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								Yjpp36.sln
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | ||||
|  | ||||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||||
| # Visual Studio Version 16 | ||||
| VisualStudioVersion = 16.0.35731.53 | ||||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||||
| Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Yjpp36", "Yjpp36\Yjpp36.vbproj", "{10673D97-6B35-4915-AE47-092FFAB27196}" | ||||
| EndProject | ||||
| Global | ||||
| 	GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||
| 		Debug|Any CPU = Debug|Any CPU | ||||
| 		Release|Any CPU = Release|Any CPU | ||||
| 	EndGlobalSection | ||||
| 	GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||||
| 		{10673D97-6B35-4915-AE47-092FFAB27196}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||||
| 		{10673D97-6B35-4915-AE47-092FFAB27196}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||||
| 		{10673D97-6B35-4915-AE47-092FFAB27196}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||||
| 		{10673D97-6B35-4915-AE47-092FFAB27196}.Release|Any CPU.Build.0 = Release|Any CPU | ||||
| 	EndGlobalSection | ||||
| 	GlobalSection(SolutionProperties) = preSolution | ||||
| 		HideSolutionNode = FALSE | ||||
| 	EndGlobalSection | ||||
| 	GlobalSection(ExtensibilityGlobals) = postSolution | ||||
| 		SolutionGuid = {2BDB7125-C94D-4ABF-A53D-1E93B741D230} | ||||
| 	EndGlobalSection | ||||
| EndGlobal | ||||
							
								
								
									
										6
									
								
								Yjpp36/App.config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								Yjpp36/App.config
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | ||||
| <?xml version="1.0" encoding="utf-8" ?> | ||||
| <configuration> | ||||
|     <startup> | ||||
|         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" /> | ||||
|     </startup> | ||||
| </configuration> | ||||
							
								
								
									
										364
									
								
								Yjpp36/Form1.Designer.vb
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										364
									
								
								Yjpp36/Form1.Designer.vb
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,364 @@ | ||||
| <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> | ||||
| Partial Class Form1 | ||||
|     Inherits System.Windows.Forms.Form | ||||
|  | ||||
|     'Form 重写 Dispose,以清理组件列表。 | ||||
|     <System.Diagnostics.DebuggerNonUserCode()> | ||||
|     Protected Overrides Sub Dispose(ByVal disposing As Boolean) | ||||
|         Try | ||||
|             If disposing AndAlso components IsNot Nothing Then | ||||
|                 components.Dispose() | ||||
|             End If | ||||
|         Finally | ||||
|             MyBase.Dispose(disposing) | ||||
|         End Try | ||||
|     End Sub | ||||
|  | ||||
|     'Windows 窗体设计器所必需的 | ||||
|     Private components As System.ComponentModel.IContainer | ||||
|  | ||||
|     '注意: 以下过程是 Windows 窗体设计器所必需的 | ||||
|     '可以使用 Windows 窗体设计器修改它。   | ||||
|     '不要使用代码编辑器修改它。 | ||||
|     <System.Diagnostics.DebuggerStepThrough()> | ||||
|     Private Sub InitializeComponent() | ||||
|         Me.Button1 = New System.Windows.Forms.Button() | ||||
|         Me.Button4 = New System.Windows.Forms.Button() | ||||
|         Me.Button2 = New System.Windows.Forms.Button() | ||||
|         Me.TabControl1 = New System.Windows.Forms.TabControl() | ||||
|         Me.TabPage1 = New System.Windows.Forms.TabPage() | ||||
|         Me.TextBox4 = New System.Windows.Forms.TextBox() | ||||
|         Me.Label6 = New System.Windows.Forms.Label() | ||||
|         Me.Label5 = New System.Windows.Forms.Label() | ||||
|         Me.Label4 = New System.Windows.Forms.Label() | ||||
|         Me.TextBox3 = New System.Windows.Forms.TextBox() | ||||
|         Me.Label3 = New System.Windows.Forms.Label() | ||||
|         Me.Button6 = New System.Windows.Forms.Button() | ||||
|         Me.ListBox1 = New System.Windows.Forms.ListBox() | ||||
|         Me.CheckBox1 = New System.Windows.Forms.CheckBox() | ||||
|         Me.Button3 = New System.Windows.Forms.Button() | ||||
|         Me.TextBox1 = New System.Windows.Forms.TextBox() | ||||
|         Me.Label1 = New System.Windows.Forms.Label() | ||||
|         Me.TabPage2 = New System.Windows.Forms.TabPage() | ||||
|         Me.lbl_taskLimit = New System.Windows.Forms.Label() | ||||
|         Me.Label2 = New System.Windows.Forms.Label() | ||||
|         Me.Button5 = New System.Windows.Forms.Button() | ||||
|         Me.TextBox2 = New System.Windows.Forms.TextBox() | ||||
|         Me.tab_group = New System.Windows.Forms.TabPage() | ||||
|         Me.lbl_appLimit = New System.Windows.Forms.Label() | ||||
|         Me.lbl_name = New System.Windows.Forms.Label() | ||||
|         Me.txt_groupItems = New System.Windows.Forms.TextBox() | ||||
|         Me.TabControl1.SuspendLayout() | ||||
|         Me.TabPage1.SuspendLayout() | ||||
|         Me.TabPage2.SuspendLayout() | ||||
|         Me.tab_group.SuspendLayout() | ||||
|         Me.SuspendLayout() | ||||
|         ' | ||||
|         'Button1 | ||||
|         ' | ||||
|         Me.Button1.Location = New System.Drawing.Point(6, 18) | ||||
|         Me.Button1.Name = "Button1" | ||||
|         Me.Button1.Size = New System.Drawing.Size(144, 32) | ||||
|         Me.Button1.TabIndex = 0 | ||||
|         Me.Button1.Text = "停止启动+删除文件" | ||||
|         Me.Button1.UseVisualStyleBackColor = True | ||||
|         ' | ||||
|         'Button4 | ||||
|         ' | ||||
|         Me.Button4.Location = New System.Drawing.Point(264, 5) | ||||
|         Me.Button4.Name = "Button4" | ||||
|         Me.Button4.Size = New System.Drawing.Size(93, 23) | ||||
|         Me.Button4.TabIndex = 3 | ||||
|         Me.Button4.Text = "继续运行" | ||||
|         Me.Button4.UseVisualStyleBackColor = True | ||||
|         ' | ||||
|         'Button2 | ||||
|         ' | ||||
|         Me.Button2.Location = New System.Drawing.Point(6, 56) | ||||
|         Me.Button2.Name = "Button2" | ||||
|         Me.Button2.Size = New System.Drawing.Size(144, 32) | ||||
|         Me.Button2.TabIndex = 4 | ||||
|         Me.Button2.Text = "输出所有的进程" | ||||
|         Me.Button2.UseVisualStyleBackColor = True | ||||
|         ' | ||||
|         'TabControl1 | ||||
|         ' | ||||
|         Me.TabControl1.Controls.Add(Me.TabPage1) | ||||
|         Me.TabControl1.Controls.Add(Me.TabPage2) | ||||
|         Me.TabControl1.Controls.Add(Me.tab_group) | ||||
|         Me.TabControl1.Location = New System.Drawing.Point(12, 12) | ||||
|         Me.TabControl1.Name = "TabControl1" | ||||
|         Me.TabControl1.SelectedIndex = 0 | ||||
|         Me.TabControl1.Size = New System.Drawing.Size(352, 232) | ||||
|         Me.TabControl1.TabIndex = 5 | ||||
|         ' | ||||
|         'TabPage1 | ||||
|         ' | ||||
|         Me.TabPage1.Controls.Add(Me.TextBox4) | ||||
|         Me.TabPage1.Controls.Add(Me.Label6) | ||||
|         Me.TabPage1.Controls.Add(Me.Label5) | ||||
|         Me.TabPage1.Controls.Add(Me.Label4) | ||||
|         Me.TabPage1.Controls.Add(Me.TextBox3) | ||||
|         Me.TabPage1.Controls.Add(Me.Label3) | ||||
|         Me.TabPage1.Controls.Add(Me.Button6) | ||||
|         Me.TabPage1.Controls.Add(Me.ListBox1) | ||||
|         Me.TabPage1.Controls.Add(Me.CheckBox1) | ||||
|         Me.TabPage1.Controls.Add(Me.Button3) | ||||
|         Me.TabPage1.Controls.Add(Me.TextBox1) | ||||
|         Me.TabPage1.Controls.Add(Me.Label1) | ||||
|         Me.TabPage1.Controls.Add(Me.Button1) | ||||
|         Me.TabPage1.Controls.Add(Me.Button2) | ||||
|         Me.TabPage1.Location = New System.Drawing.Point(4, 22) | ||||
|         Me.TabPage1.Name = "TabPage1" | ||||
|         Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) | ||||
|         Me.TabPage1.Size = New System.Drawing.Size(344, 206) | ||||
|         Me.TabPage1.TabIndex = 0 | ||||
|         Me.TabPage1.Text = "功能区" | ||||
|         Me.TabPage1.UseVisualStyleBackColor = True | ||||
|         ' | ||||
|         'TextBox4 | ||||
|         ' | ||||
|         Me.TextBox4.Enabled = False | ||||
|         Me.TextBox4.Location = New System.Drawing.Point(167, 28) | ||||
|         Me.TextBox4.Name = "TextBox4" | ||||
|         Me.TextBox4.Size = New System.Drawing.Size(162, 21) | ||||
|         Me.TextBox4.TabIndex = 15 | ||||
|         Me.TextBox4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center | ||||
|         ' | ||||
|         'Label6 | ||||
|         ' | ||||
|         Me.Label6.AutoSize = True | ||||
|         Me.Label6.Location = New System.Drawing.Point(166, 11) | ||||
|         Me.Label6.Name = "Label6" | ||||
|         Me.Label6.Size = New System.Drawing.Size(77, 12) | ||||
|         Me.Label6.TabIndex = 14 | ||||
|         Me.Label6.Text = "当前机器码:" | ||||
|         ' | ||||
|         'Label5 | ||||
|         ' | ||||
|         Me.Label5.AutoSize = True | ||||
|         Me.Label5.Location = New System.Drawing.Point(165, 113) | ||||
|         Me.Label5.Name = "Label5" | ||||
|         Me.Label5.Size = New System.Drawing.Size(173, 12) | ||||
|         Me.Label5.TabIndex = 13 | ||||
|         Me.Label5.Text = "注:心跳时间不能超过十分钟。" | ||||
|         ' | ||||
|         'Label4 | ||||
|         ' | ||||
|         Me.Label4.AutoSize = True | ||||
|         Me.Label4.Location = New System.Drawing.Point(313, 87) | ||||
|         Me.Label4.Name = "Label4" | ||||
|         Me.Label4.Size = New System.Drawing.Size(17, 12) | ||||
|         Me.Label4.TabIndex = 12 | ||||
|         Me.Label4.Text = "秒" | ||||
|         ' | ||||
|         'TextBox3 | ||||
|         ' | ||||
|         Me.TextBox3.Enabled = False | ||||
|         Me.TextBox3.Location = New System.Drawing.Point(262, 82) | ||||
|         Me.TextBox3.Name = "TextBox3" | ||||
|         Me.TextBox3.Size = New System.Drawing.Size(48, 21) | ||||
|         Me.TextBox3.TabIndex = 11 | ||||
|         Me.TextBox3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center | ||||
|         ' | ||||
|         'Label3 | ||||
|         ' | ||||
|         Me.Label3.AutoSize = True | ||||
|         Me.Label3.Location = New System.Drawing.Point(202, 88) | ||||
|         Me.Label3.Name = "Label3" | ||||
|         Me.Label3.Size = New System.Drawing.Size(65, 12) | ||||
|         Me.Label3.TabIndex = 10 | ||||
|         Me.Label3.Text = "心跳时间:" | ||||
|         ' | ||||
|         'Button6 | ||||
|         ' | ||||
|         Me.Button6.Location = New System.Drawing.Point(211, 177) | ||||
|         Me.Button6.Name = "Button6" | ||||
|         Me.Button6.Size = New System.Drawing.Size(118, 23) | ||||
|         Me.Button6.TabIndex = 9 | ||||
|         Me.Button6.Text = "清除进程" | ||||
|         Me.Button6.UseVisualStyleBackColor = True | ||||
|         ' | ||||
|         'ListBox1 | ||||
|         ' | ||||
|         Me.ListBox1.FormattingEnabled = True | ||||
|         Me.ListBox1.ItemHeight = 12 | ||||
|         Me.ListBox1.Location = New System.Drawing.Point(6, 112) | ||||
|         Me.ListBox1.Name = "ListBox1" | ||||
|         Me.ListBox1.Size = New System.Drawing.Size(144, 88) | ||||
|         Me.ListBox1.TabIndex = 6 | ||||
|         ' | ||||
|         'CheckBox1 | ||||
|         ' | ||||
|         Me.CheckBox1.AutoSize = True | ||||
|         Me.CheckBox1.Location = New System.Drawing.Point(6, 94) | ||||
|         Me.CheckBox1.Name = "CheckBox1" | ||||
|         Me.CheckBox1.Size = New System.Drawing.Size(96, 16) | ||||
|         Me.CheckBox1.TabIndex = 8 | ||||
|         Me.CheckBox1.Text = "调试进程模式" | ||||
|         Me.CheckBox1.UseVisualStyleBackColor = True | ||||
|         ' | ||||
|         'Button3 | ||||
|         ' | ||||
|         Me.Button3.Location = New System.Drawing.Point(211, 136) | ||||
|         Me.Button3.Name = "Button3" | ||||
|         Me.Button3.Size = New System.Drawing.Size(118, 23) | ||||
|         Me.Button3.TabIndex = 7 | ||||
|         Me.Button3.Text = "设置" | ||||
|         Me.Button3.UseVisualStyleBackColor = True | ||||
|         ' | ||||
|         'TextBox1 | ||||
|         ' | ||||
|         Me.TextBox1.Location = New System.Drawing.Point(262, 55) | ||||
|         Me.TextBox1.Name = "TextBox1" | ||||
|         Me.TextBox1.Size = New System.Drawing.Size(48, 21) | ||||
|         Me.TextBox1.TabIndex = 6 | ||||
|         Me.TextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center | ||||
|         ' | ||||
|         'Label1 | ||||
|         ' | ||||
|         Me.Label1.AutoSize = True | ||||
|         Me.Label1.Location = New System.Drawing.Point(190, 61) | ||||
|         Me.Label1.Name = "Label1" | ||||
|         Me.Label1.Size = New System.Drawing.Size(77, 12) | ||||
|         Me.Label1.TabIndex = 5 | ||||
|         Me.Label1.Text = "当前机器号:" | ||||
|         ' | ||||
|         'TabPage2 | ||||
|         ' | ||||
|         Me.TabPage2.Controls.Add(Me.lbl_taskLimit) | ||||
|         Me.TabPage2.Controls.Add(Me.Label2) | ||||
|         Me.TabPage2.Controls.Add(Me.Button5) | ||||
|         Me.TabPage2.Controls.Add(Me.TextBox2) | ||||
|         Me.TabPage2.Location = New System.Drawing.Point(4, 22) | ||||
|         Me.TabPage2.Name = "TabPage2" | ||||
|         Me.TabPage2.Padding = New System.Windows.Forms.Padding(3) | ||||
|         Me.TabPage2.Size = New System.Drawing.Size(344, 206) | ||||
|         Me.TabPage2.TabIndex = 1 | ||||
|         Me.TabPage2.Text = "添加数据" | ||||
|         Me.TabPage2.UseVisualStyleBackColor = True | ||||
|         ' | ||||
|         'lbl_taskLimit | ||||
|         ' | ||||
|         Me.lbl_taskLimit.AutoSize = True | ||||
|         Me.lbl_taskLimit.Location = New System.Drawing.Point(6, 178) | ||||
|         Me.lbl_taskLimit.Name = "lbl_taskLimit" | ||||
|         Me.lbl_taskLimit.Size = New System.Drawing.Size(0, 12) | ||||
|         Me.lbl_taskLimit.TabIndex = 3 | ||||
|         ' | ||||
|         'Label2 | ||||
|         ' | ||||
|         Me.Label2.Location = New System.Drawing.Point(6, 178) | ||||
|         Me.Label2.Name = "Label2" | ||||
|         Me.Label2.Size = New System.Drawing.Size(204, 18) | ||||
|         Me.Label2.TabIndex = 2 | ||||
|         Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter | ||||
|         ' | ||||
|         'Button5 | ||||
|         ' | ||||
|         Me.Button5.Location = New System.Drawing.Point(216, 171) | ||||
|         Me.Button5.Name = "Button5" | ||||
|         Me.Button5.Size = New System.Drawing.Size(122, 28) | ||||
|         Me.Button5.TabIndex = 1 | ||||
|         Me.Button5.Text = "新增进程" | ||||
|         Me.Button5.UseVisualStyleBackColor = True | ||||
|         ' | ||||
|         'TextBox2 | ||||
|         ' | ||||
|         Me.TextBox2.Location = New System.Drawing.Point(6, 6) | ||||
|         Me.TextBox2.Multiline = True | ||||
|         Me.TextBox2.Name = "TextBox2" | ||||
|         Me.TextBox2.ScrollBars = System.Windows.Forms.ScrollBars.Vertical | ||||
|         Me.TextBox2.Size = New System.Drawing.Size(332, 159) | ||||
|         Me.TextBox2.TabIndex = 0 | ||||
|         ' | ||||
|         'tab_group | ||||
|         ' | ||||
|         Me.tab_group.Controls.Add(Me.lbl_appLimit) | ||||
|         Me.tab_group.Controls.Add(Me.lbl_name) | ||||
|         Me.tab_group.Controls.Add(Me.txt_groupItems) | ||||
|         Me.tab_group.Location = New System.Drawing.Point(4, 22) | ||||
|         Me.tab_group.Name = "tab_group" | ||||
|         Me.tab_group.Size = New System.Drawing.Size(344, 206) | ||||
|         Me.tab_group.TabIndex = 2 | ||||
|         Me.tab_group.Text = "组策略限制" | ||||
|         Me.tab_group.UseVisualStyleBackColor = True | ||||
|         ' | ||||
|         'lbl_appLimit | ||||
|         ' | ||||
|         Me.lbl_appLimit.AutoSize = True | ||||
|         Me.lbl_appLimit.Location = New System.Drawing.Point(77, 2) | ||||
|         Me.lbl_appLimit.Name = "lbl_appLimit" | ||||
|         Me.lbl_appLimit.Size = New System.Drawing.Size(0, 12) | ||||
|         Me.lbl_appLimit.TabIndex = 4 | ||||
|         ' | ||||
|         'lbl_name | ||||
|         ' | ||||
|         Me.lbl_name.AutoSize = True | ||||
|         Me.lbl_name.Dock = System.Windows.Forms.DockStyle.Top | ||||
|         Me.lbl_name.Location = New System.Drawing.Point(0, 0) | ||||
|         Me.lbl_name.Name = "lbl_name" | ||||
|         Me.lbl_name.Size = New System.Drawing.Size(71, 12) | ||||
|         Me.lbl_name.TabIndex = 1 | ||||
|         Me.lbl_name.Text = "允许程序名:" | ||||
|         ' | ||||
|         'txt_groupItems | ||||
|         ' | ||||
|         Me.txt_groupItems.Dock = System.Windows.Forms.DockStyle.Bottom | ||||
|         Me.txt_groupItems.Location = New System.Drawing.Point(0, 26) | ||||
|         Me.txt_groupItems.Multiline = True | ||||
|         Me.txt_groupItems.Name = "txt_groupItems" | ||||
|         Me.txt_groupItems.ScrollBars = System.Windows.Forms.ScrollBars.Vertical | ||||
|         Me.txt_groupItems.Size = New System.Drawing.Size(344, 180) | ||||
|         Me.txt_groupItems.TabIndex = 0 | ||||
|         ' | ||||
|         'Form1 | ||||
|         ' | ||||
|         Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) | ||||
|         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font | ||||
|         Me.ClientSize = New System.Drawing.Size(370, 249) | ||||
|         Me.Controls.Add(Me.Button4) | ||||
|         Me.Controls.Add(Me.TabControl1) | ||||
|         Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle | ||||
|         Me.MaximizeBox = False | ||||
|         Me.Name = "Form1" | ||||
|         Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen | ||||
|         Me.Text = "管理端" | ||||
|         Me.TabControl1.ResumeLayout(False) | ||||
|         Me.TabPage1.ResumeLayout(False) | ||||
|         Me.TabPage1.PerformLayout() | ||||
|         Me.TabPage2.ResumeLayout(False) | ||||
|         Me.TabPage2.PerformLayout() | ||||
|         Me.tab_group.ResumeLayout(False) | ||||
|         Me.tab_group.PerformLayout() | ||||
|         Me.ResumeLayout(False) | ||||
|  | ||||
|     End Sub | ||||
|  | ||||
|     Friend WithEvents Button1 As Button | ||||
|     Friend WithEvents Button4 As Button | ||||
|     Friend WithEvents Button2 As Button | ||||
|     Friend WithEvents TabControl1 As TabControl | ||||
|     Friend WithEvents TabPage1 As TabPage | ||||
|     Friend WithEvents TabPage2 As TabPage | ||||
|     Friend WithEvents Button3 As Button | ||||
|     Friend WithEvents TextBox1 As TextBox | ||||
|     Friend WithEvents Label1 As Label | ||||
|     Friend WithEvents Button5 As Button | ||||
|     Friend WithEvents TextBox2 As TextBox | ||||
|     Friend WithEvents Label2 As Label | ||||
|     Friend WithEvents CheckBox1 As CheckBox | ||||
|     Friend WithEvents Button6 As Button | ||||
|     Friend WithEvents ListBox1 As ListBox | ||||
|     Friend WithEvents TextBox3 As TextBox | ||||
|     Friend WithEvents Label3 As Label | ||||
|     Friend WithEvents Label4 As Label | ||||
|     Friend WithEvents Label5 As Label | ||||
|     Friend WithEvents TextBox4 As TextBox | ||||
|     Friend WithEvents Label6 As Label | ||||
|     Friend WithEvents tab_group As TabPage | ||||
|     Friend WithEvents lbl_name As Label | ||||
|     Friend WithEvents txt_groupItems As TextBox | ||||
|     Friend WithEvents lbl_appLimit As Label | ||||
|     Friend WithEvents lbl_taskLimit As Label | ||||
| End Class | ||||
							
								
								
									
										120
									
								
								Yjpp36/Form1.resx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										120
									
								
								Yjpp36/Form1.resx
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,120 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <root> | ||||
|   <!--  | ||||
|     Microsoft ResX Schema  | ||||
|      | ||||
|     Version 2.0 | ||||
|      | ||||
|     The primary goals of this format is to allow a simple XML format  | ||||
|     that is mostly human readable. The generation and parsing of the  | ||||
|     various data types are done through the TypeConverter classes  | ||||
|     associated with the data types. | ||||
|      | ||||
|     Example: | ||||
|      | ||||
|     ... ado.net/XML headers & schema ... | ||||
|     <resheader name="resmimetype">text/microsoft-resx</resheader> | ||||
|     <resheader name="version">2.0</resheader> | ||||
|     <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | ||||
|     <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | ||||
|     <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | ||||
|     <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | ||||
|     <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | ||||
|         <value>[base64 mime encoded serialized .NET Framework object]</value> | ||||
|     </data> | ||||
|     <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||||
|         <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | ||||
|         <comment>This is a comment</comment> | ||||
|     </data> | ||||
|                  | ||||
|     There are any number of "resheader" rows that contain simple  | ||||
|     name/value pairs. | ||||
|      | ||||
|     Each data row contains a name, and value. The row also contains a  | ||||
|     type or mimetype. Type corresponds to a .NET class that support  | ||||
|     text/value conversion through the TypeConverter architecture.  | ||||
|     Classes that don't support this are serialized and stored with the  | ||||
|     mimetype set. | ||||
|      | ||||
|     The mimetype is used for serialized objects, and tells the  | ||||
|     ResXResourceReader how to depersist the object. This is currently not  | ||||
|     extensible. For a given mimetype the value must be set accordingly: | ||||
|      | ||||
|     Note - application/x-microsoft.net.object.binary.base64 is the format  | ||||
|     that the ResXResourceWriter will generate, however the reader can  | ||||
|     read any of the formats listed below. | ||||
|      | ||||
|     mimetype: application/x-microsoft.net.object.binary.base64 | ||||
|     value   : The object must be serialized with  | ||||
|             : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | ||||
|             : and then encoded with base64 encoding. | ||||
|      | ||||
|     mimetype: application/x-microsoft.net.object.soap.base64 | ||||
|     value   : The object must be serialized with  | ||||
|             : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | ||||
|             : and then encoded with base64 encoding. | ||||
|  | ||||
|     mimetype: application/x-microsoft.net.object.bytearray.base64 | ||||
|     value   : The object must be serialized into a byte array  | ||||
|             : using a System.ComponentModel.TypeConverter | ||||
|             : and then encoded with base64 encoding. | ||||
|     --> | ||||
|   <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||||
|     <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | ||||
|     <xsd:element name="root" msdata:IsDataSet="true"> | ||||
|       <xsd:complexType> | ||||
|         <xsd:choice maxOccurs="unbounded"> | ||||
|           <xsd:element name="metadata"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:sequence> | ||||
|                 <xsd:element name="value" type="xsd:string" minOccurs="0" /> | ||||
|               </xsd:sequence> | ||||
|               <xsd:attribute name="name" use="required" type="xsd:string" /> | ||||
|               <xsd:attribute name="type" type="xsd:string" /> | ||||
|               <xsd:attribute name="mimetype" type="xsd:string" /> | ||||
|               <xsd:attribute ref="xml:space" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|           <xsd:element name="assembly"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:attribute name="alias" type="xsd:string" /> | ||||
|               <xsd:attribute name="name" type="xsd:string" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|           <xsd:element name="data"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:sequence> | ||||
|                 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||||
|                 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | ||||
|               </xsd:sequence> | ||||
|               <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | ||||
|               <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | ||||
|               <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | ||||
|               <xsd:attribute ref="xml:space" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|           <xsd:element name="resheader"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:sequence> | ||||
|                 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||||
|               </xsd:sequence> | ||||
|               <xsd:attribute name="name" type="xsd:string" use="required" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|         </xsd:choice> | ||||
|       </xsd:complexType> | ||||
|     </xsd:element> | ||||
|   </xsd:schema> | ||||
|   <resheader name="resmimetype"> | ||||
|     <value>text/microsoft-resx</value> | ||||
|   </resheader> | ||||
|   <resheader name="version"> | ||||
|     <value>2.0</value> | ||||
|   </resheader> | ||||
|   <resheader name="reader"> | ||||
|     <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||||
|   </resheader> | ||||
|   <resheader name="writer"> | ||||
|     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||||
|   </resheader> | ||||
| </root> | ||||
							
								
								
									
										2020
									
								
								Yjpp36/Form1.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2020
									
								
								Yjpp36/Form1.vb
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										38
									
								
								Yjpp36/My Project/Application.Designer.vb
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								Yjpp36/My Project/Application.Designer.vb
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,38 @@ | ||||
| '------------------------------------------------------------------------------ | ||||
| ' <auto-generated> | ||||
| '     此代码由工具生成。 | ||||
| '     运行时版本:4.0.30319.42000 | ||||
| ' | ||||
| '     对此文件的更改可能会导致不正确的行为,并且如果 | ||||
| '     重新生成代码,这些更改将会丢失。 | ||||
| ' </auto-generated> | ||||
| '------------------------------------------------------------------------------ | ||||
|  | ||||
| Option Strict On | ||||
| Option Explicit On | ||||
|  | ||||
|  | ||||
| Namespace My | ||||
|      | ||||
|     '注意:此文件是自动生成的;请勿直接进行修改。若要更改, | ||||
|     ' 或者如果您在此文件中遇到生成错误,请转至项目设计器 | ||||
|     ' (转至“项目属性”或在解决方案资源管理器中双击“我的项目”节点), | ||||
|     ' 然后在“应用程序”选项卡中进行更改。 | ||||
|     ' | ||||
|     Partial Friend Class MyApplication | ||||
|          | ||||
|         <Global.System.Diagnostics.DebuggerStepThroughAttribute()>  _ | ||||
|         Public Sub New() | ||||
|             MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) | ||||
|             Me.IsSingleInstance = true | ||||
|             Me.EnableVisualStyles = true | ||||
|             Me.SaveMySettingsOnExit = true | ||||
|             Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses | ||||
|         End Sub | ||||
|          | ||||
|         <Global.System.Diagnostics.DebuggerStepThroughAttribute()>  _ | ||||
|         Protected Overrides Sub OnCreateMainForm() | ||||
|             Me.MainForm = Global.Load.Form1 | ||||
|         End Sub | ||||
|     End Class | ||||
| End Namespace | ||||
							
								
								
									
										10
									
								
								Yjpp36/My Project/Application.myapp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Yjpp36/My Project/Application.myapp
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||||
|   <MySubMain>true</MySubMain> | ||||
|   <MainForm>Form1</MainForm> | ||||
|   <SingleInstance>true</SingleInstance> | ||||
|   <ShutdownMode>0</ShutdownMode> | ||||
|   <EnableVisualStyles>true</EnableVisualStyles> | ||||
|   <AuthenticationMode>0</AuthenticationMode> | ||||
|   <SaveMySettingsOnExit>true</SaveMySettingsOnExit> | ||||
| </MyApplicationData> | ||||
							
								
								
									
										35
									
								
								Yjpp36/My Project/AssemblyInfo.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								Yjpp36/My Project/AssemblyInfo.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,35 @@ | ||||
| Imports System | ||||
| Imports System.Reflection | ||||
| Imports System.Runtime.InteropServices | ||||
|  | ||||
| ' 有关程序集的一般信息由以下 | ||||
| ' 控制。更改这些特性值可修改 | ||||
| ' 与程序集关联的信息。 | ||||
|  | ||||
| '查看程序集特性的值 | ||||
|  | ||||
| <Assembly: AssemblyTitle("Load")> | ||||
| <Assembly: AssemblyDescription("")> | ||||
| <Assembly: AssemblyCompany("")> | ||||
| <Assembly: AssemblyProduct("Load")> | ||||
| <Assembly: AssemblyCopyright("Copyright ©  2025")> | ||||
| <Assembly: AssemblyTrademark("")> | ||||
|  | ||||
| <Assembly: ComVisible(False)> | ||||
|  | ||||
| '如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID | ||||
| <Assembly: Guid("84d71ca0-5144-45f7-9076-b734fe64eee7")> | ||||
|  | ||||
| ' 程序集的版本信息由下列四个值组成:  | ||||
| ' | ||||
| '      主版本 | ||||
| '      次版本 | ||||
| '      生成号 | ||||
| '      修订号 | ||||
| ' | ||||
| '可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 | ||||
| '通过使用 "*",如下所示: | ||||
| ' <Assembly: AssemblyVersion("1.0.*")> | ||||
|  | ||||
| <Assembly: AssemblyVersion("1.0.0.4")> | ||||
| <Assembly: AssemblyFileVersion("1.0.0.4")> | ||||
							
								
								
									
										63
									
								
								Yjpp36/My Project/Resources.Designer.vb
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								Yjpp36/My Project/Resources.Designer.vb
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,63 @@ | ||||
| '------------------------------------------------------------------------------ | ||||
| ' <auto-generated> | ||||
| '     此代码由工具生成。 | ||||
| '     运行时版本:4.0.30319.42000 | ||||
| ' | ||||
| '     对此文件的更改可能会导致不正确的行为,并且如果 | ||||
| '     重新生成代码,这些更改将会丢失。 | ||||
| ' </auto-generated> | ||||
| '------------------------------------------------------------------------------ | ||||
|  | ||||
| Option Strict On | ||||
| Option Explicit On | ||||
|  | ||||
| Imports System | ||||
|  | ||||
| Namespace My.Resources | ||||
|      | ||||
|     '此类是由 StronglyTypedResourceBuilder | ||||
|     '类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 | ||||
|     '若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen | ||||
|     '(以 /str 作为命令选项),或重新生成 VS 项目。 | ||||
|     '''<summary> | ||||
|     '''  一个强类型的资源类,用于查找本地化的字符串等。 | ||||
|     '''</summary> | ||||
|     <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"),  _ | ||||
|      Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _ | ||||
|      Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _ | ||||
|      Global.Microsoft.VisualBasic.HideModuleNameAttribute()>  _ | ||||
|     Friend Module Resources | ||||
|          | ||||
|         Private resourceMan As Global.System.Resources.ResourceManager | ||||
|          | ||||
|         Private resourceCulture As Global.System.Globalization.CultureInfo | ||||
|          | ||||
|         '''<summary> | ||||
|         '''  返回此类使用的缓存的 ResourceManager 实例。 | ||||
|         '''</summary> | ||||
|         <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _ | ||||
|         Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager | ||||
|             Get | ||||
|                 If Object.ReferenceEquals(resourceMan, Nothing) Then | ||||
|                     Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Load.Resources", GetType(Resources).Assembly) | ||||
|                     resourceMan = temp | ||||
|                 End If | ||||
|                 Return resourceMan | ||||
|             End Get | ||||
|         End Property | ||||
|          | ||||
|         '''<summary> | ||||
|         '''  重写当前线程的 CurrentUICulture 属性,对 | ||||
|         '''  使用此强类型资源类的所有资源查找执行重写。 | ||||
|         '''</summary> | ||||
|         <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _ | ||||
|         Friend Property Culture() As Global.System.Globalization.CultureInfo | ||||
|             Get | ||||
|                 Return resourceCulture | ||||
|             End Get | ||||
|             Set | ||||
|                 resourceCulture = value | ||||
|             End Set | ||||
|         End Property | ||||
|     End Module | ||||
| End Namespace | ||||
							
								
								
									
										117
									
								
								Yjpp36/My Project/Resources.resx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										117
									
								
								Yjpp36/My Project/Resources.resx
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,117 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <root> | ||||
|   <!--  | ||||
|     Microsoft ResX Schema  | ||||
|      | ||||
|     Version 2.0 | ||||
|      | ||||
|     The primary goals of this format is to allow a simple XML format  | ||||
|     that is mostly human readable. The generation and parsing of the  | ||||
|     various data types are done through the TypeConverter classes  | ||||
|     associated with the data types. | ||||
|      | ||||
|     Example: | ||||
|      | ||||
|     ... ado.net/XML headers & schema ... | ||||
|     <resheader name="resmimetype">text/microsoft-resx</resheader> | ||||
|     <resheader name="version">2.0</resheader> | ||||
|     <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | ||||
|     <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | ||||
|     <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | ||||
|     <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | ||||
|     <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | ||||
|         <value>[base64 mime encoded serialized .NET Framework object]</value> | ||||
|     </data> | ||||
|     <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||||
|         <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | ||||
|         <comment>This is a comment</comment> | ||||
|     </data> | ||||
|                  | ||||
|     There are any number of "resheader" rows that contain simple  | ||||
|     name/value pairs. | ||||
|      | ||||
|     Each data row contains a name, and value. The row also contains a  | ||||
|     type or mimetype. Type corresponds to a .NET class that support  | ||||
|     text/value conversion through the TypeConverter architecture.  | ||||
|     Classes that don't support this are serialized and stored with the  | ||||
|     mimetype set. | ||||
|      | ||||
|     The mimetype is used for serialized objects, and tells the  | ||||
|     ResXResourceReader how to depersist the object. This is currently not  | ||||
|     extensible. For a given mimetype the value must be set accordingly: | ||||
|      | ||||
|     Note - application/x-microsoft.net.object.binary.base64 is the format  | ||||
|     that the ResXResourceWriter will generate, however the reader can  | ||||
|     read any of the formats listed below. | ||||
|      | ||||
|     mimetype: application/x-microsoft.net.object.binary.base64 | ||||
|     value   : The object must be serialized with  | ||||
|             : System.Serialization.Formatters.Binary.BinaryFormatter | ||||
|             : and then encoded with base64 encoding. | ||||
|      | ||||
|     mimetype: application/x-microsoft.net.object.soap.base64 | ||||
|     value   : The object must be serialized with  | ||||
|             : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | ||||
|             : and then encoded with base64 encoding. | ||||
|  | ||||
|     mimetype: application/x-microsoft.net.object.bytearray.base64 | ||||
|     value   : The object must be serialized into a byte array  | ||||
|             : using a System.ComponentModel.TypeConverter | ||||
|             : and then encoded with base64 encoding. | ||||
|     --> | ||||
|   <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||||
|     <xsd:element name="root" msdata:IsDataSet="true"> | ||||
|       <xsd:complexType> | ||||
|         <xsd:choice maxOccurs="unbounded"> | ||||
|           <xsd:element name="metadata"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:sequence> | ||||
|                 <xsd:element name="value" type="xsd:string" minOccurs="0" /> | ||||
|               </xsd:sequence> | ||||
|               <xsd:attribute name="name" type="xsd:string" /> | ||||
|               <xsd:attribute name="type" type="xsd:string" /> | ||||
|               <xsd:attribute name="mimetype" type="xsd:string" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|           <xsd:element name="assembly"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:attribute name="alias" type="xsd:string" /> | ||||
|               <xsd:attribute name="name" type="xsd:string" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|           <xsd:element name="data"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:sequence> | ||||
|                 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||||
|                 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | ||||
|               </xsd:sequence> | ||||
|               <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> | ||||
|               <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | ||||
|               <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|           <xsd:element name="resheader"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:sequence> | ||||
|                 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||||
|               </xsd:sequence> | ||||
|               <xsd:attribute name="name" type="xsd:string" use="required" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|         </xsd:choice> | ||||
|       </xsd:complexType> | ||||
|     </xsd:element> | ||||
|   </xsd:schema> | ||||
|   <resheader name="resmimetype"> | ||||
|     <value>text/microsoft-resx</value> | ||||
|   </resheader> | ||||
|   <resheader name="version"> | ||||
|     <value>2.0</value> | ||||
|   </resheader> | ||||
|   <resheader name="reader"> | ||||
|     <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||||
|   </resheader> | ||||
|   <resheader name="writer"> | ||||
|     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||||
|   </resheader> | ||||
| </root> | ||||
							
								
								
									
										73
									
								
								Yjpp36/My Project/Settings.Designer.vb
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								Yjpp36/My Project/Settings.Designer.vb
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,73 @@ | ||||
| '------------------------------------------------------------------------------ | ||||
| ' <auto-generated> | ||||
| '     此代码由工具生成。 | ||||
| '     运行时版本:4.0.30319.42000 | ||||
| ' | ||||
| '     对此文件的更改可能会导致不正确的行为,并且如果 | ||||
| '     重新生成代码,这些更改将会丢失。 | ||||
| ' </auto-generated> | ||||
| '------------------------------------------------------------------------------ | ||||
|  | ||||
| Option Strict On | ||||
| Option Explicit On | ||||
|  | ||||
|  | ||||
| Namespace My | ||||
|      | ||||
|     <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _ | ||||
|      Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0"),  _ | ||||
|      Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _ | ||||
|     Partial Friend NotInheritable Class MySettings | ||||
|         Inherits Global.System.Configuration.ApplicationSettingsBase | ||||
|          | ||||
|         Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) | ||||
|          | ||||
| #Region "My.Settings 自动保存功能" | ||||
| #If _MyType = "WindowsForms" Then | ||||
|     Private Shared addedHandler As Boolean | ||||
|  | ||||
|     Private Shared addedHandlerLockObject As New Object | ||||
|  | ||||
|     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ | ||||
|     Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) | ||||
|         If My.Application.SaveMySettingsOnExit Then | ||||
|             My.Settings.Save() | ||||
|         End If | ||||
|     End Sub | ||||
| #End If | ||||
| #End Region | ||||
|          | ||||
|         Public Shared ReadOnly Property [Default]() As MySettings | ||||
|             Get | ||||
|                  | ||||
| #If _MyType = "WindowsForms" Then | ||||
|                If Not addedHandler Then | ||||
|                     SyncLock addedHandlerLockObject | ||||
|                         If Not addedHandler Then | ||||
|                             AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings | ||||
|                             addedHandler = True | ||||
|                         End If | ||||
|                     End SyncLock | ||||
|                 End If | ||||
| #End If | ||||
|                 Return defaultInstance | ||||
|             End Get | ||||
|         End Property | ||||
|     End Class | ||||
| End Namespace | ||||
|  | ||||
| Namespace My | ||||
|      | ||||
|     <Global.Microsoft.VisualBasic.HideModuleNameAttribute(),  _ | ||||
|      Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _ | ||||
|      Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()>  _ | ||||
|     Friend Module MySettingsProperty | ||||
|          | ||||
|         <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>  _ | ||||
|         Friend ReadOnly Property Settings() As Global.Load.My.MySettings | ||||
|             Get | ||||
|                 Return Global.Load.My.MySettings.Default | ||||
|             End Get | ||||
|         End Property | ||||
|     End Module | ||||
| End Namespace | ||||
							
								
								
									
										7
									
								
								Yjpp36/My Project/Settings.settings
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Yjpp36/My Project/Settings.settings
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,7 @@ | ||||
| <?xml version='1.0' encoding='utf-8'?> | ||||
| <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true"> | ||||
|   <Profiles> | ||||
|     <Profile Name="(Default)" /> | ||||
|   </Profiles> | ||||
|   <Settings /> | ||||
| </SettingsFile> | ||||
							
								
								
									
										168
									
								
								Yjpp36/Yjpp36.vbproj
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										168
									
								
								Yjpp36/Yjpp36.vbproj
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,168 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||
|   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||||
|   <PropertyGroup> | ||||
|     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||||
|     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||||
|     <ProjectGuid>{10673D97-6B35-4915-AE47-092FFAB27196}</ProjectGuid> | ||||
|     <OutputType>WinExe</OutputType> | ||||
|     <StartupObject>Load.My.MyApplication</StartupObject> | ||||
|     <RootNamespace>Load</RootNamespace> | ||||
|     <AssemblyName>Load</AssemblyName> | ||||
|     <FileAlignment>512</FileAlignment> | ||||
|     <MyType>WindowsForms</MyType> | ||||
|     <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> | ||||
|     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||||
|     <Deterministic>true</Deterministic> | ||||
|     <IsWebBootstrapper>false</IsWebBootstrapper> | ||||
|     <PublishUrl>publish\</PublishUrl> | ||||
|     <Install>true</Install> | ||||
|     <InstallFrom>Disk</InstallFrom> | ||||
|     <UpdateEnabled>false</UpdateEnabled> | ||||
|     <UpdateMode>Foreground</UpdateMode> | ||||
|     <UpdateInterval>7</UpdateInterval> | ||||
|     <UpdateIntervalUnits>Days</UpdateIntervalUnits> | ||||
|     <UpdatePeriodically>false</UpdatePeriodically> | ||||
|     <UpdateRequired>false</UpdateRequired> | ||||
|     <MapFileExtensions>true</MapFileExtensions> | ||||
|     <ApplicationRevision>1</ApplicationRevision> | ||||
|     <ApplicationVersion>1.0.0.%2a</ApplicationVersion> | ||||
|     <UseApplicationTrust>false</UseApplicationTrust> | ||||
|     <BootstrapperEnabled>true</BootstrapperEnabled> | ||||
|   </PropertyGroup> | ||||
|   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||||
|     <PlatformTarget>AnyCPU</PlatformTarget> | ||||
|     <DebugSymbols>true</DebugSymbols> | ||||
|     <DebugType>full</DebugType> | ||||
|     <DefineDebug>true</DefineDebug> | ||||
|     <DefineTrace>true</DefineTrace> | ||||
|     <OutputPath>bin\Debug\</OutputPath> | ||||
|     <DocumentationFile>Load.xml</DocumentationFile> | ||||
|     <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> | ||||
|   </PropertyGroup> | ||||
|   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||||
|     <PlatformTarget>AnyCPU</PlatformTarget> | ||||
|     <DebugType>pdbonly</DebugType> | ||||
|     <DefineDebug>false</DefineDebug> | ||||
|     <DefineTrace>true</DefineTrace> | ||||
|     <Optimize>true</Optimize> | ||||
|     <OutputPath>bin\Release\</OutputPath> | ||||
|     <DocumentationFile>Load.xml</DocumentationFile> | ||||
|     <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> | ||||
|   </PropertyGroup> | ||||
|   <PropertyGroup> | ||||
|     <OptionExplicit>On</OptionExplicit> | ||||
|   </PropertyGroup> | ||||
|   <PropertyGroup> | ||||
|     <OptionCompare>Binary</OptionCompare> | ||||
|   </PropertyGroup> | ||||
|   <PropertyGroup> | ||||
|     <OptionStrict>Off</OptionStrict> | ||||
|   </PropertyGroup> | ||||
|   <PropertyGroup> | ||||
|     <OptionInfer>On</OptionInfer> | ||||
|   </PropertyGroup> | ||||
|   <PropertyGroup> | ||||
|     <ApplicationManifest>app.manifest</ApplicationManifest> | ||||
|   </PropertyGroup> | ||||
|   <ItemGroup> | ||||
|     <Reference Include="System" /> | ||||
|     <Reference Include="System.Data" /> | ||||
|     <Reference Include="System.Deployment" /> | ||||
|     <Reference Include="System.Drawing" /> | ||||
|     <Reference Include="System.Management" /> | ||||
|     <Reference Include="System.Web.Extensions" /> | ||||
|     <Reference Include="System.Windows.Forms" /> | ||||
|     <Reference Include="System.Xml" /> | ||||
|     <Reference Include="System.Core" /> | ||||
|     <Reference Include="System.Xml.Linq" /> | ||||
|     <Reference Include="System.Data.DataSetExtensions" /> | ||||
|     <Reference Include="System.Net.Http" /> | ||||
|   </ItemGroup> | ||||
|   <ItemGroup> | ||||
|     <Import Include="Microsoft.VisualBasic" /> | ||||
|     <Import Include="System" /> | ||||
|     <Import Include="System.Collections" /> | ||||
|     <Import Include="System.Collections.Generic" /> | ||||
|     <Import Include="System.Data" /> | ||||
|     <Import Include="System.Drawing" /> | ||||
|     <Import Include="System.Diagnostics" /> | ||||
|     <Import Include="System.Windows.Forms" /> | ||||
|     <Import Include="System.Linq" /> | ||||
|     <Import Include="System.Xml.Linq" /> | ||||
|     <Import Include="System.Threading.Tasks" /> | ||||
|   </ItemGroup> | ||||
|   <ItemGroup> | ||||
|     <Compile Include="ct.vb"> | ||||
|       <SubType>Form</SubType> | ||||
|     </Compile> | ||||
|     <Compile Include="dtos\AppVersion.vb" /> | ||||
|     <Compile Include="dtos\Config.vb" /> | ||||
|     <Compile Include="dtos\KeywordItemReq.vb" /> | ||||
|     <Compile Include="dtos\KeywordResult.vb" /> | ||||
|     <Compile Include="dtos\Result.vb" /> | ||||
|     <Compile Include="Form1.vb"> | ||||
|       <SubType>Form</SubType> | ||||
|     </Compile> | ||||
|     <Compile Include="Form1.Designer.vb"> | ||||
|       <DependentUpon>Form1.vb</DependentUpon> | ||||
|       <SubType>Form</SubType> | ||||
|     </Compile> | ||||
|     <Compile Include="My Project\AssemblyInfo.vb" /> | ||||
|     <Compile Include="My Project\Application.Designer.vb"> | ||||
|       <AutoGen>True</AutoGen> | ||||
|       <DependentUpon>Application.myapp</DependentUpon> | ||||
|       <DesignTime>True</DesignTime> | ||||
|     </Compile> | ||||
|     <Compile Include="My Project\Resources.Designer.vb"> | ||||
|       <AutoGen>True</AutoGen> | ||||
|       <DesignTime>True</DesignTime> | ||||
|       <DependentUpon>Resources.resx</DependentUpon> | ||||
|     </Compile> | ||||
|     <Compile Include="My Project\Settings.Designer.vb"> | ||||
|       <AutoGen>True</AutoGen> | ||||
|       <DependentUpon>Settings.settings</DependentUpon> | ||||
|       <DesignTimeSharedInput>True</DesignTimeSharedInput> | ||||
|     </Compile> | ||||
|     <Compile Include="service\CopyService.vb" /> | ||||
|     <Compile Include="service\FileService.vb" /> | ||||
|     <Compile Include="service\Logger.vb" /> | ||||
|     <Compile Include="service\StringEncryption.vb" /> | ||||
|     <Compile Include="service\Updater.vb" /> | ||||
|   </ItemGroup> | ||||
|   <ItemGroup> | ||||
|     <EmbeddedResource Include="ct.resx"> | ||||
|       <DependentUpon>ct.vb</DependentUpon> | ||||
|     </EmbeddedResource> | ||||
|     <EmbeddedResource Include="Form1.resx"> | ||||
|       <DependentUpon>Form1.vb</DependentUpon> | ||||
|     </EmbeddedResource> | ||||
|     <EmbeddedResource Include="My Project\Resources.resx"> | ||||
|       <Generator>VbMyResourcesResXFileCodeGenerator</Generator> | ||||
|       <LastGenOutput>Resources.Designer.vb</LastGenOutput> | ||||
|       <CustomToolNamespace>My.Resources</CustomToolNamespace> | ||||
|       <SubType>Designer</SubType> | ||||
|     </EmbeddedResource> | ||||
|   </ItemGroup> | ||||
|   <ItemGroup> | ||||
|     <None Include="app.manifest" /> | ||||
|     <None Include="My Project\Application.myapp"> | ||||
|       <Generator>MyApplicationCodeGenerator</Generator> | ||||
|       <LastGenOutput>Application.Designer.vb</LastGenOutput> | ||||
|     </None> | ||||
|     <None Include="My Project\Settings.settings"> | ||||
|       <Generator>SettingsSingleFileGenerator</Generator> | ||||
|       <CustomToolNamespace>My</CustomToolNamespace> | ||||
|       <LastGenOutput>Settings.Designer.vb</LastGenOutput> | ||||
|     </None> | ||||
|     <None Include="App.config" /> | ||||
|   </ItemGroup> | ||||
|   <ItemGroup> | ||||
|     <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> | ||||
|       <Visible>False</Visible> | ||||
|       <ProductName>.NET Framework 3.5 SP1</ProductName> | ||||
|       <Install>false</Install> | ||||
|     </BootstrapperPackage> | ||||
|   </ItemGroup> | ||||
|   <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> | ||||
| </Project> | ||||
							
								
								
									
										13
									
								
								Yjpp36/Yjpp36.vbproj.user
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								Yjpp36/Yjpp36.vbproj.user
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||
|   <PropertyGroup> | ||||
|     <PublishUrlHistory>publish\</PublishUrlHistory> | ||||
|     <InstallUrlHistory /> | ||||
|     <SupportUrlHistory /> | ||||
|     <UpdateUrlHistory /> | ||||
|     <BootstrapperUrlHistory /> | ||||
|     <ErrorReportUrlHistory /> | ||||
|     <FallbackCulture>zh-CN</FallbackCulture> | ||||
|     <VerifyUploadedFiles>false</VerifyUploadedFiles> | ||||
|   </PropertyGroup> | ||||
| </Project> | ||||
							
								
								
									
										78
									
								
								Yjpp36/app.manifest
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								Yjpp36/app.manifest
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,78 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> | ||||
|   <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/> | ||||
|   <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> | ||||
|     <security> | ||||
|       <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> | ||||
|         <!-- UAC 清单选项 | ||||
|              如果想要更改 Windows 用户帐户控制级别,请使用 | ||||
|              以下节点之一替换 requestedExecutionLevel 节点。n | ||||
|         <requestedExecutionLevel  level="asInvoker" uiAccess="false" /> | ||||
|         <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" /> | ||||
|         <requestedExecutionLevel  level="highestAvailable" uiAccess="false" /> | ||||
|  | ||||
|             指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。 | ||||
|             如果你的应用程序需要此虚拟化来实现向后兼容性,则删除此 | ||||
|             元素。 | ||||
|         --> | ||||
| 		  <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> | ||||
| 	  </requestedPrivileges> | ||||
|     </security> | ||||
|   </trustInfo> | ||||
|  | ||||
|   <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> | ||||
|     <application> | ||||
|       <!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的 | ||||
|            Windows 版本的列表。取消评论适当的元素, | ||||
|            Windows 将自动选择最兼容的环境。 --> | ||||
|  | ||||
|       <!-- Windows Vista --> | ||||
|       <!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />--> | ||||
|  | ||||
|       <!-- Windows 7 --> | ||||
|       <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />--> | ||||
|  | ||||
|       <!-- Windows 8 --> | ||||
|       <!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />--> | ||||
|  | ||||
|       <!-- Windows 8.1 --> | ||||
|       <!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />--> | ||||
|  | ||||
|       <!-- Windows 10 --> | ||||
|       <!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />--> | ||||
|  | ||||
|     </application> | ||||
|   </compatibility> | ||||
|  | ||||
|   <!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行 | ||||
|        自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需 | ||||
|        选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应 | ||||
|        在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。 | ||||
|         | ||||
|        将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation --> | ||||
|   <!-- | ||||
|   <application xmlns="urn:schemas-microsoft-com:asm.v3"> | ||||
|     <windowsSettings> | ||||
|       <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware> | ||||
|       <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware> | ||||
|     </windowsSettings> | ||||
|   </application> | ||||
|   --> | ||||
|  | ||||
|   <!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) --> | ||||
|   <!-- | ||||
|   <dependency> | ||||
|     <dependentAssembly> | ||||
|       <assemblyIdentity | ||||
|           type="win32" | ||||
|           name="Microsoft.Windows.Common-Controls" | ||||
|           version="6.0.0.0" | ||||
|           processorArchitecture="*" | ||||
|           publicKeyToken="6595b64144ccf1df" | ||||
|           language="*" | ||||
|         /> | ||||
|     </dependentAssembly> | ||||
|   </dependency> | ||||
|   --> | ||||
|  | ||||
| </assembly> | ||||
							
								
								
									
										120
									
								
								Yjpp36/ct.resx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										120
									
								
								Yjpp36/ct.resx
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,120 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <root> | ||||
|   <!--  | ||||
|     Microsoft ResX Schema  | ||||
|      | ||||
|     Version 2.0 | ||||
|      | ||||
|     The primary goals of this format is to allow a simple XML format  | ||||
|     that is mostly human readable. The generation and parsing of the  | ||||
|     various data types are done through the TypeConverter classes  | ||||
|     associated with the data types. | ||||
|      | ||||
|     Example: | ||||
|      | ||||
|     ... ado.net/XML headers & schema ... | ||||
|     <resheader name="resmimetype">text/microsoft-resx</resheader> | ||||
|     <resheader name="version">2.0</resheader> | ||||
|     <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | ||||
|     <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | ||||
|     <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | ||||
|     <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | ||||
|     <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | ||||
|         <value>[base64 mime encoded serialized .NET Framework object]</value> | ||||
|     </data> | ||||
|     <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||||
|         <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | ||||
|         <comment>This is a comment</comment> | ||||
|     </data> | ||||
|                  | ||||
|     There are any number of "resheader" rows that contain simple  | ||||
|     name/value pairs. | ||||
|      | ||||
|     Each data row contains a name, and value. The row also contains a  | ||||
|     type or mimetype. Type corresponds to a .NET class that support  | ||||
|     text/value conversion through the TypeConverter architecture.  | ||||
|     Classes that don't support this are serialized and stored with the  | ||||
|     mimetype set. | ||||
|      | ||||
|     The mimetype is used for serialized objects, and tells the  | ||||
|     ResXResourceReader how to depersist the object. This is currently not  | ||||
|     extensible. For a given mimetype the value must be set accordingly: | ||||
|      | ||||
|     Note - application/x-microsoft.net.object.binary.base64 is the format  | ||||
|     that the ResXResourceWriter will generate, however the reader can  | ||||
|     read any of the formats listed below. | ||||
|      | ||||
|     mimetype: application/x-microsoft.net.object.binary.base64 | ||||
|     value   : The object must be serialized with  | ||||
|             : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | ||||
|             : and then encoded with base64 encoding. | ||||
|      | ||||
|     mimetype: application/x-microsoft.net.object.soap.base64 | ||||
|     value   : The object must be serialized with  | ||||
|             : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | ||||
|             : and then encoded with base64 encoding. | ||||
|  | ||||
|     mimetype: application/x-microsoft.net.object.bytearray.base64 | ||||
|     value   : The object must be serialized into a byte array  | ||||
|             : using a System.ComponentModel.TypeConverter | ||||
|             : and then encoded with base64 encoding. | ||||
|     --> | ||||
|   <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||||
|     <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | ||||
|     <xsd:element name="root" msdata:IsDataSet="true"> | ||||
|       <xsd:complexType> | ||||
|         <xsd:choice maxOccurs="unbounded"> | ||||
|           <xsd:element name="metadata"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:sequence> | ||||
|                 <xsd:element name="value" type="xsd:string" minOccurs="0" /> | ||||
|               </xsd:sequence> | ||||
|               <xsd:attribute name="name" use="required" type="xsd:string" /> | ||||
|               <xsd:attribute name="type" type="xsd:string" /> | ||||
|               <xsd:attribute name="mimetype" type="xsd:string" /> | ||||
|               <xsd:attribute ref="xml:space" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|           <xsd:element name="assembly"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:attribute name="alias" type="xsd:string" /> | ||||
|               <xsd:attribute name="name" type="xsd:string" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|           <xsd:element name="data"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:sequence> | ||||
|                 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||||
|                 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | ||||
|               </xsd:sequence> | ||||
|               <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | ||||
|               <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | ||||
|               <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | ||||
|               <xsd:attribute ref="xml:space" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|           <xsd:element name="resheader"> | ||||
|             <xsd:complexType> | ||||
|               <xsd:sequence> | ||||
|                 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||||
|               </xsd:sequence> | ||||
|               <xsd:attribute name="name" type="xsd:string" use="required" /> | ||||
|             </xsd:complexType> | ||||
|           </xsd:element> | ||||
|         </xsd:choice> | ||||
|       </xsd:complexType> | ||||
|     </xsd:element> | ||||
|   </xsd:schema> | ||||
|   <resheader name="resmimetype"> | ||||
|     <value>text/microsoft-resx</value> | ||||
|   </resheader> | ||||
|   <resheader name="version"> | ||||
|     <value>2.0</value> | ||||
|   </resheader> | ||||
|   <resheader name="reader"> | ||||
|     <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||||
|   </resheader> | ||||
|   <resheader name="writer"> | ||||
|     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||||
|   </resheader> | ||||
| </root> | ||||
							
								
								
									
										76
									
								
								Yjpp36/ct.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								Yjpp36/ct.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,76 @@ | ||||
| Public Class PasswordDialog | ||||
|     Inherits Form | ||||
|  | ||||
|     Private lblPrompt As Label | ||||
|     Private txtPassword As TextBox | ||||
|     Private btnOK As Button | ||||
|     Private btnCancel As Button | ||||
|  | ||||
|     Public ReadOnly Property PasswordText As String | ||||
|         Get | ||||
|             Return txtPassword.Text | ||||
|         End Get | ||||
|     End Property | ||||
|  | ||||
|     Public Sub New(prompt As String, title As String) | ||||
|         Me.Text = title | ||||
|         Me.FormBorderStyle = FormBorderStyle.FixedDialog | ||||
|         Me.StartPosition = FormStartPosition.CenterParent | ||||
|         Me.MaximizeBox = False | ||||
|         Me.MinimizeBox = False | ||||
|         Me.Width = 300 | ||||
|         Me.Height = 150 | ||||
|  | ||||
|         lblPrompt = New Label() With { | ||||
|             .Text = prompt, | ||||
|             .AutoSize = True, | ||||
|             .Left = 10, | ||||
|             .Top = 10 | ||||
|         } | ||||
|         Me.Controls.Add(lblPrompt) | ||||
|  | ||||
|         txtPassword = New TextBox() With { | ||||
|             .Left = 10, | ||||
|             .Top = lblPrompt.Bottom + 10, | ||||
|             .Width = 260, | ||||
|             .UseSystemPasswordChar = True  ' 关键:开启星号掩码 | ||||
|         } | ||||
|         Me.Controls.Add(txtPassword) | ||||
|  | ||||
|         btnOK = New Button() With { | ||||
|             .Text = "确定", | ||||
|             .DialogResult = DialogResult.OK, | ||||
|             .Left = 110, | ||||
|             .Top = txtPassword.Bottom + 15, | ||||
|             .Width = 75 | ||||
|         } | ||||
|         Me.Controls.Add(btnOK) | ||||
|  | ||||
|         btnCancel = New Button() With { | ||||
|             .Text = "取消", | ||||
|             .DialogResult = DialogResult.Cancel, | ||||
|             .Left = btnOK.Right + 10, | ||||
|             .Top = txtPassword.Bottom + 15, | ||||
|             .Width = 75 | ||||
|         } | ||||
|         Me.Controls.Add(btnCancel) | ||||
|  | ||||
|         Me.AcceptButton = btnOK | ||||
|         Me.CancelButton = btnCancel | ||||
|     End Sub | ||||
|  | ||||
|     Private Sub InitializeComponent() | ||||
|         Me.SuspendLayout() | ||||
|         ' | ||||
|         'PasswordDialog | ||||
|         ' | ||||
|         Me.ClientSize = New System.Drawing.Size(168, 25) | ||||
|         Me.Name = "PasswordDialog" | ||||
|         Me.ResumeLayout(False) | ||||
|  | ||||
|     End Sub | ||||
|  | ||||
|     Private Sub PasswordDialog_Load(sender As Object, e As EventArgs) Handles MyBase.Load | ||||
|  | ||||
|     End Sub | ||||
| End Class | ||||
							
								
								
									
										7
									
								
								Yjpp36/dtos/AppVersion.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Yjpp36/dtos/AppVersion.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,7 @@ | ||||
| Public Class AppVersion | ||||
|     '版本信息' | ||||
|     Public Property version As String | ||||
|  | ||||
|     '文件地址' | ||||
|     Public Property path As String | ||||
| End Class | ||||
							
								
								
									
										24
									
								
								Yjpp36/dtos/Config.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								Yjpp36/dtos/Config.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,24 @@ | ||||
| Public Class SetConfig | ||||
|     '设备编号' | ||||
|     Public Property MachineId As String | ||||
|     '设备唯一码(网卡信息)' | ||||
|     Public Property BiosId As String | ||||
|  | ||||
|     '心跳时间间隔(秒)' | ||||
|     Public Property Heart As String | ||||
|  | ||||
|     '关键字心跳(秒)' | ||||
|     Public Property KeywordHeart As String | ||||
|  | ||||
|     '进程限制 1-限制 2-不限制 3-只记录' | ||||
|     Public Property TaskLimit As Integer | ||||
|  | ||||
|     '应用限制 1-是 2-否' | ||||
|     Public Property AppLimit As Integer | ||||
|  | ||||
|     '是否开启关键字采集 1-是 2-否 ' | ||||
|     Public Property Keyword As Integer | ||||
|  | ||||
|     '拦截时间间隔' | ||||
|     Public Property InterceptTimeInterval As Double | ||||
| End Class | ||||
							
								
								
									
										6
									
								
								Yjpp36/dtos/KeywordItemReq.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								Yjpp36/dtos/KeywordItemReq.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | ||||
| Public Class KeywordItemReq | ||||
|     '类型 0-关键字 1-长度限制' | ||||
|     Public Property type As Integer | ||||
|  | ||||
|     Public Property content As String | ||||
| End Class | ||||
							
								
								
									
										10
									
								
								Yjpp36/dtos/KeywordResult.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Yjpp36/dtos/KeywordResult.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | ||||
| Public Class KeywordItem | ||||
|     '关键字' | ||||
|     Public Property k As String() | ||||
|  | ||||
|     '内容长度' | ||||
|     Public Property l As String() | ||||
|  | ||||
|     '内容长度 忽略符号、空格、换行' | ||||
|     Public Property li As String() | ||||
| End Class | ||||
							
								
								
									
										47
									
								
								Yjpp36/dtos/Result.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								Yjpp36/dtos/Result.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,47 @@ | ||||
| '获取密码返回' | ||||
| Public Class PasswordResult | ||||
|     Public Property code As String | ||||
|     Public Property msg As String | ||||
|     Public Property data As String | ||||
|  | ||||
| End Class | ||||
|  | ||||
| '白名单数据返回' | ||||
| Public Class MahineWhiteResult | ||||
|     Public Property code As String | ||||
|     Public Property msg As String | ||||
|     Public Property data As String | ||||
| End Class | ||||
|  | ||||
| ''' <summary> | ||||
| ''' 心跳返回数据 | ||||
| ''' </summary> | ||||
| Public Class HeartResult | ||||
|     'code 0-成功 1-失败' | ||||
|     Public Property code As Integer | ||||
|     'msg 错误消息' | ||||
|     Public Property msg As String | ||||
|     '进程限制' | ||||
|     Public Property c As String | ||||
|     '应用限制' | ||||
|     Public Property g As String | ||||
|     '进程限制 1-限制 2-不限制' | ||||
|     Public Property tl As Integer | ||||
|     '应用限制 1-限制 2-不限制' | ||||
|     Public Property al As Integer | ||||
|  | ||||
|     '心跳间隔(秒)' | ||||
|     Public Property hi As Integer | ||||
|  | ||||
|     '关键字心跳(秒)' | ||||
|     Public Property ki As Integer | ||||
|  | ||||
|     '关键字过滤 1-开启 2-关闭' | ||||
|     Public Property kl As Integer | ||||
|  | ||||
|     '拦截日志间隔' | ||||
|     Public Property ii As Double | ||||
|  | ||||
|     '是否重启电脑' | ||||
|     Public Property rb As Boolean | ||||
| End Class | ||||
							
								
								
									
										27
									
								
								Yjpp36/service/CopyService.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								Yjpp36/service/CopyService.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | ||||
| Imports System.Net.Http | ||||
|  | ||||
| Public Class CopyService | ||||
|     '本地缓存' | ||||
|     Public LocalKeyWords As KeywordItem() = {} | ||||
|     Public client As HttpClient = New HttpClient | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 缓存关键词数据 | ||||
|     ''' </summary> | ||||
|     ''' <returns></returns> | ||||
|     Public Async Function InitLocal(baseUrl As String) As Task | ||||
|         Try | ||||
|             Dim url As String = $"{baseUrl}/mm-machine/keywords" | ||||
|  | ||||
|             Dim response As HttpResponseMessage = Await client.GetAsync(url) | ||||
|             If response.IsSuccessStatusCode Then | ||||
|                 Dim responseText As String = Await response.Content.ReadAsStringAsync() | ||||
|                 If responseText = "成功更新数据" Then | ||||
|  | ||||
|                 End If | ||||
|             End If | ||||
|         Catch ex As Exception | ||||
|  | ||||
|         End Try | ||||
|     End Function | ||||
| End Class | ||||
							
								
								
									
										3
									
								
								Yjpp36/service/FileService.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								Yjpp36/service/FileService.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| Public Class FileService | ||||
|  | ||||
| End Class | ||||
							
								
								
									
										143
									
								
								Yjpp36/service/Logger.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										143
									
								
								Yjpp36/service/Logger.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,143 @@ | ||||
| Imports System.IO | ||||
| Imports System.Text | ||||
| Imports System.Collections.Concurrent | ||||
|  | ||||
| Public Module Logger | ||||
|     Private ReadOnly logDirectory As String = "c:\\logs" | ||||
|     Private ReadOnly maxLogSizeBytes As Long = 10 * 1024 * 1024 ' 每个文件最大10MB | ||||
|     Private ReadOnly logRetentionDays As Integer = 1 | ||||
|     Private ReadOnly logLock As New Object() | ||||
|     Private ReadOnly logQueue As New ConcurrentQueue(Of String)() | ||||
|     Private ReadOnly logWritingTask As Task | ||||
|  | ||||
|     Public Enum LogLevel | ||||
|         Info | ||||
|         Warn | ||||
|         [Error] | ||||
|         Debug | ||||
|     End Enum | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 初始化日志写入任务 | ||||
|     ''' </summary> | ||||
|     Sub New() | ||||
|         logWritingTask = Task.Run(AddressOf ProcessLogQueue) | ||||
|     End Sub | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 异步写入带等级的日志 | ||||
|     ''' </summary> | ||||
|     Public Sub WriteLog(level As LogLevel, message As String) | ||||
|         Dim logEntry As String = $"{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff} [{level.ToString().ToUpper()}] {message}" | ||||
|         logQueue.Enqueue(logEntry) | ||||
|     End Sub | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 定期从队列中取出日志并写入文件 | ||||
|     ''' </summary> | ||||
|     Private Async Sub ProcessLogQueue() | ||||
|         While True | ||||
|             ' 确保日志写入任务不会频繁创建线程 | ||||
|             If logQueue.IsEmpty Then | ||||
|                 Await Task.Delay(500) ' 等待一段时间再检查队列 | ||||
|             End If | ||||
|             ' 使用 TryDequeue 从队列中获取 logEntry | ||||
|             Dim logEntry As String = Nothing | ||||
|             If logQueue.TryDequeue(logEntry) Then | ||||
|                 WriteLogToFile(logEntry) | ||||
|             End If | ||||
|         End While | ||||
|     End Sub | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 写入日志到文件 | ||||
|     ''' </summary> | ||||
|     Private Sub WriteLogToFile(logEntry As String) | ||||
|         Try | ||||
|             SyncLock logLock | ||||
|                 If Not Directory.Exists(logDirectory) Then | ||||
|                     Directory.CreateDirectory(logDirectory) | ||||
|                 End If | ||||
|  | ||||
|                 CleanupOldLogs() | ||||
|  | ||||
|                 Dim todayFile As String = Path.Combine(logDirectory, $"{Date.Today:yyyy-MM-dd}.log") | ||||
|  | ||||
|                 If File.Exists(todayFile) Then | ||||
|                     Dim fileInfo As New FileInfo(todayFile) | ||||
|                     If fileInfo.Length > maxLogSizeBytes Then | ||||
|                         BackupAndClear(todayFile) | ||||
|                     End If | ||||
|                 End If | ||||
|  | ||||
|                 Using sw As New StreamWriter(todayFile, append:=True, encoding:=Encoding.UTF8) | ||||
|                     sw.WriteLine(logEntry) | ||||
|                 End Using | ||||
|             End SyncLock | ||||
|         Catch | ||||
|             ' 忽略日志写入错误 | ||||
|         End Try | ||||
|     End Sub | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 清理过期的日志文件 | ||||
|     ''' </summary> | ||||
|     Private Sub CleanupOldLogs() | ||||
|         Try | ||||
|             Dim files = Directory.GetFiles(logDirectory) | ||||
|             For Each file In files | ||||
|                 Dim fileName = Path.GetFileNameWithoutExtension(file) | ||||
|                 Dim dateStr = fileName.Split("_"c).FirstOrDefault() | ||||
|                 If Date.TryParse(dateStr, Nothing) Then | ||||
|                     Dim fileDate = Date.Parse(dateStr) | ||||
|                     If (Date.Today - fileDate).Days >= logRetentionDays Then | ||||
|                         file.Remove(file) | ||||
|                     End If | ||||
|                 End If | ||||
|             Next | ||||
|         Catch | ||||
|             ' 忽略清理错误 | ||||
|         End Try | ||||
|     End Sub | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 备份并清空日志文件 | ||||
|     ''' </summary> | ||||
|     Private Sub BackupAndClear(filePath As String) | ||||
|         Try | ||||
|             Dim bakFile As String = filePath.Replace(".log", $"_{DateTime.Now:HHmmss}.bak") | ||||
|             File.Copy(filePath, bakFile, overwrite:=True) | ||||
|             File.WriteAllText(filePath, "") ' 清空日志内容 | ||||
|         Catch | ||||
|             ' 忽略备份错误 | ||||
|         End Try | ||||
|     End Sub | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 快捷方法:写 Info 日志 | ||||
|     ''' </summary> | ||||
|     Public Sub Info(message As String) | ||||
|         'WriteLog(LogLevel.Info, message) | ||||
|     End Sub | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 快捷方法:写 Warning 日志 | ||||
|     ''' </summary> | ||||
|     Public Sub Warn(message As String) | ||||
|         'WriteLog(LogLevel.Warn, message) | ||||
|     End Sub | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 快捷方法:写 Error 日志 | ||||
|     ''' </summary> | ||||
|     Public Sub [Error](message As String) | ||||
|         'WriteLog(LogLevel.Error, message) | ||||
|     End Sub | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 快捷方法:写 Debug 日志 | ||||
|     ''' </summary> | ||||
|     Public Sub Debug(message As String) | ||||
|         'WriteLog(LogLevel.Debug, message) | ||||
|     End Sub | ||||
| End Module | ||||
							
								
								
									
										157
									
								
								Yjpp36/service/StringEncryption.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								Yjpp36/service/StringEncryption.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,157 @@ | ||||
| Imports System.IO | ||||
| Imports System.Security.Cryptography | ||||
| Imports System.Text | ||||
|  | ||||
| Public Class StringEncryption | ||||
|  | ||||
|     Public Shared KeyBase64 As String = "JVr/l75Wv29+d643g7+h89Q2Z4m/a1bY09iKz8Wn6as=" | ||||
|     Public Shared IVBase64 As String = "n869V+6/7Q11p049/wE99g==" | ||||
|  | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 使用 AES 加密字符串。 | ||||
|     ''' </summary> | ||||
|     ''' <param name="plainText">要加密的明文字符串。</param> | ||||
|     ''' <param name="key">用于加密的密钥(必须是 AES 密钥大小,例如 128, 192 或 256 位)。</param> | ||||
|     ''' <param name="iv">初始化向量(IV),用于增加加密的随机性(必须是 AES 块大小,即 16 字节)。</param> | ||||
|     ''' <returns>Base64 编码的密文字符串。</returns> | ||||
|     Public Shared Function EncryptStringAES(plainText As String, KeyBase64 As String, IVBase64 As String) As String | ||||
|         Dim Key As Byte() | ||||
|         Dim iv As Byte() | ||||
|         Try | ||||
|             Key = System.Convert.FromBase64String(KeyBase64) | ||||
|             iv = System.Convert.FromBase64String(IVBase64) | ||||
|         Catch ex As Exception | ||||
|             Console.WriteLine("密钥和向量失败 err:", ex.Message) | ||||
|         End Try | ||||
|         ' 检查输入是否有效 | ||||
|         If plainText Is Nothing OrElse plainText.Length <= 0 Then | ||||
|             Throw New ArgumentNullException("plainText") | ||||
|         End If | ||||
|         If Key Is Nothing OrElse Key.Length <= 0 Then | ||||
|             Throw New ArgumentNullException("key") | ||||
|         End If | ||||
|         If iv Is Nothing OrElse iv.Length <= 0 Then | ||||
|             Throw New ArgumentNullException("iv") | ||||
|         End If | ||||
|         If Key.Length <> 16 AndAlso Key.Length <> 24 AndAlso Key.Length <> 32 Then | ||||
|             Throw New ArgumentException("密钥长度必须为 128, 192 或 256 位 (16, 24 或 32 字节)。") | ||||
|         End If | ||||
|         If iv.Length <> 16 Then | ||||
|             Throw New ArgumentException("IV 长度必须为 128 位 (16 字节)。") | ||||
|         End If | ||||
|  | ||||
|         Dim encrypted As Byte() | ||||
|  | ||||
|         ' 使用 AES 加密 | ||||
|         Using aesAlg As Aes = Aes.Create() | ||||
|             aesAlg.Key = Key | ||||
|             aesAlg.IV = iv | ||||
|  | ||||
|             ' 创建加密器 | ||||
|             Dim encryptor As ICryptoTransform = aesAlg.CreateEncryptor(aesAlg.Key, aesAlg.IV) | ||||
|  | ||||
|             ' 使用内存流进行加密 | ||||
|             Using msEncrypt As New MemoryStream() | ||||
|                 Using csEncrypt As New CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write) | ||||
|                     Using swEncrypt As New StreamWriter(csEncrypt) | ||||
|                         ' 将所有数据写入流。 | ||||
|                         swEncrypt.Write(plainText) | ||||
|                     End Using | ||||
|                     encrypted = msEncrypt.ToArray() | ||||
|                 End Using | ||||
|             End Using | ||||
|         End Using | ||||
|  | ||||
|         ' 返回 Base64 编码的加密字节 | ||||
|         Return Convert.ToBase64String(encrypted) | ||||
|     End Function | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 使用 AES 解密字符串。 | ||||
|     ''' </summary> | ||||
|     ''' <param name="cipherText">要解密的 Base64 编码的密文字符串。</param> | ||||
|     ''' <param name="key">用于解密的密钥(必须与加密时使用的密钥相同)。</param> | ||||
|     ''' <param name="iv">用于解密的初始化向量(必须与加密时使用的 IV 相同)。</param> | ||||
|     ''' <returns>解密后的明文字符串。</returns> | ||||
|     Public Shared Function DecryptStringAES(cipherText As String, keyBase As String, ivBase As String) As String | ||||
|         Dim key As Byte() | ||||
|         Dim iv As Byte() | ||||
|  | ||||
|         Try | ||||
|             key = Convert.FromBase64String(KeyBase64) | ||||
|             iv = Convert.FromBase64String(IVBase64) | ||||
|         Catch ex As Exception | ||||
|             Console.WriteLine("密钥和向量失败 err:", ex.Message) | ||||
|         End Try | ||||
|  | ||||
|         ' 检查输入是否有效 | ||||
|         If cipherText Is Nothing OrElse cipherText.Length <= 0 Then | ||||
|             Throw New ArgumentNullException("cipherText") | ||||
|         End If | ||||
|         If key Is Nothing OrElse key.Length <= 0 Then | ||||
|             Throw New ArgumentNullException("key") | ||||
|         End If | ||||
|         If iv Is Nothing OrElse iv.Length <= 0 Then | ||||
|             Throw New ArgumentNullException("iv") | ||||
|         End If | ||||
|         If key.Length <> 16 AndAlso key.Length <> 24 AndAlso key.Length <> 32 Then | ||||
|             Throw New ArgumentException("密钥长度必须为 128, 192 或 256 位 (16, 24 或 32 字节)。") | ||||
|         End If | ||||
|         If iv.Length <> 16 Then | ||||
|             Throw New ArgumentException("IV 长度必须为 128 位 (16 字节)。") | ||||
|         End If | ||||
|  | ||||
|         ' 将 Base64 编码的密文转换为字节数组 | ||||
|         Dim encryptedBytes As Byte() = Convert.FromBase64String(cipherText) | ||||
|  | ||||
|         ' 用于存储解密后的明文 | ||||
|         Dim plaintext As String = String.Empty | ||||
|  | ||||
|         ' 使用 AES 解密 | ||||
|         Using aesAlg As Aes = Aes.Create() | ||||
|             aesAlg.Key = key | ||||
|             aesAlg.IV = iv | ||||
|  | ||||
|             ' 创建解密器 | ||||
|             Dim decryptor As ICryptoTransform = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV) | ||||
|  | ||||
|             ' 使用内存流进行解密 | ||||
|             Using msDecrypt As New MemoryStream(encryptedBytes) | ||||
|                 Using csDecrypt As New CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read) | ||||
|                     Using srDecrypt As New StreamReader(csDecrypt) | ||||
|                         ' 从解密流中读取所有字节并将其解码为字符串。 | ||||
|                         plaintext = srDecrypt.ReadToEnd() | ||||
|                     End Using | ||||
|                 End Using | ||||
|             End Using | ||||
|         End Using | ||||
|  | ||||
|         Return plaintext | ||||
|     End Function | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 生成一个随机的 AES 密钥。 | ||||
|     ''' </summary> | ||||
|     ''' <param name="keySize">所需的密钥大小(以位为单位,例如 128, 192 或 256)。</param> | ||||
|     ''' <returns>随机生成的密钥字节数组。</returns> | ||||
|     Public Shared Function GenerateRandomKey(keySize As Integer) As Byte() | ||||
|         Using aesAlg As Aes = Aes.Create() | ||||
|             aesAlg.KeySize = keySize | ||||
|             aesAlg.GenerateKey() | ||||
|             Return aesAlg.Key | ||||
|         End Using | ||||
|     End Function | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 生成一个随机的 AES 初始化向量 (IV)。 | ||||
|     ''' </summary> | ||||
|     ''' <returns>随机生成的 IV 字节数组。</returns> | ||||
|     Public Shared Function GenerateRandomIV() As Byte() | ||||
|         Using aesAlg As Aes = Aes.Create() | ||||
|             aesAlg.GenerateIV() | ||||
|             Return aesAlg.IV | ||||
|         End Using | ||||
|     End Function | ||||
|  | ||||
| End Class | ||||
							
								
								
									
										72
									
								
								Yjpp36/service/Updater.vb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								Yjpp36/service/Updater.vb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,72 @@ | ||||
| Imports System.IO | ||||
| Imports System.Net | ||||
| Imports System.Web | ||||
|  | ||||
| Public Class Updater | ||||
|     'Private Shared ReadOnly localPath As String = Application.ExecutablePath | ||||
|     Private Shared ReadOnly tempPath As String = Path.Combine(Path.GetTempPath(), "update_temp.exe") | ||||
|     Private Shared ReadOnly vbsPath As String = Path.Combine(Path.GetTempPath(), "update_script.vbs") | ||||
|  | ||||
|     ''' <summary> | ||||
|     ''' 开始更新任务 | ||||
|     ''' </summary> | ||||
|     ''' <param name="localPath">目标地址</param> | ||||
|     ''' <param name="updateUrl">更新文件地址</param> | ||||
|     ''' <returns></returns> | ||||
|     Public Shared Async Function StartUpdateAsync(localPath As String, updateUrl As String) As Task | ||||
|         Try | ||||
|             ' 下载更新文件 | ||||
|             Using client As New WebClient() | ||||
|                 Await client.DownloadFileTaskAsync(updateUrl, tempPath) | ||||
|                 Logger.Info(updateUrl & "文件下载完毕") | ||||
|             End Using | ||||
|  | ||||
|             ' 创建 VBS 脚本 (修正了 VBScript 语法错误) | ||||
|             Dim vbsContent As String = $" | ||||
| Set WshShell = CreateObject(""WScript.Shell"") | ||||
| WScript.Sleep 4000 | ||||
|  | ||||
| ' 解除保护并替换 EXE | ||||
| On Error Resume Next | ||||
| Set fso = CreateObject(""Scripting.FileSystemObject"") | ||||
|  | ||||
| If fso.FileExists(""{Replace(localPath, "\", "\\")}"") Then | ||||
|     Set f = fso.GetFile(""{Replace(localPath, "\", "\\")}"") | ||||
|     f.Attributes = 0 | ||||
| End If | ||||
|  | ||||
| If fso.FileExists(""{Replace(tempPath, "\", "\\")}"") Then | ||||
|     fso.CopyFile ""{Replace(tempPath, "\", "\\")}"", ""{Replace(localPath, "\", "\\")}"", True | ||||
|     fso.DeleteFile ""{Replace(tempPath, "\", "\\")}"", True | ||||
| End If | ||||
|  | ||||
| ' 设置属性 | ||||
| If fso.FileExists(""{Replace(localPath, "\", "\\")}"") Then | ||||
|     Set f = fso.GetFile(""{Replace(localPath, "\", "\\")}"") | ||||
|     f.Attributes = 4 + 2 + 1 ' System + Hidden + ReadOnly | ||||
| End If | ||||
|  | ||||
| ' 启动新程序 | ||||
| WshShell.Run ""{Replace(localPath, "\", "\\")}"", 0, False | ||||
|  | ||||
| ' 删除自己 | ||||
| fso.DeleteFile WScript.ScriptFullName, True | ||||
| " | ||||
|             File.WriteAllText(vbsPath, vbsContent) | ||||
|  | ||||
|             Logger.Info("启动脚本:" & vbsContent) | ||||
|             ' 启动 VBS 脚本 | ||||
|             Dim p As New Process() | ||||
|             p.StartInfo.FileName = "wscript" | ||||
|             p.StartInfo.Arguments = """" & vbsPath & """"  ' 使用引号包裹路径 | ||||
|             p.Start() | ||||
|  | ||||
|             Logger.Info("退出程序") | ||||
|             ' 退出当前程序 | ||||
|             Environment.Exit(0) | ||||
|         Catch ex As Exception | ||||
|             Logger.Error("更新失败:" & ex.Message) | ||||
|             Throw ' 重要的:重新抛出异常,让调用者知道更新失败 | ||||
|         End Try | ||||
|     End Function | ||||
| End Class | ||||
		Reference in New Issue
	
	Block a user