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

📄 setpasswordwizard.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 2 页
字号:
namespace Imps.Client.Pc.Password
{
    using Imps.Client;
    using Imps.Client.Core;
    using Imps.Client.Core.Password;
    using Imps.Client.Pc;
    using Imps.Client.Pc.BizControls;
    using Imps.Client.Pc.Controls;
    using Imps.Client.Resource;
    using Imps.Utils;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    public class SetPasswordWizard : XIMDialog, IHandleUserStatusSelf
    {
        private PasswordStage _passwordStage = PasswordStage.MobilePhone;
        private XButton btnCancel;
        private XButton btnNext;
        private XButton btnPrevious;
        internal bool canSendSmsRequest = true;
        private IContainer components;
        internal Imps.Client.Core.Configuration Config;
        internal IFrameworkWindow frmWnd;
        internal int MinSmsRequestSpanSeconds;
        internal IUnifiedMessageBox MsgBox;
        public EventHandler<HttpAppEventArgs> OnMoveNextHandler;
        public EventHandler<TipMessageEventArgs> OnTipMessageChangedHandler;
        public PasswordData passwordData;
        private PictureBox pbProvision;
        private Panel pnlContainer;
        private Panel pnlPage;
        internal volatile int smsTickCounter;
        internal Timer smsTimer;
        private StepPageBase StepPageControl;
        public EventHandler<SysCfgEventArgs> SysCfgReceivedHandler;
        public EventHandler<UserSatusChangedEventArgs> UserStatusChangedHandler;

        public event EventHandler<SysCfgEventArgs> OnSysCfgAvaild;

        public SetPasswordWizard(IFrameworkWindow wnd)
        {
            this.InitializeComponent();
            this.Init(wnd);
            this.AttachEventHandler();
            this.LoadResource();
            this.LoadControl();
        }

        private void AttachEventHandler()
        {
            ModifyPassword.OnSysCfgRecived += this.SysCfgReceivedHandler;
            this.frmWnd.AccountManager.CurrentUser.StatusChanged += this.UserStatusChangedHandler;
        }

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

        private void btnNext_Click(object sender, EventArgs e)
        {
            if (this.StepPageControl.GetValidData())
            {
                this.StepPageControl.MoveToNextStage();
            }
        }

        private void btnPrevious_Click(object sender, EventArgs e)
        {
            this.GetPreStage();
        }

        private void CurrentUser_StatusChanged(object sender, UserSatusChangedEventArgs e)
        {
            this.StepPageControl.CancelConfirmMsg = string.Empty;
            base.Close();
        }

        private void DetachEventHandler()
        {
            ModifyPassword.OnSysCfgRecived -= this.SysCfgReceivedHandler;
            this.frmWnd.AccountManager.CurrentUser.StatusChanged -= this.UserStatusChangedHandler;
            this.StepPageControl.DetachEventHandler();
        }

        internal void DisableAllButtons()
        {
            this.btnPrevious.Enabled = false;
            this.btnNext.Enabled = false;
            this.btnCancel.Enabled = false;
        }

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

        internal void EnableNextStep(bool enable)
        {
            this.btnNext.Enabled = enable;
        }

        private void GetNextStage()
        {
            this._passwordStage = this.StepPageControl.NextStage;
            this.LoadControl();
        }

        internal void GetPreStage()
        {
            this._passwordStage = PasswordStage.MobilePhone;
            this.LoadControl();
        }

        private void Init(IFrameworkWindow wnd)
        {
            this.frmWnd = wnd;
            this.MsgBox = wnd.UnifiedMessageBox;
            this.Config = wnd.AccountManager.CurrentUser.Configuration;
            this.passwordData = new PasswordData();
            this.OnMoveNextHandler = new EventHandler<HttpAppEventArgs>(this, (IntPtr) this.PasswordControl_OnMoveNext);
            this.OnTipMessageChangedHandler = new EventHandler<TipMessageEventArgs>(this, (IntPtr) this.PasswordControl_OnTipMessageChanged);
            this.SysCfgReceivedHandler = new EventHandler<SysCfgEventArgs>(this, (IntPtr) this.Password_OnSysCfgRecived);
            this.passwordData.UriGetSysCfg = Imps.Client.Core.Configuration.FixedClientSetting.NavigatorServerUri;
            this.UserStatusChangedHandler = new EventHandler<UserSatusChangedEventArgs>(this, (IntPtr) this.CurrentUser_StatusChanged);
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(SetPasswordWizard));
            this.pnlContainer = new Panel();
            this.pnlPage = new Panel();
            this.pbProvision = new PictureBox();
            this.btnPrevious = new XButton();
            this.btnNext = new XButton();
            this.btnCancel = new XButton();
            this.smsTimer = new Timer(this.components);
            this.pnlContainer.SuspendLayout();
            this.pbProvision.BeginInit();
            base.SuspendLayout();
            this.pnlContainer.BackColor = Color.Transparent;
            this.pnlContainer.Controls.Add(this.pnlPage);
            this.pnlContainer.Controls.Add(this.pbProvision);
            this.pnlContainer.Location = new System.Drawing.Point(4, 0x16);
            this.pnlContainer.Name = "pnlContainer";
            this.pnlContainer.Size = new Size(0x217, 0x13c);
            this.pnlContainer.TabIndex = 1;
            this.pnlPage.BackColor = Color.Transparent;
            this.pnlPage.Location = new System.Drawing.Point(0x9d, 5);
            this.pnlPage.Name = "pnlPage";
            this.pnlPage.Size = new Size(0x176, 0x131);
            this.pnlPage.TabIndex = 0;
            this.pbProvision.Dock = DockStyle.Left;
            this.pbProvision.set_ErrorImage(null);
            this.pbProvision.set_InitialImage(null);
            this.pbProvision.Location = new System.Drawing.Point(0, 0);
            this.pbProvision.Name = "pbProvision";
            this.pbProvision.Size = new Size(0x97, 0x13c);
            this.pbProvision.TabIndex = 0;
            this.pbProvision.TabStop = false;
            this.btnPrevious.AutoArrangementX = true;
            this.btnPrevious.AutoSizeToImage = false;
            this.btnPrevious.BackColor = Color.Transparent;
            this.btnPrevious.BackgroundImageDisable = null;
            this.btnPrevious.BackgroundImageDown = null;
            this.btnPrevious.BackgroundImageHover = null;
            this.btnPrevious.ChangeSkin = true;
            this.btnPrevious.Location = new System.Drawing.Point(0x11a, 0x158);
            this.btnPrevious.Name = "btnPrevious";
            this.btnPrevious.Size = new Size(80, 0x19);
            this.btnPrevious.TabIndex = 2;
            this.btnPrevious.Text = "上一步(&L)";
            this.btnPrevious.set_UseVisualStyleBackColor(false);
            this.btnPrevious.Click += new EventHandler(this.btnPrevious_Click);
            this.btnNext.AutoArrangementX = true;
            this.btnNext.AutoSizeToImage = false;
            this.btnNext.BackColor = Color.Transparent;
            this.btnNext.BackgroundImageDisable = null;
            this.btnNext.BackgroundImageDown = null;
            this.btnNext.BackgroundImageHover = null;
            this.btnNext.ChangeSkin = true;
            this.btnNext.Location = new System.Drawing.Point(0x170, 0x158);
            this.btnNext.Name = "btnNext";
            this.btnNext.Size = new Size(80, 0x19);
            this.btnNext.TabIndex = 3;
            this.btnNext.Text = "下一步(&N)";
            this.btnNext.set_UseVisualStyleBackColor(false);
            this.btnNext.Click += new EventHandler(this.btnNext_Click);
            this.btnCancel.AutoArrangementX = true;
            this.btnCancel.AutoSizeToImage = false;
            this.btnCancel.BackColor = Color.Transparent;
            this.btnCancel.BackgroundImageDisable = null;

⌨️ 快捷键说明

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