public FormLogin() { InitializeComponent(); UIDesign.SetFormClass(this); this.StartPosition = FormStartPosition.CenterScreen; }
private void FormLogin_Resize(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Normal) { UIDesign.SetWindowRegion(this, 20); UIDesign.SetWindowRegion(panelLogin, 20); } else { this.Region = null; } }
private void FormLogin_Load(object sender, EventArgs e) { UIDesign.SetFormMove(this); //读取登录过的用户 tbUser.Items.AddRange(BLL.FileXmlIO.readAllUser()); //文本框赋值 string username, password; BLL.FileXmlIO.readUser(out username, out password); tbUser.Text = username; tbPassword.PasswordChar = '*'; tbPassword.Text = password; //选择框赋值 if (BLL.FileXmlIO.getRemember()) { cbRemember.Checked = true; encodeMD5 = false; } }
/// <summary> /// 设置窗体阴影 /// </summary> /// <param name="form"></param> public static void SetFormClass(FormLogin form) { SetClassLong(form.Handle, UIDesign.GCL_STYLE, UIDesign.GetClassLong(form.Handle, UIDesign.GCL_STYLE) | UIDesign.CS_DropSHADOW); }
private void FormLogin_MouseMove(object sender, MouseEventArgs e) { UIDesign.SetFormMove(this); }