private void btRegister_Click(object sender, EventArgs e) { if (CheckNull()) { return; } if (CheckRegister()) { xuiFlatProgressBar_Login.Visible = true; for (int i = 0; i < 100; i++) { xuiFlatProgressBar_Login.Value = i; xuiFlatProgressBar_Login.Update(); System.Threading.Thread.Sleep(10); } loginAccount = AccountBUS.Instance.GetAccountByUserName(tbUsername.Text); string path = System.IO.Path.GetFullPath(System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), @"..\..\Resources")); AccountBUS.Instance.SavePicture(loginAccount.ID, path, "default-user-picture.png"); fMain = new Form_Main(loginAccount, father); fMain.Show(); this.Hide(); } }
private void button1_Click(object sender, EventArgs e) { BUS_User us = new BUS_User(); List <DangNhap> dn = us.dangNhap(); bool test = false; for (int i = 0; i < dn.Count; i++) { if (dn[i].tendangnhap.ToString() == txtUser.Text.ToString() && dn[i].matkhau.ToString() == txtPassWords.Text.ToString()) { test = true; } } if (test) { MessageBox.Show("Đăng nhập thành công", "Thông báo", MessageBoxButtons.OK); this.Hide(); Form_Main main = new Form_Main(); main.Show(); } else { MessageBox.Show("Bạn đã điền sai tên đăng nhập hoặc mật khẩu ! ", "Thông báo", MessageBoxButtons.OK); setNull(); } }
private void xuiButton_Back_Click(object sender, EventArgs e) { this.FormClosing -= this.Form_Game_CarRacing_FormClosing; father.Show(); stopAllMusic(); this.Close(); }
private void toolStripButton7_Click(object sender, EventArgs e) { Form_Main main = new Form_Main(); this.Hide(); main.Show(); }
private void btLogin_Click(object sender, EventArgs e) { if (CheckNull()) { return; } if (CheckLogin()) { xuiFlatProgressBar_Login.Visible = true; for (int i = 0; i < 100; i++) { xuiFlatProgressBar_Login.Value = i; xuiFlatProgressBar_Login.Update(); Thread.Sleep(10); } loginAccount = AccountBUS.Instance.GetAccountByUserName(tbUsername.Text); fMain = new Form_Main(loginAccount, this); fMain.Show(); this.Hide(); } }
private void xuiButton_Back_Click(object sender, EventArgs e) { father.Show(); stopAllMusic(); this.Close(); }