⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 continueupdate.cs

📁 飞信的收发使用csharp进行开发
💻 CS
字号:
namespace Imps.Client.Pc
{
    using Imps.Client;
    using Imps.Client.Pc.BizControls;
    using Imps.Client.Pc.Controls;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class ContinueUpdate : XIMDialog
    {
        private IFrameworkWindow _mainWnd;
        private UpdateInfo _updateInfo;
        private XButton btnCancel;
        private XButton btnOK;
        private IContainer components;
        private Label lMessage;
        private Panel pnlContainer;

        internal ContinueUpdate(UpdateInfo updateInfo, IFrameworkWindow mainWnd)
        {
            this.InitializeComponent();
            this.lMessage.Text = "Fetion检测到上次的更新操作还没有完成\n是否继续更新?";
            this._mainWnd = mainWnd;
            this._updateInfo = updateInfo;
            this.btnOK.Text = "继续更新";
            if ((updateInfo.Type == UpdateType.force) && (mainWnd.AccountManager.CurrentUser.Status != UserAccountStatus.Logon))
            {
                this.btnCancel.Text = "退出Fetion";
            }
            else
            {
                this.btnCancel.Text = "取消";
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            base.Close();
        }

        private void btnOK_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.components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(ContinueUpdate));
            this.lMessage = new Label();
            this.btnOK = new XButton();
            this.btnCancel = new XButton();
            this.pnlContainer = new Panel();
            this.pnlContainer.SuspendLayout();
            base.SuspendLayout();
            this.lMessage.AutoSize = true;
            this.lMessage.Location = new Point(12, 9);
            this.lMessage.Name = "lMessage";
            this.lMessage.Size = new Size(0xd8, 13);
            this.lMessage.TabIndex = 0;
            this.lMessage.Text = "Fetion检测到上次的更新操作还没有完成";
            this.btnOK.DialogResult = DialogResult.Yes;
            this.btnOK.Location = new Point(12, 0x31);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new Size(0x73, 0x17);
            this.btnOK.TabIndex = 1;
            this.btnOK.UseVisualStyleBackColor = true;
            this.btnOK.Click += new EventHandler(this.btnOK_Click);
            this.btnCancel.DialogResult = DialogResult.No;
            this.btnCancel.Location = new Point(0x94, 0x31);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new Size(0x73, 0x17);
            this.btnCancel.TabIndex = 2;
            this.btnCancel.UseVisualStyleBackColor = true;
            this.btnCancel.Click += new EventHandler(this.btnCancel_Click);
            this.pnlContainer.BackColor = Color.Transparent;
            this.pnlContainer.Controls.Add(this.btnCancel);
            this.pnlContainer.Controls.Add(this.btnOK);
            this.pnlContainer.Controls.Add(this.lMessage);
            this.pnlContainer.Dock = DockStyle.Fill;
            this.pnlContainer.Location = new Point(2, 0x17);
            this.pnlContainer.Name = "pnlContainer";
            this.pnlContainer.Size = new Size(0x120, 0x69);
            this.pnlContainer.TabIndex = 2;
            base.AcceptButton = this.btnOK;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.CancelButton = this.btnCancel;
            base.ClientSize = new Size(0x130, 0x86);
            base.Controls.Add(this.pnlContainer);
            base.Icon = (Icon) manager.GetObject("$this.Icon");
            base.Name = "ContinueUpdate";
            base.Padding = new Padding(2, 0x17, 14, 6);
            base.StartPosition = FormStartPosition.CenterParent;
            base.Text = "继续更新";
            base.Controls.SetChildIndex(this.pnlContainer, 0);
            base.Controls.SetChildIndex(base.menubar, 0);
            this.pnlContainer.ResumeLayout(false);
            this.pnlContainer.PerformLayout();
            base.ResumeLayout(false);
        }

        internal DialogResult ShowUpdate()
        {
            if ((this._updateInfo.Type != UpdateType.force) || (this._mainWnd.AccountManager.CurrentUser.Status == UserAccountStatus.Logon))
            {
                return base.ShowDialog();
            }
            if (base.ShowDialog() == DialogResult.No)
            {
                Application.Exit();
            }
            return DialogResult.Yes;
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -