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

📄 aboutme.cs

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

    public class AboutMe : XIMDialog
    {
        private int _counter;
        private IFrameworkWindow _host;
        private XButton btnOk;
        private IContainer components;
        private Timer fadeTimer;
        private XLabel lbBuildDate;
        private XLabel lbProductName;
        private XLabel lbVersion;
        private LinkLabel lnkCopyright;
        private bool m_showing = true;
        private PictureBox pbAboutMe;
        private PictureBox pbCarrierLogo;
        private Panel pnlContainer;

        public AboutMe(IFrameworkWindow host)
        {
            this._host = host;
            this.InitializeComponent();
            base.ShowIcon = true;
            base.Icon = ImpsIcons.Logo;
        }

        private void AboutMe_Click(object sender, EventArgs e)
        {
        }

        private void AboutMe_Load(object sender, EventArgs e)
        {
            base.Opacity = 0.0;
            this.fadeTimer.Start();
            this.LoadResource();
            foreach (Control control in this.pnlContainer.Controls)
            {
                control.KeyDown += new KeyEventHandler(this.c_KeyDown);
            }
        }

        private void AboutMe_Shown(object sender, EventArgs e)
        {
            this.btnOk.Focus();
        }

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

        private void c_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Control && (e.KeyCode == Keys.B))
            {
                this._counter++;
                this.lbBuildDate.Visible = this._counter >= 3;
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void fadeTimer_Tick(object sender, EventArgs e)
        {
            if (this.m_showing)
            {
                double num = (1000.0 / ((double) this.fadeTimer.Interval)) / 100.0;
                if ((base.Opacity + num) >= 1.0)
                {
                    base.Opacity = 1.0;
                    this.fadeTimer.Stop();
                }
                else
                {
                    base.Opacity += num;
                }
            }
            else
            {
                double num2 = (1000.0 / ((double) this.fadeTimer.Interval)) / 100.0;
                if ((base.Opacity - num2) <= 0.0)
                {
                    base.Opacity = 0.0;
                    this.fadeTimer.Stop();
                }
                else
                {
                    base.Opacity -= num2;
                }
            }
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Imps.Client.Pc.AboutMe));
            this.pbAboutMe = new PictureBox();
            this.lbProductName = new XLabel();
            this.pbCarrierLogo = new PictureBox();
            this.fadeTimer = new Timer(this.components);
            this.lnkCopyright = new LinkLabel();
            this.btnOk = new XButton();
            this.pnlContainer = new Panel();
            this.lbVersion = new XLabel();
            this.lbBuildDate = new XLabel();
            ((ISupportInitialize) this.pbAboutMe).BeginInit();
            ((ISupportInitialize) this.pbCarrierLogo).BeginInit();
            this.pnlContainer.SuspendLayout();
            base.SuspendLayout();
            base.menubar.Location = new Point(3, 30);
            this.pbAboutMe.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.pbAboutMe.ErrorImage = null;
            this.pbAboutMe.InitialImage = null;
            this.pbAboutMe.Location = new Point(2, 4);
            this.pbAboutMe.Name = "pbAboutMe";
            this.pbAboutMe.Size = new Size(0x17f, 0x41);
            this.pbAboutMe.TabIndex = 0x11;
            this.pbAboutMe.TabStop = false;
            this.lbProductName.AutoSize = true;
            this.lbProductName.BackColor = Color.Transparent;
            this.lbProductName.Font = new Font("宋体", 10.5f);
            this.lbProductName.Location = new Point(0x3f, 0x56);
            this.lbProductName.Name = "lbProductName";
            this.lbProductName.Size = new Size(0x62, 14);
            this.lbProductName.TabIndex = 0x13;
            this.lbProductName.Text = "lbProductName";
            this.lbProductName.TextAlign = ContentAlignment.MiddleLeft;
            this.pbCarrierLogo.BackColor = Color.Transparent;
            this.pbCarrierLogo.ErrorImage = null;
            this.pbCarrierLogo.InitialImage = null;
            this.pbCarrierLogo.Location = new Point(0x18, 0xb0);
            this.pbCarrierLogo.Name = "pbCarrierLogo";
            this.pbCarrierLogo.Size = new Size(0x20, 0x23);
            this.pbCarrierLogo.TabIndex = 20;
            this.pbCarrierLogo.TabStop = false;
            this.fadeTimer.Interval = 50;
            this.fadeTimer.Tick += new EventHandler(this.fadeTimer_Tick);
            this.lnkCopyright.AutoSize = true;
            this.lnkCopyright.Location = new Point(0x3f, 0xbb);
            this.lnkCopyright.Name = "lnkCopyright";
            this.lnkCopyright.Size = new Size(0x41, 13);
            this.lnkCopyright.TabIndex = 1;
            this.lnkCopyright.TabStop = true;
            this.lnkCopyright.Text = "lnkCopyright";
            this.lnkCopyright.LinkClicked += new LinkLabelLinkClickedEventHandler(this.lnkCopyright_LinkClicked);
            this.btnOk.DialogResult = DialogResult.Cancel;
            this.btnOk.Location = new Point(0x120, 0xb5);
            this.btnOk.Name = "btnOk";
            this.btnOk.Size = new Size(0x4b, 0x19);
            this.btnOk.TabIndex = 0;
            this.btnOk.Click += new EventHandler(this.btnOk_Click);
            this.pnlContainer.BackColor = Color.Transparent;
            this.pnlContainer.Controls.Add(this.lbBuildDate);
            this.pnlContainer.Controls.Add(this.lbVersion);
            this.pnlContainer.Controls.Add(this.pbAboutMe);
            this.pnlContainer.Controls.Add(this.btnOk);
            this.pnlContainer.Controls.Add(this.lbProductName);
            this.pnlContainer.Controls.Add(this.lnkCopyright);
            this.pnlContainer.Controls.Add(this.pbCarrierLogo);
            this.pnlContainer.Dock = DockStyle.Fill;
            this.pnlContainer.Location = new Point(5, 0x1a);
            this.pnlContainer.Name = "pnlContainer";
            this.pnlContainer.Size = new Size(0x182, 0xe3);
            this.pnlContainer.TabIndex = 0x15;
            this.lbVersion.AutoSize = true;
            this.lbVersion.BackColor = Color.Transparent;
            this.lbVersion.Font = new Font("宋体", 10.5f);
            this.lbVersion.Location = new Point(0x3f, 0x73);
            this.lbVersion.Name = "lbVersion";
            this.lbVersion.Size = new Size(70, 14);
            this.lbVersion.TabIndex = 0x15;
            this.lbVersion.Text = "lbVersion";
            this.lbVersion.TextAlign = ContentAlignment.MiddleLeft;
            this.lbBuildDate.AutoSize = true;
            this.lbBuildDate.BackColor = Color.Transparent;
            this.lbBuildDate.Font = new Font("宋体", 10.5f);
            this.lbBuildDate.Location = new Point(0x3f, 0x90);
            this.lbBuildDate.Name = "lbBuildDate";
            this.lbBuildDate.Size = new Size(0x54, 14);
            this.lbBuildDate.TabIndex = 0x16;
            this.lbBuildDate.Text = "lbBuildDate";
            this.lbBuildDate.TextAlign = ContentAlignment.MiddleLeft;
            this.lbBuildDate.Visible = false;
            base.AcceptButton = this.btnOk;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.CancelButton = this.btnOk;
            base.ClientSize = new Size(410, 0x119);
            base.Controls.Add(this.pnlContainer);
            base.Icon = (Icon) manager.GetObject("$this.Icon");
            base.MinimizeBox = false;
            base.Name = "AboutMe";
            base.Padding = new Padding(5, 0x1a, 0x13, 0x1c);
            base.ShowIcon = false;
            base.ShowInTaskbar = false;
            base.StartPosition = FormStartPosition.CenterParent;
            base.Shown += new EventHandler(this.AboutMe_Shown);
            base.Click += new EventHandler(this.AboutMe_Click);
            base.Load += new EventHandler(this.AboutMe_Load);
            base.Controls.SetChildIndex(base.menubar, 0);
            base.Controls.SetChildIndex(this.pnlContainer, 0);
            ((ISupportInitialize) this.pbAboutMe).EndInit();
            ((ISupportInitialize) this.pbCarrierLogo).EndInit();
            this.pnlContainer.ResumeLayout(false);
            this.pnlContainer.PerformLayout();
            base.ResumeLayout(false);
        }

        private void lnkCopyright_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ShellHelper.StartUri(new Uri(AppDictionary.CarrierPortal));
        }

        private void LoadResource()
        {
            Imps.Client.Core.FixedClientSetting instance = Imps.Client.Core.FixedClientSetting.Instance;
            this.pbAboutMe.Image = ImpsResources.GetImage("Images.AboutMe.png");
            this.pbCarrierLogo.Image = ImpsResources.GetImage("Images.carrier_32X32.png");
            base.Text = string.Format(StringTable.AboutMe.formTitle, AppDictionary.CurrentClientName);
            this.lbProductName.Text = string.Format(StringTable.AboutMe.lbProductionName, AppDictionary.CurrentClientName);
            this.lbVersion.Text = string.Format(StringTable.AboutMe.lbVersion, instance.Version);
            this.lbBuildDate.Text = string.Format(StringTable.AboutMe.lbBuildDate, instance.BuildDate);
            this.lnkCopyright.Text = StringTable.AboutMe.lnkCopyright;
            this.btnOk.Text = StringTable.Common.TitleConfirm;
        }

        private void showAppInfo()
        {
            object[] customAttributes = Assembly.GetExecutingAssembly().GetCustomAttributes(true);
            for (int i = 0; i < customAttributes.Length; i++)
            {
            }
        }
    }
}

⌨️ 快捷键说明

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