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

📄 ssgeneralcontrol.cs

📁 飞信的收发使用csharp进行开发
💻 CS
📖 第 1 页 / 共 2 页
字号:
namespace Imps.Client.Pc.Options
{
    using Imps.Client;
    using Imps.Client.Core;
    using Imps.Client.Pc;
    using Imps.Client.Pc.Controls;
    using Imps.Client.Pc.Utils;
    using Imps.Client.Resource;
    using Imps.Client.Utils;
    using Imps.Client.Utils.Win32;
    using System;
    using System.Drawing;
    using System.Windows.Forms;

    internal class SsGeneralControl : OptionsControlBase
    {
        private IFrameworkWindow _frameworkWnd;
        private CheckBox checkBoxImprove;
        private CheckBox ctlAutoHide;
        private XNumericUpDown ctlAutoHideSeconds;
        private CheckBox ctlAutoLogin;
        private CheckBox ctlAutoStartup;
        private CheckBox ctlPopupMainWnd;
        private CheckBox ctlTopMost;
        private XLabel lbAutoHide;
        private XLabel lbLogin;
        private XLabel lbWnd;
        private Panel panelImprove;

        public SsGeneralControl(IFrameworkWindow frameworkWnd)
        {
            this._frameworkWnd = frameworkWnd;
            this.InitializeComponent();
            this.handleUiEvent();
        }

        public override bool CheckUserInput()
        {
            return true;
        }

        private void ctlAutoHide_CheckedChanged(object sender, EventArgs e)
        {
            this.ctlAutoHideSeconds.Enabled = this.ctlAutoHide.Checked;
        }

        private void ctlAutoHideSeconds_OnValueOutOfRange(object sender, EventArgs e)
        {
            BalloonHelper.ShowBallon(this.ctlAutoHideSeconds, string.Format(StringTable.Options.ValueOutOfRange, this.ctlAutoHideSeconds.Minimum, this.ctlAutoHideSeconds.Maximum), "错误", ToolTipIcon.Error, 0x3e8);
        }

        private void handleUiEvent()
        {
            this.ctlAutoHide.Click += new EventHandler(this.uiData_Changed);
            this.ctlAutoHideSeconds.ValueChanged += new EventHandler(this.uiData_Changed);
            this.ctlAutoHideSeconds.KeyPress += new KeyPressEventHandler(this.uiData_Changed);
            this.ctlAutoLogin.Click += new EventHandler(this.uiData_Changed);
            this.ctlAutoStartup.Click += new EventHandler(this.uiData_Changed);
            this.ctlPopupMainWnd.Click += new EventHandler(this.uiData_Changed);
            this.ctlTopMost.Click += new EventHandler(this.uiData_Changed);
            this.checkBoxImprove.CheckedChanged += new EventHandler(this.uiData_Changed);
        }

        private void InitializeComponent()
        {
            this.lbWnd = new XLabel();
            this.lbLogin = new XLabel();
            this.ctlAutoHide = new CheckBox();
            this.ctlPopupMainWnd = new CheckBox();
            this.ctlAutoStartup = new CheckBox();
            this.ctlAutoLogin = new CheckBox();
            this.ctlAutoHideSeconds = new XNumericUpDown();
            this.lbAutoHide = new XLabel();
            this.ctlTopMost = new CheckBox();
            this.panelImprove = new Panel();
            this.checkBoxImprove = new CheckBox();
            XLabel label = new XLabel();
            XLabel label2 = new XLabel();
            XLabel label3 = new XLabel();
            XLabel label4 = new XLabel();
            this.ctlAutoHideSeconds.BeginInit();
            this.panelImprove.SuspendLayout();
            base.SuspendLayout();
            label.BorderColor = Color.Empty;
            label.BorderStyle = BorderStyle.Fixed3D;
            label.ButtonBorderStyle = ButtonBorderStyle.None;
            label.Location = new Point(60, 14);
            label.Name = "label2";
            label.Size = new Size(280, 2);
            label.TabIndex = 4;
            label.Text = "label2";
            label.UseMnemonic = false;
            label2.BorderColor = Color.Empty;
            label2.BorderStyle = BorderStyle.Fixed3D;
            label2.ButtonBorderStyle = ButtonBorderStyle.None;
            label2.Location = new Point(40, 0x5d);
            label2.Name = "label3";
            label2.Size = new Size(300, 2);
            label2.TabIndex = 7;
            label2.Text = "label2";
            label2.UseMnemonic = false;
            label3.AutoSize = true;
            label3.BorderColor = Color.Empty;
            label3.ButtonBorderStyle = ButtonBorderStyle.None;
            label3.ForeColor = Color.Black;
            label3.Location = new Point(3, 2);
            label3.Name = "xLabel1";
            label3.Size = new Size(0x35, 12);
            label3.TabIndex = 11;
            label3.Text = "体验改进";
            label3.UseMnemonic = false;
            label4.BorderColor = Color.Empty;
            label4.BorderStyle = BorderStyle.Fixed3D;
            label4.ButtonBorderStyle = ButtonBorderStyle.None;
            label4.Location = new Point(0x29, 9);
            label4.Name = "xLabel2";
            label4.Size = new Size(300, 2);
            label4.TabIndex = 12;
            label4.Text = "label2";
            label4.UseMnemonic = false;
            this.lbWnd.AutoSize = true;
            this.lbWnd.BorderColor = Color.Empty;
            this.lbWnd.ButtonBorderStyle = ButtonBorderStyle.None;
            this.lbWnd.ForeColor = Color.Black;
            this.lbWnd.Location = new Point(5, 8);
            this.lbWnd.Name = "lbWnd";
            this.lbWnd.Size = new Size(0x35, 12);
            this.lbWnd.TabIndex = 0;
            this.lbWnd.Text = "窗口设置";
            this.lbWnd.UseMnemonic = false;
            this.lbLogin.AutoSize = true;
            this.lbLogin.BorderColor = Color.Empty;
            this.lbLogin.ButtonBorderStyle = ButtonBorderStyle.None;
            this.lbLogin.ForeColor = Color.Black;
            this.lbLogin.Location = new Point(2, 0x56);
            this.lbLogin.Name = "lbLogin";
            this.lbLogin.Size = new Size(0x1d, 12);
            this.lbLogin.TabIndex = 6;
            this.lbLogin.Text = "登录";
            this.lbLogin.UseMnemonic = false;
            this.ctlAutoHide.AutoSize = true;
            this.ctlAutoHide.Location = new Point(20, 0x25);
            this.ctlAutoHide.Name = "ctlAutoHide";
            this.ctlAutoHide.Size = new Size(90, 0x10);
            this.ctlAutoHide.TabIndex = 2;
            this.ctlAutoHide.Text = "ctlAutoHide";
            this.ctlAutoHide.UseVisualStyleBackColor = true;
            this.ctlAutoHide.Visible = false;
            this.ctlAutoHide.CheckedChanged += new EventHandler(this.ctlAutoHide_CheckedChanged);
            this.ctlPopupMainWnd.AutoSize = true;
            this.ctlPopupMainWnd.Location = new Point(20, 0x27);
            this.ctlPopupMainWnd.Name = "ctlPopupMainWnd";
            this.ctlPopupMainWnd.Size = new Size(0x72, 0x10);
            this.ctlPopupMainWnd.TabIndex = 5;
            this.ctlPopupMainWnd.Text = "ctlPopupMainWnd";
            this.ctlPopupMainWnd.UseVisualStyleBackColor = true;
            this.ctlAutoStartup.AutoSize = true;
            this.ctlAutoStartup.Location = new Point(20, 0x71);
            this.ctlAutoStartup.Name = "ctlAutoStartup";
            this.ctlAutoStartup.Size = new Size(0x6c, 0x10);
            this.ctlAutoStartup.TabIndex = 8;
            this.ctlAutoStartup.Text = "ctlAutoStartup";
            this.ctlAutoStartup.UseVisualStyleBackColor = true;
            this.ctlAutoLogin.AutoSize = true;
            this.ctlAutoLogin.Location = new Point(20, 0x88);
            this.ctlAutoLogin.Name = "ctlAutoLogin";
            this.ctlAutoLogin.Size = new Size(0x60, 0x10);
            this.ctlAutoLogin.TabIndex = 9;
            this.ctlAutoLogin.Text = "ctlAutoLogin";
            this.ctlAutoLogin.UseVisualStyleBackColor = true;
            this.ctlAutoHideSeconds.Location = new Point(0x72, 0x22);
            int[] bits = new int[4];
            bits[0] = 300;
            this.ctlAutoHideSeconds.Maximum = new decimal(bits);
            this.ctlAutoHideSeconds.MaxLength = 0x7fff;
            int[] numArray2 = new int[4];
            numArray2[0] = 1;
            this.ctlAutoHideSeconds.Minimum = new decimal(numArray2);

⌨️ 快捷键说明

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