From 15d495a3446268f4decaba5e5a780ff6e3a85ece Mon Sep 17 00:00:00 2001 From: sang Date: Wed, 16 Nov 2022 18:01:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E7=BD=AE=E9=A1=B9?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B0=E8=AF=B4=E6=98=8E=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hacker/App.config | 3 + Hacker/Hacker.csproj | 1 - Hacker/Main.Designer.cs | 1 + Hacker/Main.cs | 9 ++ Hacker/Properties/AssemblyInfo.cs | 4 +- Hacker/Properties/Settings.Designer.cs | 12 ++ Hacker/Properties/Settings.settings | 3 + Hacker/SetConfig.Designer.cs | 34 ++++- Hacker/SetConfig.cs | 2 + Hacker/html/hacker.html | 1 + Hacker/html/love.html | 7 +- README.md | 190 +++++++++++++++++++++++-- doc/3.png | Bin 0 -> 3219 bytes doc/4.png | Bin 0 -> 20630 bytes doc/5.png | Bin 0 -> 6115 bytes 15 files changed, 249 insertions(+), 18 deletions(-) create mode 100644 doc/3.png create mode 100644 doc/4.png create mode 100644 doc/5.png diff --git a/Hacker/App.config b/Hacker/App.config index fe83eb4..de829d4 100644 --- a/Hacker/App.config +++ b/Hacker/App.config @@ -16,6 +16,9 @@ + + 100 + \ No newline at end of file diff --git a/Hacker/Hacker.csproj b/Hacker/Hacker.csproj index f576c38..80c9c12 100644 --- a/Hacker/Hacker.csproj +++ b/Hacker/Hacker.csproj @@ -141,7 +141,6 @@ - diff --git a/Hacker/Main.Designer.cs b/Hacker/Main.Designer.cs index 2f1c6f5..59a4c9f 100644 --- a/Hacker/Main.Designer.cs +++ b/Hacker/Main.Designer.cs @@ -60,6 +60,7 @@ private void InitializeComponent() this.picLogo.TabIndex = 1; this.picLogo.TabStop = false; this.picLogo.Visible = false; + this.picLogo.Click += new System.EventHandler(this.picLogo_Click); // // Main // diff --git a/Hacker/Main.cs b/Hacker/Main.cs index c81c297..0de905a 100644 --- a/Hacker/Main.cs +++ b/Hacker/Main.cs @@ -56,6 +56,11 @@ public Main(IntPtr intPtr) private void Main_Load(object sender, EventArgs e) { + // 不透明度生效 + if (Properties.Settings.Default.Opacity > 9 && Properties.Settings.Default.Opacity < 100) { + this.Opacity = (double)Properties.Settings.Default.Opacity / 100; + } + var url = Properties.Settings.Default.uInfo; bool isLocal = Properties.Settings.Default.isLocal; // 未设置或未空,则默认 @@ -122,5 +127,9 @@ private void Main_FormClosed(object sender, FormClosedEventArgs e) } } + private void picLogo_Click(object sender, EventArgs e) + { + Application.Exit(); + } } } diff --git a/Hacker/Properties/AssemblyInfo.cs b/Hacker/Properties/AssemblyInfo.cs index 72fd66f..078b2af 100644 --- a/Hacker/Properties/AssemblyInfo.cs +++ b/Hacker/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //通过使用 "*",如下所示: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0.0")] -[assembly: AssemblyFileVersion("1.1.0.0")] +[assembly: AssemblyVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.2.0.0")] diff --git a/Hacker/Properties/Settings.Designer.cs b/Hacker/Properties/Settings.Designer.cs index 5354811..faad354 100644 --- a/Hacker/Properties/Settings.Designer.cs +++ b/Hacker/Properties/Settings.Designer.cs @@ -46,5 +46,17 @@ public string uInfo { this["uInfo"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("100")] + public int Opacity { + get { + return ((int)(this["Opacity"])); + } + set { + this["Opacity"] = value; + } + } } } diff --git a/Hacker/Properties/Settings.settings b/Hacker/Properties/Settings.settings index ac8232e..f08ddab 100644 --- a/Hacker/Properties/Settings.settings +++ b/Hacker/Properties/Settings.settings @@ -8,5 +8,8 @@ + + 100 + \ No newline at end of file diff --git a/Hacker/SetConfig.Designer.cs b/Hacker/SetConfig.Designer.cs index 108d720..c13d334 100644 --- a/Hacker/SetConfig.Designer.cs +++ b/Hacker/SetConfig.Designer.cs @@ -35,7 +35,11 @@ private void InitializeComponent() this.radLocal = new System.Windows.Forms.RadioButton(); this.btnOk = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.optBar = new System.Windows.Forms.TrackBar(); this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.optBar)).BeginInit(); this.SuspendLayout(); // // groupBox1 @@ -62,7 +66,6 @@ private void InitializeComponent() // // txtInfo // - this.txtInfo.BorderStyle = System.Windows.Forms.BorderStyle.None; this.txtInfo.Location = new System.Drawing.Point(19, 85); this.txtInfo.Multiline = true; this.txtInfo.Name = "txtInfo"; @@ -115,13 +118,35 @@ private void InitializeComponent() this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // + // groupBox2 + // + this.groupBox2.Controls.Add(this.optBar); + this.groupBox2.Location = new System.Drawing.Point(12, 172); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(244, 82); + this.groupBox2.TabIndex = 3; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "不透明度"; + // + // optBar + // + this.optBar.Location = new System.Drawing.Point(12, 30); + this.optBar.Maximum = 100; + this.optBar.Minimum = 10; + this.optBar.Name = "optBar"; + this.optBar.Size = new System.Drawing.Size(220, 45); + this.optBar.TabIndex = 0; + this.optBar.TickFrequency = 10; + this.optBar.Value = 100; + // // SetConfig // this.AcceptButton = this.btnOk; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(408, 173); + this.ClientSize = new System.Drawing.Size(408, 266); + this.Controls.Add(this.groupBox2); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnOk); this.Controls.Add(this.groupBox1); @@ -133,6 +158,9 @@ private void InitializeComponent() this.Load += new System.EventHandler(this.SetConfig_Load); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.optBar)).EndInit(); this.ResumeLayout(false); } @@ -146,5 +174,7 @@ private void InitializeComponent() private System.Windows.Forms.RadioButton radNet; private System.Windows.Forms.RadioButton radLocal; private System.Windows.Forms.Label labTip; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TrackBar optBar; } } \ No newline at end of file diff --git a/Hacker/SetConfig.cs b/Hacker/SetConfig.cs index a36e44a..32169fa 100644 --- a/Hacker/SetConfig.cs +++ b/Hacker/SetConfig.cs @@ -51,6 +51,7 @@ private void btnOk_Click(object sender, EventArgs e) } Properties.Settings.Default.isLocal = radLocal.Checked; Properties.Settings.Default.uInfo = txtInfo.Text; + Properties.Settings.Default.Opacity = optBar.Value; Properties.Settings.Default.Save(); Application.Exit(); } @@ -68,6 +69,7 @@ private void SetConfig_Load(object sender, EventArgs e) var url = Properties.Settings.Default.uInfo; bool isLocal = Properties.Settings.Default.isLocal; + optBar.Value = Properties.Settings.Default.Opacity; labTip.Text = isLocal?"点击下方文本框选择一个网页文件":"请在下方输入一个网址"; radLocal.Checked= isLocal; radNet.Checked= !isLocal; diff --git a/Hacker/html/hacker.html b/Hacker/html/hacker.html index 877330e..50858fb 100644 --- a/Hacker/html/hacker.html +++ b/Hacker/html/hacker.html @@ -1,6 +1,7 @@  Hacker Typer +