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

📄 compactprofile.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 2 页
字号:
            this.linkBindMobilEmail.Location = new System.Drawing.Point(0xd9, 0x123);
            this.linkBindMobilEmail.Name = "linkBindMobilEmail";
            this.linkBindMobilEmail.Size = new Size(0x4d, 12);
            this.linkBindMobilEmail.TabIndex = 0;
            this.linkBindMobilEmail.Text = "绑定手机邮箱";
            this.groupBox1.Controls.Add(this.linkBindMobilEmail);
            this.groupBox1.Controls.Add(this.comboBoxGender);
            this.groupBox1.Controls.Add(this.xBtnProtrait);
            this.groupBox1.Controls.Add(this.xpbProtrait);
            this.groupBox1.Controls.Add(this.lbCongrantulations);
            this.groupBox1.Controls.Add(this.lbNickName);
            this.groupBox1.Controls.Add(this.lbSex);
            this.groupBox1.Controls.Add(this.txtNickName);
            this.groupBox1.Controls.Add(this.btnDetailProfile);
            this.groupBox1.Dock = DockStyle.Fill;
            this.groupBox1.Location = new System.Drawing.Point(0, 0);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new Size(0x189, 0x13c);
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "提示";
            this.comboBoxGender.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            this.comboBoxGender.BackColor = Color.White;
            this.comboBoxGender.DropDownStyle = ComboBoxStyle.DropDownList;
            this.comboBoxGender.EmptyTextTip = "";
            this.comboBoxGender.EmptyTextTipColor = Color.DarkGray;
            this.comboBoxGender.set_FormattingEnabled(true);
            this.comboBoxGender.Items.AddRange(new object[] { "男", "女", "保密" });
            this.comboBoxGender.Location = new System.Drawing.Point(0x6d, 0x10b);
            this.comboBoxGender.MaxDropDownItems = 3;
            this.comboBoxGender.MaxLength = 1;
            this.comboBoxGender.Name = "comboBoxGender";
            this.comboBoxGender.Size = new Size(0x66, 20);
            this.comboBoxGender.TabIndex = 2;
            this.xBtnProtrait.AutoArrangementX = true;
            this.xBtnProtrait.AutoSizeToImage = false;
            this.xBtnProtrait.BackColor = Color.Transparent;
            this.xBtnProtrait.BackgroundImage = (Image) manager.GetObject("xBtnProtrait.BackgroundImage");
            this.xBtnProtrait.BackgroundImageDisable = (Image) manager.GetObject("xBtnProtrait.BackgroundImageDisable");
            this.xBtnProtrait.BackgroundImageDown = (Image) manager.GetObject("xBtnProtrait.BackgroundImageDown");
            this.xBtnProtrait.BackgroundImageHover = (Image) manager.GetObject("xBtnProtrait.BackgroundImageHover");
            this.xBtnProtrait.ChangeSkin = false;
            this.xBtnProtrait.Location = new System.Drawing.Point(0xd9, 0xa7);
            this.xBtnProtrait.Name = "xBtnProtrait";
            this.xBtnProtrait.Size = new Size(0x4b, 0x15);
            this.xBtnProtrait.TabIndex = 0;
            this.xBtnProtrait.Text = "更改头像...";
            this.xBtnProtrait.set_UseVisualStyleBackColor(false);
            this.xBtnProtrait.Click += new EventHandler(this.xBtnProtrait_Click);
            this.xpbProtrait.BackColor = Color.White;
            this.xpbProtrait.BorderColor = Color.FromArgb(0xa4, 170, 220);
            this.xpbProtrait.Image = (Image) manager.GetObject("xpbProtrait.Image");
            this.xpbProtrait.Location = new System.Drawing.Point(0x6d, 0x5b);
            this.xpbProtrait.Name = "xpbProtrait";
            this.xpbProtrait.ShowSecondBorder = false;
            this.xpbProtrait.Size = new Size(0x66, 0x66);
            this.xpbProtrait.TabIndex = 14;
            this.xpbProtrait.ToolTipText = "";
            this.xpbProtrait.Click += new EventHandler(this.xpbProtrait_Click);
            base.set_AutoScaleDimensions(new SizeF(6f, 12f));
            base.set_AutoScaleMode(1);
            base.Controls.Add(this.groupBox1);
            base.Name = "CompactProfile";
            base.Size = new Size(0x189, 0x13c);
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            base.ResumeLayout(false);
        }

        private void LoadResource()
        {
        }

        public override void MoveToNextStage()
        {
            if (this.GetValidData())
            {
                if (!base._host.ProvsionData.Flag.SysCfgRefreshed)
                {
                    base._host.LoadSysCfg();
                }
                else
                {
                    Imps.Client.Core.Provisioning.SetProfile(base._host.ProvsionData);
                }
                this.DisableAllControls();
            }
        }

        private void PersonalInfo_PropertiesChanged(object sender, PropertiesChangedEventArgs e)
        {
            UiErrorHelper.HandEventSafely(base._host.frmWnd, delegate {
                if (e.ContainsProperty("Portrait"))
                {
                    ControlHelper.FadeinImage(this.xpbProtrait, this._host.ProvsionData.CurrentUser.PersonalInfo.Portrait);
                }
                if (e.ContainsProperty("nickname"))
                {
                    this.txtNickName.Text = (string) this._host.ProvsionData.CurrentUser.PersonalInfo.Nickname;
                }
                if (e.ContainsProperty("gender"))
                {
                    switch (this._host.ProvsionData.CurrentUser.PersonalInfo.Gender.Value)
                    {
                        case Gender.Unknown:
                            this.comboBoxGender.SelectedIndex = 2;
                            return;

                        case Gender.Male:
                            this.comboBoxGender.SelectedIndex = 0;
                            return;

                        case Gender.Female:
                            this.comboBoxGender.SelectedIndex = 1;
                            return;

                        default:
                            return;
                    }
                }
            });
        }

        private void Provisioning_OnNewSysCfgRecived(object sender, SysCfgEventArgs e)
        {
            ServerUriSetting serverUriSetting = base._host.Config.SystemSetting.ServerUriSetting;
            if (e.IsValid)
            {
                base._host.ProvsionData.Flag.SysCfgRefreshed = true;
                base._host.ProvsionData.ProvsionUrl.UriGetPic = serverUriSetting.UriGetPicCode;
                base._host.ProvsionData.ProvsionUrl.UriGetSms = serverUriSetting.UriApplySubSvc;
                base._host.ProvsionData.ProvsionUrl.UriSubSvc = serverUriSetting.UriSubSvc;
                base._host.ProvsionData.ProvsionUrl.UriSsiLogin = serverUriSetting.UriSsiAppSignIn;
                base._host.ProvsionData.ProvsionUrl.UriSetProfile = serverUriSetting.UriInitProfile;
                base._host.ProvsionData.ProvsionUrl.UriGetGeneralInfo = serverUriSetting.UriGetGeneralInfo;
                base._host.ProvsionData.ProvsionUrl.UriGetProfile = serverUriSetting.UriGetPersonalInfo;
                this.TryRetriveProfile();
                this.RestoreAllControlsStatus();
            }
            else
            {
                this.RestoreAllControlsStatus();
            }
        }

        private void Provisioning_OnPorfileUpdated(object sender, HttpAppEventArgs e)
        {
            if (e.ErrorMessage.Length > 0)
            {
                this.RestoreAllControlsStatus();
                base._host.ShowProgress(false);
                base._host.MsgBox.ShowError(base.FindForm(), e.ErrorMessage);
            }
            else
            {
                base._host.frmWnd.AccountManager.CurrentUser.PersistentManager.DelById(base._host.ProvsionData.CurrentUser.Sid.ToString());
                this.RestoreAllControlsStatus();
                base._host.ShowProgress(false);
                base._host.MsgBox.ShowInfo(base.FindForm(), "个人资料设置成功!");
                base._host.frmWnd.AccountManager.FillUserIdAndPassword(base._host.ProvsionData.MobileNo, base._host.ProvsionData.Password, base._host.autoLogin);
                base._cancelMessage = string.Empty;
                base._host.Close();
            }
        }

        private void Provisioning_OnProfileRetrived(object sender, ProfileRetrivedEventArgs e)
        {
            base._host.ProvsionData.Flag.IsOldProfileRetrived = true;
            this.RestoreAllControlsStatus();
            this.ShowInfo();
        }

        protected override void RestoreAllControlsStatus()
        {
            this.comboBoxGender.Enabled = true;
            this.txtNickName.Enabled = true;
            this.btnDetailProfile.Enabled = true;
            base._host.SetButtonStatus(this);
        }

        private void ShowInfo()
        {
            this.txtNickName.Text = (string) base._host.ProvsionData.CurrentUser.PersonalInfo.Nickname;
            switch (base._host.ProvsionData.CurrentUser.PersonalInfo.Gender.Value)
            {
                case Gender.Unknown:
                    this.comboBoxGender.SelectedIndex = 2;
                    return;

                case Gender.Male:
                    this.comboBoxGender.SelectedIndex = 0;
                    return;

                case Gender.Female:
                    this.comboBoxGender.SelectedIndex = 1;
                    return;
            }
        }

        private void TryRetriveProfile()
        {
            if (base._host.ProvsionData.Flag.IsOldProfileRetrived)
            {
                Imps.Client.Core.Provisioning.SetProfile(base._host.ProvsionData);
            }
            else
            {
                Imps.Client.Core.Provisioning.RetriveProfile(base._host.ProvsionData);
            }
        }

        private void xBtnProtrait_Click(object sender, EventArgs e)
        {
            PortraitForm form = new PortraitForm(base._host.frmWnd);
            ControlHelper.ShowDialogCenterOnParent(form, this, true);
        }

        private void xpbProtrait_Click(object sender, EventArgs e)
        {
            PortraitForm form = new PortraitForm(base._host.frmWnd);
            ControlHelper.ShowDialogCenterOnParent(form, this, true);
        }

        public override string CancelConfirmMsg
        {
            get
            {
                return base._cancelMessage;
            }
        }

        public override bool CanMovePrivious
        {
            get
            {
                return false;
            }
        }

        public override string NextStepText
        {
            get
            {
                return "完成(&F)";
            }
        }
    }
}

⌨️ 快捷键说明

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