📄 psprivacycontrol.cs
字号:
namespace Imps.Client.Pc.Options
{
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.Utils;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
public class PsPrivacyControl : OptionsControlBase
{
private IFrameworkWindow _iFrameworkWindow;
private IContainer components;
private XLabel label1;
private XLabel label2;
private XLabel label3;
private XLabel lbCompanyName;
private XLabel lbCompanyWebSite;
private XLabel lbHomePhone;
private XLabel lbJobTitle;
private XLabel lbOtherPhone;
private XLabel lbWorkPhone;
private XTextBox textBoxCompanyName;
private XTextBox textBoxCompanyWebSite;
private XTextBox textBoxHomePhone;
private XTextBox textBoxJobTitle;
private XTextBox textBoxOtherPhone;
private XTextBox textBoxWorkPhone;
private XComboBox xcbPerBiz;
private XComboBox xcbPerPhone;
private GroupBox xgbBizInfo;
private GroupBox xgbIdentity;
private GroupBox xgbPhone;
private XTextBox xtbMobileNo;
private XTextBox xtbMobileRC;
private XTextBox xtbName;
public PsPrivacyControl(IFrameworkWindow frameworkWnd)
{
this._iFrameworkWindow = frameworkWnd;
this.InitializeComponent();
this.SetLimitation();
this.initPermission();
this.handleUiEvent();
}
public override bool CheckUserInput()
{
if (!this.DoCheckPhone(this.textBoxHomePhone))
{
return false;
}
if (!this.DoCheckPhone(this.textBoxWorkPhone))
{
return false;
}
return this.DoCheckPhone(this.textBoxOtherPhone);
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.components != null))
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private bool DoCheckPhone(Control inputCtrl)
{
if (!StringHelper.IsAscii(inputCtrl.Text.Trim()))
{
BalloonHelper.ShowInputErrorBallon(inputCtrl, StringTable.MsgAsciiOnly, StringTable.Options.TitleInvalidInput);
return false;
}
return true;
}
private void handleUiEvent()
{
this.xtbName.TextChanged += new EventHandler(this.uiData_Changed);
this.xcbPerBiz.SelectedIndexChanged += new EventHandler(this.uiData_Changed);
this.textBoxCompanyName.TextChanged += new EventHandler(this.uiData_Changed);
this.textBoxCompanyWebSite.TextChanged += new EventHandler(this.uiData_Changed);
this.textBoxJobTitle.TextChanged += new EventHandler(this.uiData_Changed);
this.xcbPerPhone.SelectedIndexChanged += new EventHandler(this.uiData_Changed);
this.textBoxHomePhone.TextChanged += new EventHandler(this.uiData_Changed);
this.textBoxOtherPhone.TextChanged += new EventHandler(this.uiData_Changed);
this.textBoxWorkPhone.TextChanged += new EventHandler(this.uiData_Changed);
}
private void InitializeComponent()
{
this.xgbIdentity = new GroupBox();
this.label3 = new XLabel();
this.xtbMobileNo = new XTextBox();
this.xtbMobileRC = new XTextBox();
this.xtbName = new XTextBox();
this.label2 = new XLabel();
this.label1 = new XLabel();
this.xgbPhone = new GroupBox();
this.textBoxOtherPhone = new XTextBox();
this.xcbPerPhone = new XComboBox();
this.lbHomePhone = new XLabel();
this.lbOtherPhone = new XLabel();
this.textBoxHomePhone = new XTextBox();
this.lbWorkPhone = new XLabel();
this.textBoxWorkPhone = new XTextBox();
this.xgbBizInfo = new GroupBox();
this.textBoxJobTitle = new XTextBox();
this.textBoxCompanyWebSite = new XTextBox();
this.textBoxCompanyName = new XTextBox();
this.lbJobTitle = new XLabel();
this.lbCompanyWebSite = new XLabel();
this.lbCompanyName = new XLabel();
this.xcbPerBiz = new XComboBox();
this.xgbIdentity.SuspendLayout();
this.xgbPhone.SuspendLayout();
this.xgbBizInfo.SuspendLayout();
base.SuspendLayout();
this.xgbIdentity.Controls.Add(this.label3);
this.xgbIdentity.Controls.Add(this.xtbMobileNo);
this.xgbIdentity.Controls.Add(this.xtbMobileRC);
this.xgbIdentity.Controls.Add(this.xtbName);
this.xgbIdentity.Controls.Add(this.label2);
this.xgbIdentity.Controls.Add(this.label1);
this.xgbIdentity.ForeColor = Color.Black;
this.xgbIdentity.Location = new Point(5, 9);
this.xgbIdentity.Name = "xgbIdentity";
this.xgbIdentity.Size = new Size(0x161, 90);
this.xgbIdentity.TabIndex = 0;
this.xgbIdentity.TabStop = false;
this.xgbIdentity.Text = "个人身份";
this.label3.BackColor = SystemColors.ButtonFace;
this.label3.BorderStyle = BorderStyle.FixedSingle;
this.label3.Location = new Point(0xda, 0);
this.label3.Name = "label3";
this.label3.Size = new Size(120, 0x11);
this.label3.TabIndex = 0;
this.label3.Text = "保密";
this.label3.TextAlign = ContentAlignment.MiddleCenter;
this.xtbMobileNo.BackColor = Color.FromArgb(240, 240, 240);
this.xtbMobileNo.BorderStyle = BorderStyle.FixedSingle;
this.xtbMobileNo.Location = new Point(0x83, 0x36);
this.xtbMobileNo.Name = "xtbMobileNo";
this.xtbMobileNo.ReadOnly = true;
this.xtbMobileNo.Size = new Size(0x7d, 20);
this.xtbMobileNo.TabIndex = 5;
this.xtbMobileRC.BackColor = Color.FromArgb(240, 240, 240);
this.xtbMobileRC.BorderStyle = BorderStyle.FixedSingle;
this.xtbMobileRC.Location = new Point(0x51, 0x36);
this.xtbMobileRC.Name = "xtbMobileRC";
this.xtbMobileRC.ReadOnly = true;
this.xtbMobileRC.Size = new Size(0x2c, 20);
this.xtbMobileRC.TabIndex = 4;
this.xtbName.BackColor = Color.White;
this.xtbName.BorderStyle = BorderStyle.FixedSingle;
this.xtbName.Location = new Point(0x51, 0x1a);
this.xtbName.MaxLength = 60;
this.xtbName.Name = "xtbName";
this.xtbName.Size = new Size(0xaf, 20);
this.xtbName.TabIndex = 2;
this.xtbName.Enter += new EventHandler(this.xtbName_Enter);
this.xtbName.Leave += new EventHandler(this.xtbName_Leave);
this.label2.AutoSize = true;
this.label2.Location = new Point(0x11, 0x3b);
this.label2.Name = "label2";
this.label2.Size = new Size(0x37, 13);
this.label2.TabIndex = 3;
this.label2.Text = "手机号码";
this.label1.AutoSize = true;
this.label1.Location = new Point(0x12, 0x1c);
this.label1.Name = "label1";
this.label1.Size = new Size(0x37, 13);
this.label1.TabIndex = 1;
this.label1.Text = "姓 名";
this.xgbPhone.Controls.Add(this.textBoxOtherPhone);
this.xgbPhone.Controls.Add(this.xcbPerPhone);
this.xgbPhone.Controls.Add(this.lbHomePhone);
this.xgbPhone.Controls.Add(this.lbOtherPhone);
this.xgbPhone.Controls.Add(this.textBoxHomePhone);
this.xgbPhone.Controls.Add(this.lbWorkPhone);
this.xgbPhone.Controls.Add(this.textBoxWorkPhone);
this.xgbPhone.ForeColor = Color.Black;
this.xgbPhone.Location = new Point(5, 0x69);
this.xgbPhone.Name = "xgbPhone";
this.xgbPhone.Size = new Size(0x161, 0x7a);
this.xgbPhone.TabIndex = 1;
this.xgbPhone.TabStop = false;
this.xgbPhone.Text = "电话";
this.textBoxOtherPhone.BackColor = Color.White;
this.textBoxOtherPhone.BorderStyle = BorderStyle.FixedSingle;
this.textBoxOtherPhone.Location = new Point(0x51, 0x57);
this.textBoxOtherPhone.MaxLength = 40;
this.textBoxOtherPhone.Name = "textBoxOtherPhone";
this.textBoxOtherPhone.Size = new Size(0xdf, 20);
this.textBoxOtherPhone.TabIndex = 6;
this.xcbPerPhone.BackColor = Color.White;
this.xcbPerPhone.DropDownStyle = ComboBoxStyle.DropDownList;
this.xcbPerPhone.FormattingEnabled = true;
this.xcbPerPhone.Location = new Point(0xd8, 0);
this.xcbPerPhone.Name = "xcbPerPhone";
this.xcbPerPhone.Size = new Size(0x79, 0x15);
this.xcbPerPhone.TabIndex = 0;
this.lbHomePhone.AutoSize = true;
this.lbHomePhone.Location = new Point(20, 0x1f);
this.lbHomePhone.Name = "lbHomePhone";
this.lbHomePhone.Size = new Size(0x37, 13);
this.lbHomePhone.TabIndex = 1;
this.lbHomePhone.Text = "家庭电话";
this.lbOtherPhone.AutoSize = true;
this.lbOtherPhone.Location = new Point(20, 0x5c);
this.lbOtherPhone.Name = "lbOtherPhone";
this.lbOtherPhone.Size = new Size(0x37, 13);
this.lbOtherPhone.TabIndex = 5;
this.lbOtherPhone.Text = "其他电话";
this.textBoxHomePhone.BackColor = Color.White;
this.textBoxHomePhone.BorderStyle = BorderStyle.FixedSingle;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -