feat: 更新到最新升级程序

This commit is contained in:
LittleBoy 2025-04-15 22:22:17 +08:00
parent 7cfab47216
commit 7e7718b9e0
3 changed files with 15 additions and 37 deletions

Binary file not shown.

View File

@ -35,8 +35,7 @@
this.panel1 = new System.Windows.Forms.Panel();
this.IconClose = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.panelLog = new System.Windows.Forms.Panel();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.panelLog = new AntdUI.Panel();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.IconClose)).BeginInit();
this.panelLog.SuspendLayout();
@ -44,12 +43,13 @@
//
// LabelLog
//
this.LabelLog.AutoEllipsis = true;
this.LabelLog.BackColor = System.Drawing.Color.Transparent;
this.LabelLog.Dock = System.Windows.Forms.DockStyle.Fill;
this.LabelLog.Font = new System.Drawing.Font("微软雅黑", 10F);
this.LabelLog.Location = new System.Drawing.Point(2, 2);
this.LabelLog.MaximumSize = new System.Drawing.Size(296, 0);
this.LabelLog.MinimumSize = new System.Drawing.Size(296, 0);
this.LabelLog.Location = new System.Drawing.Point(5, 5);
this.LabelLog.Name = "LabelLog";
this.LabelLog.Size = new System.Drawing.Size(296, 21);
this.LabelLog.Size = new System.Drawing.Size(290, 100);
this.LabelLog.TabIndex = 0;
this.LabelLog.Text = "版本检测中 ...";
this.LabelLog.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -114,31 +114,21 @@
//
// panelLog
//
this.panelLog.AutoScroll = true;
this.panelLog.Back = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(248)))), ((int)(((byte)(249)))));
this.panelLog.Controls.Add(this.LabelLog);
this.panelLog.Location = new System.Drawing.Point(40, 58);
this.panelLog.Location = new System.Drawing.Point(40, 60);
this.panelLog.Name = "panelLog";
this.panelLog.Size = new System.Drawing.Size(300, 114);
this.panelLog.Padding = new System.Windows.Forms.Padding(5);
this.panelLog.Radius = 4;
this.panelLog.Size = new System.Drawing.Size(300, 110);
this.panelLog.TabIndex = 8;
//
// richTextBox1
//
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Location = new System.Drawing.Point(237, 149);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.richTextBox1.Size = new System.Drawing.Size(100, 96);
this.richTextBox1.TabIndex = 9;
this.richTextBox1.Text = "";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(380, 260);
this.Controls.Add(this.richTextBox1);
this.Controls.Add(this.panelLog);
this.Controls.Add(this.panel1);
this.Controls.Add(this.ButtonProcess);
@ -168,8 +158,7 @@
private System.Windows.Forms.PictureBox IconClose;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panelLog;
private System.Windows.Forms.RichTextBox richTextBox1;
private AntdUI.Panel panelLog;
}
}

View File

@ -30,11 +30,7 @@ namespace updater
* pre-gm-plugin.gachafun.com
* gm-plugin.gachafun.com
*/
#if DEBUG
private static string UpgradeInfoURI = "https://gm-plugin.gachafun.com/";
#else
private static string UpgradeInfoURI = "https://gm-plugin.gachafun.com/";
#endif
private static string UpgradeInfoURI = "https://gm-plugin-fn.gachafun.com/";
private string updateSource;
@ -187,15 +183,8 @@ namespace updater
private void ProcessUpdate(UpgradeModel update)
{
this.upgradeInfo = update.Info;
//richTextBox1.Text
richTextBox1.Text = update.Info.Message
+ @"Com加载项勾选
office或wps的版本
Com加载项勾选
windowS10或11wps在安装插件";
LabelLog.Text = update.Info.Message;
if (localVersion == null || update.Info.NeedUpgrade(localVersion.Version))
{