[+] 使用新的对象、使用了新的UI

This commit is contained in:
huiyadanli 2019-09-15 23:58:47 +08:00
parent 6d7361df65
commit 34b8b81588
7 changed files with 343 additions and 21 deletions

View File

@ -37,21 +37,44 @@
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.btnRestore = new System.Windows.Forms.Button();
this.lblUpdatePachJson = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.SuspendLayout();
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(17, 15);
this.label2.Location = new System.Drawing.Point(6, 17);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(65, 12);
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 1;
this.label2.Text = "微信路径:";
this.label2.Text = "路径:";
//
// btnPatch
//
this.btnPatch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnPatch.Location = new System.Drawing.Point(409, 10);
this.btnPatch.Location = new System.Drawing.Point(366, 39);
this.btnPatch.Name = "btnPatch";
this.btnPatch.Size = new System.Drawing.Size(102, 23);
this.btnPatch.TabIndex = 3;
@ -63,15 +86,14 @@
//
this.txtPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtPath.Location = new System.Drawing.Point(88, 12);
this.txtPath.Location = new System.Drawing.Point(52, 12);
this.txtPath.Name = "txtPath";
this.txtPath.Size = new System.Drawing.Size(275, 21);
this.txtPath.Size = new System.Drawing.Size(376, 21);
this.txtPath.TabIndex = 4;
//
// btnChoosePath
//
this.btnChoosePath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnChoosePath.Location = new System.Drawing.Point(369, 10);
this.btnChoosePath.Location = new System.Drawing.Point(434, 12);
this.btnChoosePath.Name = "btnChoosePath";
this.btnChoosePath.Size = new System.Drawing.Size(34, 23);
this.btnChoosePath.TabIndex = 5;
@ -82,7 +104,7 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(17, 44);
this.label1.Location = new System.Drawing.Point(7, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(101, 12);
this.label1.TabIndex = 6;
@ -91,7 +113,7 @@
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(112, 44);
this.linkLabel1.Location = new System.Drawing.Point(102, 13);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(41, 12);
this.linkLabel1.TabIndex = 7;
@ -101,8 +123,7 @@
//
// btnRestore
//
this.btnRestore.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnRestore.Location = new System.Drawing.Point(409, 39);
this.btnRestore.Location = new System.Drawing.Point(258, 39);
this.btnRestore.Name = "btnRestore";
this.btnRestore.Size = new System.Drawing.Size(102, 23);
this.btnRestore.TabIndex = 8;
@ -114,31 +135,241 @@
//
this.lblUpdatePachJson.AutoSize = true;
this.lblUpdatePachJson.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblUpdatePachJson.Location = new System.Drawing.Point(198, 44);
this.lblUpdatePachJson.Location = new System.Drawing.Point(196, 13);
this.lblUpdatePachJson.Name = "lblUpdatePachJson";
this.lblUpdatePachJson.Size = new System.Drawing.Size(131, 12);
this.lblUpdatePachJson.TabIndex = 9;
this.lblUpdatePachJson.Text = "获取最新补丁信息中...";
this.lblUpdatePachJson.Click += new System.EventHandler(this.lblUpdatePachJson_Click);
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tabControl1.Location = new System.Drawing.Point(0, 37);
this.tabControl1.Multiline = true;
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(491, 101);
this.tabControl1.TabIndex = 10;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.label4);
this.tabPage1.Controls.Add(this.label3);
this.tabPage1.Controls.Add(this.txtPath);
this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.btnRestore);
this.tabPage1.Controls.Add(this.btnPatch);
this.tabPage1.Controls.Add(this.btnChoosePath);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(483, 74);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "微信";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.label5);
this.tabPage2.Controls.Add(this.label6);
this.tabPage2.Controls.Add(this.textBox1);
this.tabPage2.Controls.Add(this.label7);
this.tabPage2.Controls.Add(this.button1);
this.tabPage2.Controls.Add(this.button2);
this.tabPage2.Controls.Add(this.button3);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(483, 75);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "QQ";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.label8);
this.tabPage3.Controls.Add(this.label9);
this.tabPage3.Controls.Add(this.textBox2);
this.tabPage3.Controls.Add(this.label10);
this.tabPage3.Controls.Add(this.button4);
this.tabPage3.Controls.Add(this.button5);
this.tabPage3.Controls.Add(this.button6);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(483, 74);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "TIM";
this.tabPage3.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 44);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 9;
this.label3.Text = "版本:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(50, 44);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(35, 12);
this.label4.TabIndex = 10;
this.label4.Text = "0.0.1";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(50, 44);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(35, 12);
this.label5.TabIndex = 17;
this.label5.Text = "0.0.1";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(6, 44);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(41, 12);
this.label6.TabIndex = 16;
this.label6.Text = "版本:";
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Location = new System.Drawing.Point(52, 12);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(376, 21);
this.textBox1.TabIndex = 13;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(6, 17);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(41, 12);
this.label7.TabIndex = 11;
this.label7.Text = "路径:";
//
// button1
//
this.button1.Location = new System.Drawing.Point(258, 39);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(102, 23);
this.button1.TabIndex = 15;
this.button1.Text = "备份还原";
this.button1.UseVisualStyleBackColor = true;
//
// button2
//
this.button2.Location = new System.Drawing.Point(366, 39);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(102, 23);
this.button2.TabIndex = 12;
this.button2.Text = "点我防撤回!";
this.button2.UseVisualStyleBackColor = true;
//
// button3
//
this.button3.Location = new System.Drawing.Point(434, 12);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(34, 23);
this.button3.TabIndex = 14;
this.button3.Text = "...";
this.button3.UseVisualStyleBackColor = true;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(50, 44);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(35, 12);
this.label8.TabIndex = 17;
this.label8.Text = "0.0.1";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(6, 44);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(41, 12);
this.label9.TabIndex = 16;
this.label9.Text = "版本:";
//
// textBox2
//
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox2.Location = new System.Drawing.Point(52, 12);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(376, 21);
this.textBox2.TabIndex = 13;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(6, 17);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(41, 12);
this.label10.TabIndex = 11;
this.label10.Text = "路径:";
//
// button4
//
this.button4.Location = new System.Drawing.Point(258, 39);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(102, 23);
this.button4.TabIndex = 15;
this.button4.Text = "备份还原";
this.button4.UseVisualStyleBackColor = true;
//
// button5
//
this.button5.Location = new System.Drawing.Point(366, 39);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(102, 23);
this.button5.TabIndex = 12;
this.button5.Text = "点我防撤回!";
this.button5.UseVisualStyleBackColor = true;
//
// button6
//
this.button6.Location = new System.Drawing.Point(434, 12);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(34, 23);
this.button6.TabIndex = 14;
this.button6.Text = "...";
this.button6.UseVisualStyleBackColor = true;
//
// FormMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(523, 69);
this.ClientSize = new System.Drawing.Size(491, 138);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.lblUpdatePachJson);
this.Controls.Add(this.btnRestore);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnChoosePath);
this.Controls.Add(this.txtPath);
this.Controls.Add(this.btnPatch);
this.Controls.Add(this.label2);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FormMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "微信防撤回补丁";
this.Text = "微信/QQ/TIM防撤回补丁";
this.Load += new System.EventHandler(this.FormMain_Load);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -153,6 +384,26 @@
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.Button btnRestore;
private System.Windows.Forms.Label lblUpdatePachJson;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RevokeMsgPatcher.Model
{
public class App
{
public string Name { get; set; }
public List<Version> Versions { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RevokeMsgPatcher.Model
{
public class BinaryFile
{
public string Name { get; set; }
public string Version { get; set; }
public string SHA1Before { get; set; }
public string SHA1After { get; set; }
public List<Change> Changes { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RevokeMsgPatcher.Model
{
public class Change
{
public long Position { get; set; }
public byte Content { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RevokeMsgPatcher.Model
{
public class Version
{
public string AppVersion { get; set; }
public List<BinaryFile> Files { get; set; }
}
}

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Web.Script.Serialization;
using File = System.IO.File;
namespace RevokeMsgPatcher
{

View File

@ -55,7 +55,11 @@
<Compile Include="FormMain.Designer.cs">
<DependentUpon>FormMain.cs</DependentUpon>
</Compile>
<Compile Include="Model\App.cs" />
<Compile Include="Model\Change.cs" />
<Compile Include="Model\BinaryFile.cs" />
<Compile Include="Model\TargetFile.cs" />
<Compile Include="Model\Version.cs" />
<Compile Include="Patcher.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />