[#] 修复补丁无法在线获取的问题 & 新增提示

This commit is contained in:
huiyadanli 2022-08-06 19:54:53 +08:00
parent 66245b73ff
commit 603d8f535d
9 changed files with 69 additions and 24 deletions

File diff suppressed because one or more lines are too long

View File

@ -16,8 +16,8 @@ namespace RevokeMsgPatcher
return new Bag return new Bag
{ {
Apps = AppConfig(), Apps = AppConfig(),
LatestVersion = "1.5", LatestVersion = "1.6",
PatchVersion = 20220716, PatchVersion = 20220806,
Notice = "" Notice = ""
}; };
} }
@ -121,18 +121,18 @@ namespace RevokeMsgPatcher
EndVersion="", EndVersion="",
ReplacePatterns = new List<ReplacePattern> ReplacePatterns = new List<ReplacePattern>
{ {
//new ReplacePattern new ReplacePattern
//{ {
// Search = ByteUtil.HexStringToByteArray("00 85 C0 74 32 B9 3F 3F 3F 3F 8A"), Search = ByteUtil.HexStringToByteArray("00 85 C0 74 32 B9 3F 3F 3F 3F 8A"),
// Replace = ByteUtil.HexStringToByteArray("00 85 C0 EB 32 B9 3F 3F 3F 3F 8A"), Replace = ByteUtil.HexStringToByteArray("00 85 C0 EB 32 B9 3F 3F 3F 3F 8A"),
// Category = "防撤回" Category = "防撤回(老)"
//}, },
// 带撤回提示 // 带撤回提示
new ReplacePattern new ReplacePattern
{ {
Search = ByteUtil.HexStringToByteArray("80 7D F2 00 6A 01 74"), Search = ByteUtil.HexStringToByteArray("80 7D F2 00 6A 01 74"),
Replace = ByteUtil.HexStringToByteArray("80 7D F2 00 6A 01 EB"), Replace = ByteUtil.HexStringToByteArray("80 7D F2 00 6A 01 EB"),
Category = "防撤回" Category = "防撤回带提示(新)"
}, },
new ReplacePattern new ReplacePattern
{ {

View File

@ -93,6 +93,7 @@
<None Include="Data\1.3\patch.json" /> <None Include="Data\1.3\patch.json" />
<None Include="Data\1.4\patch.json" /> <None Include="Data\1.4\patch.json" />
<None Include="Data\1.5\patch.json" /> <None Include="Data\1.5\patch.json" />
<None Include="Data\1.6\patch.json" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>

View File

@ -28,6 +28,7 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain));
this.lblPathTag = new System.Windows.Forms.Label(); this.lblPathTag = new System.Windows.Forms.Label();
this.btnPatch = new System.Windows.Forms.Button(); this.btnPatch = new System.Windows.Forms.Button();
@ -59,6 +60,7 @@
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.lblCategory = new System.Windows.Forms.Label(); this.lblCategory = new System.Windows.Forms.Label();
this.panelCategories = new System.Windows.Forms.FlowLayoutPanel(); this.panelCategories = new System.Windows.Forms.FlowLayoutPanel();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -76,7 +78,7 @@
// //
this.btnPatch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnPatch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnPatch.Location = new System.Drawing.Point(567, 162); this.btnPatch.Location = new System.Drawing.Point(567, 162);
this.btnPatch.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnPatch.Margin = new System.Windows.Forms.Padding(4);
this.btnPatch.Name = "btnPatch"; this.btnPatch.Name = "btnPatch";
this.btnPatch.Size = new System.Drawing.Size(147, 34); this.btnPatch.Size = new System.Drawing.Size(147, 34);
this.btnPatch.TabIndex = 3; this.btnPatch.TabIndex = 3;
@ -89,7 +91,7 @@
this.txtPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtPath.Location = new System.Drawing.Point(126, 87); this.txtPath.Location = new System.Drawing.Point(126, 87);
this.txtPath.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtPath.Margin = new System.Windows.Forms.Padding(4);
this.txtPath.Name = "txtPath"; this.txtPath.Name = "txtPath";
this.txtPath.Size = new System.Drawing.Size(526, 28); this.txtPath.Size = new System.Drawing.Size(526, 28);
this.txtPath.TabIndex = 4; this.txtPath.TabIndex = 4;
@ -99,7 +101,7 @@
// //
this.btnChoosePath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnChoosePath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnChoosePath.Location = new System.Drawing.Point(663, 84); this.btnChoosePath.Location = new System.Drawing.Point(663, 84);
this.btnChoosePath.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnChoosePath.Margin = new System.Windows.Forms.Padding(4);
this.btnChoosePath.Name = "btnChoosePath"; this.btnChoosePath.Name = "btnChoosePath";
this.btnChoosePath.Size = new System.Drawing.Size(51, 34); this.btnChoosePath.Size = new System.Drawing.Size(51, 34);
this.btnChoosePath.TabIndex = 5; this.btnChoosePath.TabIndex = 5;
@ -133,7 +135,7 @@
// //
this.btnRestore.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnRestore.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnRestore.Location = new System.Drawing.Point(435, 162); this.btnRestore.Location = new System.Drawing.Point(435, 162);
this.btnRestore.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnRestore.Margin = new System.Windows.Forms.Padding(4);
this.btnRestore.Name = "btnRestore"; this.btnRestore.Name = "btnRestore";
this.btnRestore.Size = new System.Drawing.Size(123, 34); this.btnRestore.Size = new System.Drawing.Size(123, 34);
this.btnRestore.TabIndex = 8; this.btnRestore.TabIndex = 8;
@ -179,7 +181,7 @@
this.rbtWechat.AutoSize = true; this.rbtWechat.AutoSize = true;
this.rbtWechat.Checked = true; this.rbtWechat.Checked = true;
this.rbtWechat.Location = new System.Drawing.Point(126, 54); this.rbtWechat.Location = new System.Drawing.Point(126, 54);
this.rbtWechat.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.rbtWechat.Margin = new System.Windows.Forms.Padding(4);
this.rbtWechat.Name = "rbtWechat"; this.rbtWechat.Name = "rbtWechat";
this.rbtWechat.Size = new System.Drawing.Size(69, 22); this.rbtWechat.Size = new System.Drawing.Size(69, 22);
this.rbtWechat.TabIndex = 12; this.rbtWechat.TabIndex = 12;
@ -192,7 +194,7 @@
// //
this.rbtQQ.AutoSize = true; this.rbtQQ.AutoSize = true;
this.rbtQQ.Location = new System.Drawing.Point(213, 54); this.rbtQQ.Location = new System.Drawing.Point(213, 54);
this.rbtQQ.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.rbtQQ.Margin = new System.Windows.Forms.Padding(4);
this.rbtQQ.Name = "rbtQQ"; this.rbtQQ.Name = "rbtQQ";
this.rbtQQ.Size = new System.Drawing.Size(51, 22); this.rbtQQ.Size = new System.Drawing.Size(51, 22);
this.rbtQQ.TabIndex = 13; this.rbtQQ.TabIndex = 13;
@ -204,7 +206,7 @@
// //
this.rbtTIM.AutoSize = true; this.rbtTIM.AutoSize = true;
this.rbtTIM.Location = new System.Drawing.Point(282, 54); this.rbtTIM.Location = new System.Drawing.Point(282, 54);
this.rbtTIM.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.rbtTIM.Margin = new System.Windows.Forms.Padding(4);
this.rbtTIM.Name = "rbtTIM"; this.rbtTIM.Name = "rbtTIM";
this.rbtTIM.Size = new System.Drawing.Size(60, 22); this.rbtTIM.Size = new System.Drawing.Size(60, 22);
this.rbtTIM.TabIndex = 14; this.rbtTIM.TabIndex = 14;
@ -226,7 +228,7 @@
// //
this.rbtQQLite.AutoSize = true; this.rbtQQLite.AutoSize = true;
this.rbtQQLite.Location = new System.Drawing.Point(356, 54); this.rbtQQLite.Location = new System.Drawing.Point(356, 54);
this.rbtQQLite.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.rbtQQLite.Margin = new System.Windows.Forms.Padding(4);
this.rbtQQLite.Name = "rbtQQLite"; this.rbtQQLite.Name = "rbtQQLite";
this.rbtQQLite.Size = new System.Drawing.Size(105, 22); this.rbtQQLite.Size = new System.Drawing.Size(105, 22);
this.rbtQQLite.TabIndex = 18; this.rbtQQLite.TabIndex = 18;
@ -244,7 +246,7 @@
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; this.menuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
this.menuStrip1.Size = new System.Drawing.Size(735, 34); this.menuStrip1.Size = new System.Drawing.Size(735, 32);
this.menuStrip1.TabIndex = 19; this.menuStrip1.TabIndex = 19;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
@ -332,14 +334,14 @@
// 作者ToolStripMenuItem // 作者ToolStripMenuItem
// //
this.ToolStripMenuItem.Name = "作者ToolStripMenuItem"; this.ToolStripMenuItem.Name = "作者ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(182, 34); this.ToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.ToolStripMenuItem.Text = "关于"; this.ToolStripMenuItem.Text = "关于";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click); this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
// 主页ToolStripMenuItem // 主页ToolStripMenuItem
// //
this.ToolStripMenuItem.Name = "主页ToolStripMenuItem"; this.ToolStripMenuItem.Name = "主页ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(182, 34); this.ToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.ToolStripMenuItem.Text = "软件主页"; this.ToolStripMenuItem.Text = "软件主页";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click); this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
@ -355,8 +357,9 @@
// //
// panelCategories // panelCategories
// //
this.panelCategories.AutoSize = true;
this.panelCategories.Location = new System.Drawing.Point(124, 128); this.panelCategories.Location = new System.Drawing.Point(124, 128);
this.panelCategories.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelCategories.Margin = new System.Windows.Forms.Padding(4);
this.panelCategories.Name = "panelCategories"; this.panelCategories.Name = "panelCategories";
this.panelCategories.Size = new System.Drawing.Size(590, 27); this.panelCategories.Size = new System.Drawing.Size(590, 27);
this.panelCategories.TabIndex = 22; this.panelCategories.TabIndex = 22;
@ -386,7 +389,7 @@
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1; this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.Margin = new System.Windows.Forms.Padding(4);
this.MinimumSize = new System.Drawing.Size(748, 196); this.MinimumSize = new System.Drawing.Size(748, 196);
this.Name = "FormMain"; this.Name = "FormMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
@ -430,6 +433,7 @@
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.Label lblCategory; private System.Windows.Forms.Label lblCategory;
private System.Windows.Forms.FlowLayoutPanel panelCategories; private System.Windows.Forms.FlowLayoutPanel panelCategories;
private System.Windows.Forms.ToolTip toolTip1;
} }
} }

View File

@ -154,6 +154,25 @@ namespace RevokeMsgPatcher
btnRestore.Enabled = modifier.BackupExists(); btnRestore.Enabled = modifier.BackupExists();
return; return;
} }
// 20220806 偷懒的特殊逻辑,用于提示用户选择对防撤回功能进行二选一
if (categories.Contains("防撤回(老)") && categories.Contains("防撤回带提示(新)"))
{
DialogResult result = MessageBox.Show(@"防撤回(老) 和 防撤回带提示(新) 两个功能二选一即可!
1. ()
2. ()
a.
b. /
c.
", "", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result != DialogResult.Yes)
{
return;
}
}
// c.计算SHA1验证文件完整性寻找对应的补丁信息精确版本、通用特征码两种补丁信息 // c.计算SHA1验证文件完整性寻找对应的补丁信息精确版本、通用特征码两种补丁信息
try try
{ {

View File

@ -120,6 +120,9 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>182, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>

View File

@ -10,6 +10,21 @@ namespace RevokeMsgPatcher.Model
public string Category { get; set; } public string Category { get; set; }
/// <summary>
/// 悬浮气泡提示
/// </summary>
public string Tips { get; set; }
/// <summary>
/// 同类冲突标签
/// </summary>
public string SimilarCategories { get; set; }
/// <summary>
/// 选择同类冲突标签时的提示
/// </summary>
public string ChooseSimilarCategoriesMsg { get; set; }
public ReplacePattern Clone() public ReplacePattern Clone()
{ {
ReplacePattern o = new ReplacePattern(); ReplacePattern o = new ReplacePattern();

File diff suppressed because one or more lines are too long

View File

@ -22,10 +22,12 @@ namespace RevokeMsgPatcher.Utils
/// https://huiyadanli.github.io/i/revokemsg/05.json /// https://huiyadanli.github.io/i/revokemsg/05.json
/// 会自动跳转,没用了 /// 会自动跳转,没用了
/// https://gitee.com/huiyadanli/RevokeMsgPatcher/raw/master/RevokeMsgPatcher.Assistant/Data/1.2/patch.json /// https://gitee.com/huiyadanli/RevokeMsgPatcher/raw/master/RevokeMsgPatcher.Assistant/Data/1.2/patch.json
/// 需要登录,没用了
/// https://huiyadanli.coding.net/p/RevokeMsgPatcher/d/RevokeMsgPatcher/git/raw/master/RevokeMsgPatcher.Assistant/Data/1.5/patch.json
/// </summary> /// </summary>
private static readonly string[] urls = new string[] private static readonly string[] urls = new string[]
{ {
"https://huiyadanli.coding.net/p/RevokeMsgPatcher/d/RevokeMsgPatcher/git/raw/master/RevokeMsgPatcher.Assistant/Data/1.5/patch.json", "https://hui-config.oss-cn-hangzhou.aliyuncs.com/1.6/patch.json",
"https://raw.githubusercontent.com/huiyadanli/RevokeMsgPatcher/master/RevokeMsgPatcher.Assistant/Data/1.5/patch.json" "https://raw.githubusercontent.com/huiyadanli/RevokeMsgPatcher/master/RevokeMsgPatcher.Assistant/Data/1.5/patch.json"
}; };