예제 #1
0
 private void Initialize()
 {
     this.InitializeComponent();
     base.MaximizeBox                 = false;
     base.MinimizeBox                 = false;
     base.FormBorderStyle             = FormBorderStyle.FixedDialog;
     this.txtName                     = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtName");
     this.txtPwd                      = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtPwd");
     this.txtPwd.MaxLength            = 0x10;
     this.txtPhone                    = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtPhone");
     this.txtDescription              = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtDescription");
     this.txtCreator                  = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtCreator");
     this.txtCreateDate               = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtCreateDate");
     this.chklRole                    = this.xmlComponentLoader1.GetControlByName <AisinoCKL>("chklRole");
     this.btnOK                       = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btnOK");
     this.btnCancel                   = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btnCancel");
     this.txtName.KeyPress           += new KeyPressEventHandler(this.txtName_KeyPress);
     this.txtPwd.KeyPress            += new KeyPressEventHandler(this.txtPwd_KeyPress);
     this.txtPhone.KeyPress          += new KeyPressEventHandler(this.txtPhone_KeyPress);
     this.txtName.TextChanged        += new EventHandler(this.txtName_TextChanged);
     this.txtPwd.TextChanged         += new EventHandler(this.txtPwd_TextChanged);
     this.txtPhone.TextChanged       += new EventHandler(this.txtPhone_TextChanged);
     this.txtDescription.Multiline    = true;
     this.txtDescription.ScrollBars   = ScrollBars.Vertical;
     this.txtDescription.KeyPress    += new KeyPressEventHandler(this.txtDescription_KeyPress);
     this.txtDescription.TextChanged += new EventHandler(this.txtDescription_TextChanged);
     this.chklRole.CheckOnClick       = true;
     this.txtPwd.PasswordChar         = '*';
     this.btnOK.Click                += new EventHandler(this.btnOK_Click);
     this.btnCancel.Click            += new EventHandler(this.btnCancel_Click);
 }
예제 #2
0
 private void Initialize()
 {
     this.InitializeComponent();
     base.MaximizeBox                = false;
     base.MinimizeBox                = false;
     base.FormBorderStyle            = FormBorderStyle.FixedDialog;
     this.txtPhone                   = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtPhone");
     this.txtCreateDate              = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtCreateDate");
     this.txtDesc                    = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtDesc");
     this.txtName                    = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtName");
     this.tvUser                     = this.xmlComponentLoader1.GetControlByName <AisinoTVW>("tvUser");
     this.chklRole                   = this.xmlComponentLoader1.GetControlByName <AisinoCKL>("chklRole");
     this.tsbtnNewUser               = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tsbtnNewUser");
     this.tsbtnUpdUser               = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tsbtnUpdUser");
     this.tsbtnDelUser               = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tsbtnDelUser");
     this.tsbtnChangePwd             = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tsbtnChangePwd");
     this.tsBtnCancel                = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tsBtnCancel");
     this.tsBtnSave                  = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tsBtnSave");
     this.txtName.KeyPress          += new KeyPressEventHandler(this.txtName_KeyPress);
     this.txtPhone.KeyPress         += new KeyPressEventHandler(this.txtPhone_KeyPress);
     this.txtDesc.KeyPress          += new KeyPressEventHandler(this.txtDesc_KeyPress);
     this.txtName.TextChanged       += new EventHandler(this.txtName_TextChanged);
     this.txtPhone.TextChanged      += new EventHandler(this.txtPhone_TextChanged);
     this.txtDesc.TextChanged       += new EventHandler(this.txtDesc_TextChanged);
     this.chklRole.CheckOnClick      = true;
     this.tsBtnSave.Alignment        = ToolStripItemAlignment.Right;
     this.tsBtnCancel.Alignment      = ToolStripItemAlignment.Right;
     this.tsbtnNewUser.Image         = Resources.user_add;
     this.tsbtnNewUser.ToolTipText   = "新增用户";
     this.tsbtnUpdUser.Image         = Resources.user_edit;
     this.tsbtnUpdUser.ToolTipText   = "修改用户";
     this.tsbtnDelUser.Image         = Resources.user_delete;
     this.tsbtnDelUser.ToolTipText   = "删除用户";
     this.tsbtnChangePwd.Image       = Resources.change_password;
     this.tsbtnChangePwd.ToolTipText = "修改密码";
     this.tsBtnCancel.Image          = Resources.cancel;
     this.tsBtnSave.Image            = Resources.accept;
     this.tsbtnNewUser.Click        += new EventHandler(this.tsbtnNewUser_Click);
     this.tsbtnUpdUser.Click        += new EventHandler(this.tsbtnUpdUser_Click);
     this.tsbtnDelUser.Click        += new EventHandler(this.tsbtnDelUser_Click);
     this.tsbtnChangePwd.Click      += new EventHandler(this.tsbtnChangePwd_Click);
     this.tvUser.AfterSelect        += new TreeViewEventHandler(this.tvUser_AfterSelect);
     this.tvUser.BeforeSelect       += new TreeViewCancelEventHandler(this.tvUser_BeforeSelect);
     this.tsBtnCancel.Click         += new EventHandler(this.tsBtnCancel_Click);
     this.tsBtnSave.Click           += new EventHandler(this.tsBtnSave_Click);
 }