private void cancle_Click(object sender, EventArgs e) { this.Close(); UIlanding UIlanding = new UIlanding(); UIlanding.Focus(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); UIlanding fl = new UIlanding(); fl.ShowDialog(); if (fl.DialogResult == DialogResult.OK) { Application.Run(new UImain()); } else { return; } }
private void login_Click(object sender, EventArgs e) { if (Pwd != rePwd) { if (MessageBox.Show("两次密码不同,请重新输入") == DialogResult.OK) { this.password.Focus(); return; } } if (!setphoto) { if (MessageBox.Show("未设置头像") == DialogResult.OK) { return; } } try { LibraryBLL.namecheck.check(name.Text); } catch { if (MessageBox.Show("名字已被注册,请重新输入") == DialogResult.OK) { return; } } byte[] road = ESBasic.Helpers.ImageHelper.Convert(this.head.BackgroundImage); LibraryBLL.Userlogin userlogin = new LibraryBLL.Userlogin(); try { userlogin.userlogincheck(name.Text, stuname.Text, stuid.Text, courage.Text, qq.Text, phone.Text, road, password.Text); } catch (Exception ex) { MessageBox.Show(ex.Message); return; } if (MessageBox.Show("注册成功") == DialogResult.OK) { UIlanding uilanding = new UIlanding(); uilanding.Focus(); this.Hide(); } }