📄 psprivacycontrol.cs
字号:
this.textBoxHomePhone.Location = new Point(0x51, 0x1c);
this.textBoxHomePhone.MaxLength = 40;
this.textBoxHomePhone.Name = "textBoxHomePhone";
this.textBoxHomePhone.Size = new Size(0xdf, 20);
this.textBoxHomePhone.TabIndex = 2;
this.lbWorkPhone.AutoSize = true;
this.lbWorkPhone.Location = new Point(20, 0x3e);
this.lbWorkPhone.Name = "lbWorkPhone";
this.lbWorkPhone.Size = new Size(0x37, 13);
this.lbWorkPhone.TabIndex = 3;
this.lbWorkPhone.Text = "工作电话";
this.textBoxWorkPhone.BackColor = Color.White;
this.textBoxWorkPhone.BorderStyle = BorderStyle.FixedSingle;
this.textBoxWorkPhone.Location = new Point(0x51, 0x39);
this.textBoxWorkPhone.MaxLength = 40;
this.textBoxWorkPhone.Name = "textBoxWorkPhone";
this.textBoxWorkPhone.Size = new Size(0xdf, 20);
this.textBoxWorkPhone.TabIndex = 4;
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.ForeColor = Color.Black;
this.xgbBizInfo.Location = new Point(5, 0xea);
this.xgbBizInfo.Name = "xgbBizInfo";
this.xgbBizInfo.Size = new Size(0x161, 0x6f);
this.xgbBizInfo.TabIndex = 2;
this.xgbBizInfo.TabStop = false;
this.xgbBizInfo.Text = "商务信息";
this.textBoxJobTitle.BackColor = Color.White;
this.textBoxJobTitle.BorderStyle = BorderStyle.FixedSingle;
this.textBoxJobTitle.Location = new Point(0x51, 0x4f);
this.textBoxJobTitle.MaxLength = 0x10;
this.textBoxJobTitle.Name = "textBoxJobTitle";
this.textBoxJobTitle.Size = new Size(0xdf, 20);
this.textBoxJobTitle.TabIndex = 6;
this.textBoxCompanyWebSite.BackColor = Color.White;
this.textBoxCompanyWebSite.BorderStyle = BorderStyle.FixedSingle;
this.textBoxCompanyWebSite.Location = new Point(0x51, 0x35);
this.textBoxCompanyWebSite.MaxLength = 0x100;
this.textBoxCompanyWebSite.Name = "textBoxCompanyWebSite";
this.textBoxCompanyWebSite.Size = new Size(0xdf, 20);
this.textBoxCompanyWebSite.TabIndex = 4;
this.textBoxCompanyName.BackColor = Color.White;
this.textBoxCompanyName.BorderStyle = BorderStyle.FixedSingle;
this.textBoxCompanyName.Location = new Point(0x51, 0x1b);
this.textBoxCompanyName.MaxLength = 0x40;
this.textBoxCompanyName.Name = "textBoxCompanyName";
this.textBoxCompanyName.Size = new Size(0xdf, 20);
this.textBoxCompanyName.TabIndex = 2;
this.lbJobTitle.AutoSize = true;
this.lbJobTitle.Location = new Point(20, 0x52);
this.lbJobTitle.Name = "lbJobTitle";
this.lbJobTitle.Size = new Size(0x2b, 13);
this.lbJobTitle.TabIndex = 5;
this.lbJobTitle.Text = "职 位";
this.lbCompanyWebSite.AutoSize = true;
this.lbCompanyWebSite.Location = new Point(20, 0x38);
this.lbCompanyWebSite.Name = "lbCompanyWebSite";
this.lbCompanyWebSite.Size = new Size(0x37, 13);
this.lbCompanyWebSite.TabIndex = 3;
this.lbCompanyWebSite.Text = "公司主页";
this.lbCompanyName.AutoSize = true;
this.lbCompanyName.Location = new Point(20, 30);
this.lbCompanyName.Name = "lbCompanyName";
this.lbCompanyName.Size = new Size(0x37, 13);
this.lbCompanyName.TabIndex = 1;
this.lbCompanyName.Text = "公司名称";
this.xcbPerBiz.BackColor = Color.White;
this.xcbPerBiz.DropDownStyle = ComboBoxStyle.DropDownList;
this.xcbPerBiz.FormattingEnabled = true;
this.xcbPerBiz.Location = new Point(0xd8, 0);
this.xcbPerBiz.Name = "xcbPerBiz";
this.xcbPerBiz.Size = new Size(0x79, 0x15);
this.xcbPerBiz.TabIndex = 0;
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
base.Controls.Add(this.xgbBizInfo);
base.Controls.Add(this.xgbPhone);
base.Controls.Add(this.xgbIdentity);
base.Name = "PsPrivacyControl";
base.Size = new Size(0x16b, 0x1b1);
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);
}
private void SetLimitation()
{
this.textBoxCompanyName.MaxLength = 0x80;
this.textBoxCompanyWebSite.MaxLength = 0x80;
this.textBoxHomePhone.MaxLength = 0x20;
this.textBoxJobTitle.MaxLength = 0x40;
this.textBoxOtherPhone.MaxLength = 0x20;
this.textBoxWorkPhone.MaxLength = 0x20;
this.xtbName.MaxLength = 0x40;
ControlHelper.ForceControlImeDisable(this.textBoxHomePhone);
ControlHelper.ForceControlImeDisable(this.textBoxOtherPhone);
ControlHelper.ForceControlImeDisable(this.textBoxWorkPhone);
ControlHelper.ForceControlImeHangul(this.xtbName);
ControlHelper.ForceControlImeHangul(this.textBoxCompanyName);
ControlHelper.ForceControlImeHangul(this.textBoxCompanyWebSite);
ControlHelper.ForceControlImeHangul(this.textBoxJobTitle);
}
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.HomePhone.ProposedValue = this.textBoxHomePhone.Text.Trim();
this._user.PersonalInfo.WorkPhone.ProposedValue = this.textBoxWorkPhone.Text.Trim();
this._user.PersonalInfo.OtherPhone.ProposedValue = this.textBoxOtherPhone.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;
}
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";
if (this._user.PersonalInfo.HomePhone != null)
{
this.textBoxHomePhone.Text = this._user.PersonalInfo.HomePhone.Value;
}
if (this._user.PersonalInfo.WorkPhone != null)
{
this.textBoxWorkPhone.Text = this._user.PersonalInfo.WorkPhone.Value;
}
if (this._user.PersonalInfo.OtherPhone != null)
{
this.textBoxOtherPhone.Text = this._user.PersonalInfo.OtherPhone.Value;
}
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;
}
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, ToolTipIcon.Info, 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 + -