📄 downloaderror.cs
字号:
namespace Imps.Client.Pc
{
using Imps.Client.Utils;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
public class DownloadError : Form
{
private string _downloadUrl;
private Button btnCancel;
private Button btnRetry;
private IContainer components;
private LinkLabel linkDownloadURL;
private Label lmessage;
private Panel panel1;
internal DownloadError(string downloadUrl)
{
this.InitializeComponent();
this._downloadUrl = downloadUrl;
this.lmessage.Text = "下载中出现错误!\n您可以选择重试,或自行到以下网址下载:";
this.linkDownloadURL.Text = downloadUrl;
}
private void btnCancel_Click(object sender, EventArgs e)
{
base.Close();
}
private void btnRetry_Click(object sender, EventArgs e)
{
base.Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.components != null))
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.btnRetry = new Button();
this.btnCancel = new Button();
this.lmessage = new Label();
this.linkDownloadURL = new LinkLabel();
this.panel1 = new Panel();
this.panel1.SuspendLayout();
base.SuspendLayout();
this.btnRetry.DialogResult = DialogResult.Yes;
this.btnRetry.Location = new System.Drawing.Point(13, 0x47);
this.btnRetry.Name = "btnRetry";
this.btnRetry.Size = new Size(0x73, 0x15);
this.btnRetry.TabIndex = 0;
this.btnRetry.Text = "重新下载";
this.btnRetry.set_UseVisualStyleBackColor(true);
this.btnRetry.Click += new EventHandler(this.btnRetry_Click);
this.btnCancel.DialogResult = DialogResult.No;
this.btnCancel.Location = new System.Drawing.Point(0xb9, 0x47);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new Size(0x73, 0x15);
this.btnCancel.TabIndex = 1;
this.btnCancel.Text = "退出Fetion";
this.btnCancel.set_UseVisualStyleBackColor(true);
this.btnCancel.Click += new EventHandler(this.btnCancel_Click);
this.lmessage.set_AutoSize(true);
this.lmessage.Location = new System.Drawing.Point(10, 11);
this.lmessage.Name = "lmessage";
this.lmessage.Size = new Size(0x2f, 12);
this.lmessage.TabIndex = 2;
this.lmessage.Text = "message";
this.linkDownloadURL.set_AutoSize(true);
this.linkDownloadURL.Location = new System.Drawing.Point(10, 0x2d);
this.linkDownloadURL.Name = "linkDownloadURL";
this.linkDownloadURL.Size = new Size(0x5f, 12);
this.linkDownloadURL.TabIndex = 3;
this.linkDownloadURL.TabStop = true;
this.linkDownloadURL.Text = "linkDownloadURL";
this.linkDownloadURL.LinkClicked += new LinkLabelLinkClickedEventHandler(this.linkDownloadURL_LinkClicked);
this.panel1.BackColor = Color.Transparent;
this.panel1.Controls.Add(this.btnRetry);
this.panel1.Controls.Add(this.linkDownloadURL);
this.panel1.Controls.Add(this.btnCancel);
this.panel1.Controls.Add(this.lmessage);
this.panel1.Dock = DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new Size(0x138, 100);
this.panel1.TabIndex = 4;
base.AcceptButton = this.btnRetry;
base.set_AutoScaleDimensions(new SizeF(6f, 12f));
base.set_AutoScaleMode(1);
base.CancelButton = this.btnCancel;
base.ClientSize = new Size(0x138, 100);
base.Controls.Add(this.panel1);
base.FormBorderStyle = FormBorderStyle.FixedDialog;
base.MaximizeBox = false;
base.MinimizeBox = false;
base.Name = "DownloadError";
base.StartPosition = FormStartPosition.CenterParent;
this.Text = "下载更新失败";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
base.ResumeLayout(false);
}
private void linkDownloadURL_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
ShellHelper.StartUrl(this._downloadUrl);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -