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

📄 psprivacycontrol.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 2 页
字号:
            this.textBoxPhone.Size = new Size(200, 0x15);
            this.textBoxPhone.TabIndex = 2;
            this.xgbBizInfo.Controls.Add(this.textBoxJobTitle);
            this.xgbBizInfo.Controls.Add(this.textBoxCompanyWebSite);
            this.xgbBizInfo.Controls.Add(this.textBoxCompanyName);
            this.xgbBizInfo.Controls.Add(this.lbJobTitle);
            this.xgbBizInfo.Controls.Add(this.lbCompanyWebSite);
            this.xgbBizInfo.Controls.Add(this.lbCompanyName);
            this.xgbBizInfo.Controls.Add(this.xcbPerBiz);
            this.xgbBizInfo.Location = new System.Drawing.Point(5, 0x61);
            this.xgbBizInfo.Name = "xgbBizInfo";
            this.xgbBizInfo.Size = new Size(0x19c, 0x66);
            this.xgbBizInfo.TabIndex = 1;
            this.xgbBizInfo.TabStop = false;
            this.xgbBizInfo.Text = "商务信息";
            this.textBoxJobTitle.BackColor = Color.White;
            this.textBoxJobTitle.BorderStyle = BorderStyle.FixedSingle;
            this.textBoxJobTitle.EmptyTextTip = "";
            this.textBoxJobTitle.EmptyTextTipColor = Color.DarkGray;
            this.textBoxJobTitle.Location = new System.Drawing.Point(0x51, 0x49);
            this.textBoxJobTitle.MaxLength = 0x10;
            this.textBoxJobTitle.Name = "textBoxJobTitle";
            this.textBoxJobTitle.Size = new Size(0xdf, 0x15);
            this.textBoxJobTitle.TabIndex = 3;
            this.textBoxCompanyWebSite.BackColor = Color.White;
            this.textBoxCompanyWebSite.BorderStyle = BorderStyle.FixedSingle;
            this.textBoxCompanyWebSite.EmptyTextTip = "";
            this.textBoxCompanyWebSite.EmptyTextTipColor = Color.DarkGray;
            this.textBoxCompanyWebSite.Location = new System.Drawing.Point(0x51, 0x31);
            this.textBoxCompanyWebSite.MaxLength = 0x100;
            this.textBoxCompanyWebSite.Name = "textBoxCompanyWebSite";
            this.textBoxCompanyWebSite.Size = new Size(0xdf, 0x15);
            this.textBoxCompanyWebSite.TabIndex = 2;
            this.textBoxCompanyName.BackColor = Color.White;
            this.textBoxCompanyName.BorderStyle = BorderStyle.FixedSingle;
            this.textBoxCompanyName.EmptyTextTip = "";
            this.textBoxCompanyName.EmptyTextTipColor = Color.DarkGray;
            this.textBoxCompanyName.Location = new System.Drawing.Point(0x51, 0x19);
            this.textBoxCompanyName.MaxLength = 0x40;
            this.textBoxCompanyName.Name = "textBoxCompanyName";
            this.textBoxCompanyName.Size = new Size(0xdf, 0x15);
            this.textBoxCompanyName.TabIndex = 1;
            this.lbJobTitle.set_AutoSize(true);
            this.lbJobTitle.BorderColor = Color.Empty;
            this.lbJobTitle.ButtonBorderStyle = ButtonBorderStyle.None;
            this.lbJobTitle.ImageAlign = ContentAlignment.TopRight;
            this.lbJobTitle.Location = new System.Drawing.Point(0x29, 0x4b);
            this.lbJobTitle.Name = "lbJobTitle";
            this.lbJobTitle.Size = new Size(0x23, 12);
            this.lbJobTitle.TabIndex = 5;
            this.lbJobTitle.Text = "职位:";
            this.lbCompanyWebSite.set_AutoSize(true);
            this.lbCompanyWebSite.BorderColor = Color.Empty;
            this.lbCompanyWebSite.ButtonBorderStyle = ButtonBorderStyle.None;
            this.lbCompanyWebSite.ImageAlign = ContentAlignment.TopRight;
            this.lbCompanyWebSite.Location = new System.Drawing.Point(0x11, 0x33);
            this.lbCompanyWebSite.Name = "lbCompanyWebSite";
            this.lbCompanyWebSite.Size = new Size(0x3b, 12);
            this.lbCompanyWebSite.TabIndex = 3;
            this.lbCompanyWebSite.Text = "公司主页:";
            this.lbCompanyName.set_AutoSize(true);
            this.lbCompanyName.BorderColor = Color.Empty;
            this.lbCompanyName.ButtonBorderStyle = ButtonBorderStyle.None;
            this.lbCompanyName.ImageAlign = ContentAlignment.TopRight;
            this.lbCompanyName.Location = new System.Drawing.Point(0x11, 0x1b);
            this.lbCompanyName.Name = "lbCompanyName";
            this.lbCompanyName.Size = new Size(0x3b, 12);
            this.lbCompanyName.TabIndex = 1;
            this.lbCompanyName.Text = "公司名称:";
            this.xcbPerBiz.BackColor = Color.White;
            this.xcbPerBiz.DropDownStyle = ComboBoxStyle.DropDownList;
            this.xcbPerBiz.EmptyTextTip = "";
            this.xcbPerBiz.EmptyTextTipColor = Color.DarkGray;
            this.xcbPerBiz.set_FormattingEnabled(true);
            this.xcbPerBiz.Location = new System.Drawing.Point(0x11d, 0);
            this.xcbPerBiz.Name = "xcbPerBiz";
            this.xcbPerBiz.Size = new Size(0x79, 20);
            this.xcbPerBiz.TabIndex = 0;
            base.set_AutoScaleDimensions(new SizeF(6f, 12f));
            base.set_AutoScaleMode(1);
            base.Controls.Add(this.xgbBizInfo);
            base.Controls.Add(this.xgbPhone);
            base.Controls.Add(this.xgbIdentity);
            base.Name = "PsPrivacyControl";
            base.Size = new Size(420, 480);
            this.xgbIdentity.ResumeLayout(false);
            this.xgbIdentity.PerformLayout();
            this.xgbPhone.ResumeLayout(false);
            this.xgbPhone.PerformLayout();
            this.xgbBizInfo.ResumeLayout(false);
            this.xgbBizInfo.PerformLayout();
            base.ResumeLayout(false);
        }

        private void initPermission()
        {
            ValueNameDescList<int> list = new ValueNameDescList<int>(2);
            list.Add(0, StringTable.Permission.Keep_Secret);
            list.Add(1, StringTable.Permission.Open_Everyone);
            OptionsControlBase.InnerSetListControlDataSource(this.xcbPerBiz, list);
            ValueNameDescList<int> list2 = new ValueNameDescList<int>(2);
            list2.AddRange(list);
            OptionsControlBase.InnerSetListControlDataSource(this.xcbPerPhone, list2);
            ValueNameDescList<int> list3 = new ValueNameDescList<int>(2);
            list3.AddRange(list);
            OptionsControlBase.InnerSetListControlDataSource(this.xcbPerEmail, list3);
        }

        private void linkBindMobilEmail_BindInfoChanged(object sender, EventArgs e)
        {
            this.showEmail();
        }

        private void SetLimitation()
        {
            this.textBoxCompanyName.MaxLength = 0x80;
            this.textBoxCompanyWebSite.MaxLength = 0x80;
            this.textBoxEmail.MaxLength = 0x40;
            this.textBoxJobTitle.MaxLength = 0x40;
            this.textBoxPhone.MaxLength = 0x20;
            this.xtbName.MaxLength = 0x40;
            ControlHelper.ForceControlImeDisable(this.textBoxEmail);
            ControlHelper.ForceControlImeDisable(this.textBoxPhone);
        }

        private void showEmail()
        {
            string text = string.Empty;
            this.textBoxEmail.TextChanged -= new EventHandler(this.uiData_Changed);
            int? nullable = this._user.MobileMailInfo.Binding_Status;
            if ((nullable.GetValueOrDefault() == 0) && nullable.get_HasValue())
            {
                this.textBoxEmail.ReadOnly = true;
                this.textBoxEmail.Text = this._user.MobileMailInfo.Alias + this._user.MobileMailInfo.Postfix;
            }
            else
            {
                this.textBoxEmail.ReadOnly = false;
                switch (this._user.PersonalInfo.PrimaryEmail.Value)
                {
                    case 1:
                        if (this._user.PersonalInfo.PersonalEmail != null)
                        {
                            text = this._user.PersonalInfo.PersonalEmail.Value;
                        }
                        break;

                    case 2:
                        if (this._user.PersonalInfo.WorkEmail != null)
                        {
                            text = this._user.PersonalInfo.WorkEmail.Value;
                        }
                        break;

                    case 3:
                        if (this._user.PersonalInfo.OtherEmail != null)
                        {
                            text = this._user.PersonalInfo.OtherEmail.Value;
                        }
                        break;
                }
                if (string.IsNullOrEmpty(text))
                {
                    if (this._user.PersonalInfo.OtherEmail != null)
                    {
                        text = this._user.PersonalInfo.OtherEmail.Value;
                    }
                    if (this._user.PersonalInfo.PersonalEmail != null)
                    {
                        text = this._user.PersonalInfo.PersonalEmail.Value;
                    }
                    if (this._user.PersonalInfo.WorkEmail != null)
                    {
                        text = this._user.PersonalInfo.WorkEmail.Value;
                    }
                }
                this.textBoxEmail.Text = text;
            }
            this.textBoxEmail.TextChanged += new EventHandler(this.uiData_Changed);
        }

        private void uiData_Changed(object sender, EventArgs e)
        {
            UiErrorHelper.HandEventSafely(this._iFrameworkWindow, delegate {
                base.Modified = true;
            });
        }

        public override bool UpdateData(bool update)
        {
            Imps.Client.Core.MainWindowSetting mainWindowSetting = this._user.Configuration.UserSetting.MainWindowSetting;
            try
            {
                new AsyncBizOperation();
                if (update)
                {
                    if (!this.CheckUserInput())
                    {
                        return false;
                    }
                    this._user.PersonalInfo.Name.ProposedValue = this.xtbName.Text.Trim();
                    this._user.PersonalInfo.OtherEmail.ProposedValue = this.textBoxEmail.Text.Trim();
                    this._user.PersonalInfo.WorkEmail.ProposedValue = this.textBoxEmail.Text.Trim();
                    this._user.PersonalInfo.PersonalEmail.ProposedValue = this.textBoxEmail.Text.Trim();
                    this._user.PersonalInfo.OtherPhone.ProposedValue = this.textBoxPhone.Text.Trim();
                    this._user.PersonalInfo.WorkPhone.ProposedValue = this.textBoxPhone.Text.Trim();
                    this._user.PersonalInfo.HomePhone.ProposedValue = this.textBoxPhone.Text.Trim();
                    this._user.PersonalInfo.Company.ProposedValue = this.textBoxCompanyName.Text.Trim();
                    this._user.PersonalInfo.CompanyWebsite.ProposedValue = this.textBoxCompanyWebSite.Text.Trim();
                    this._user.PersonalInfo.JobTitle.ProposedValue = this.textBoxJobTitle.Text.Trim();
                    this._user.GlobalPermission.PermissionPointPhone.Value.ProposedValue = (int) this.xcbPerPhone.SelectedValue;
                    this._user.GlobalPermission.PermissionPointBusiness.Value.ProposedValue = (int) this.xcbPerBiz.SelectedValue;
                    if (this.xcbPerEmail.SelectedValue != null)
                    {
                        this._user.GlobalPermission.PermissionPointEmail.Value.ProposedValue = (int) this.xcbPerEmail.SelectedValue;
                    }
                }
                else
                {
                    if (this._user.PersonalInfo.Name != null)
                    {
                        this.xtbName.Text = (string) this._user.PersonalInfo.Name;
                    }
                    this.xtbMobileNo.Text = this._user.PersonalInfo.MobileNo.ToString();
                    this.xtbMobileRC.Text = "86";
                    string text = string.Empty;
                    if (!string.IsNullOrEmpty(this._user.PersonalInfo.OtherPhone.Value))
                    {
                        text = this._user.PersonalInfo.OtherPhone.Value;
                    }
                    if (!string.IsNullOrEmpty(this._user.PersonalInfo.HomePhone.Value))
                    {
                        text = this._user.PersonalInfo.HomePhone.Value;
                    }
                    if (!string.IsNullOrEmpty(this._user.PersonalInfo.WorkPhone.Value))
                    {
                        text = this._user.PersonalInfo.WorkPhone.Value;
                    }
                    this.textBoxPhone.Text = text;
                    this.showEmail();
                    if (this._user.PersonalInfo.Company != null)
                    {
                        this.textBoxCompanyName.Text = this._user.PersonalInfo.Company.Value;
                    }
                    if (this._user.PersonalInfo.CompanyWebsite != null)
                    {
                        this.textBoxCompanyWebSite.Text = this._user.PersonalInfo.CompanyWebsite.Value;
                    }
                    if (this._user.PersonalInfo.JobTitle != null)
                    {
                        this.textBoxJobTitle.Text = this._user.PersonalInfo.JobTitle.Value;
                    }
                    this.xcbPerPhone.SelectedValue = this._user.GlobalPermission.PermissionPointPhone.Value.Value;
                    this.xcbPerBiz.SelectedValue = this._user.GlobalPermission.PermissionPointBusiness.Value.Value;
                    this.xcbPerEmail.SelectedValue = this._user.GlobalPermission.PermissionPointEmail.Value.Value;
                }
                base.Modified = false;
                return true;
            }
            catch (Exception exception)
            {
                ClientLogger.WriteException(exception);
                return false;
            }
        }

        private void xtbName_Enter(object sender, EventArgs e)
        {
            UiErrorHelper.HandEventSafely(this._iFrameworkWindow, delegate {
                BalloonHelper.ShowBallon(this.xtbName, StringTable.PersonalInfo.TipRealName, AppDictionary.FullLocalName, 1, 0x1388);
            });
        }

        private void xtbName_Leave(object sender, EventArgs e)
        {
            UiErrorHelper.HandEventSafely(this._iFrameworkWindow, delegate {
                BalloonHelper.RemoveAll();
            });
        }

        private Imps.Client.Core.User _user
        {
            get
            {
                return this._iFrameworkWindow.AccountManager.CurrentUser;
            }
        }
    }
}

⌨️ 快捷键说明

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