private void timer_Tick(object sender, EventArgs e) { listcompetitor(); this.listcomp.CurrentCell = this.listcomp.Rows[currentIndex].Cells[0]; playwith(); if (result != "") { _timer.Stop(); waiting = 0; MessageBox.Show(result, "You will play with"); this.Hide(); _ga.Show(); } //check online status to close forms if ppssible int lcOnline = Convert.ToInt32(clsDbConnection.DbFunction("OnlineStatus", new Dictionary <string, object> { ["prUserName"] = player.Text })); if (lcOnline == 0) { this.Hide(); _timer.Stop(); sg.Show(); } }
private void button2_Click(object sender, EventArgs e) { this.Close(); signin sg = new signin(); sg.Show(); }
private void back_Click(object sender, EventArgs e) { this.Hide(); signin sg = new signin(); sg.Show(); }
private void Go_Click(object sender, EventArgs e) { if (wus.Text == "" || wps.Text == "") { MessageBox.Show("Pls enter information"); } else { int lcResult = Convert.ToInt32(clsDbConnection.DbFunction("checksignin", new Dictionary <string, object> { ["us"] = wus.Text, ["ps"] = wps.Text })); admin ad = new admin(); signin sg = new signin(); member mem = new member(wus.Text); switch (lcResult) { case 0: { MessageBox.Show("You enntered incorrect info"); sg.Show(); this.Hide(); int lcattempt = Convert.ToInt32(clsDbConnection.DbFunction("attemptincrease", new Dictionary <string, object> { ["prUserName"] = wus.Text })); break; } case 1: { DataTable dtResetAttempt = clsDbConnection.SProcTable("resetSigninAttempt", new Dictionary <string, object> { ["prUserName"] = wus.Text }); MessageBox.Show("You logged in"); this.Hide(); mem.Show(); break; } case 2: { MessageBox.Show("You registered successfully"); mem.Show(); this.Hide(); break; } case 3: { ad.Show(); this.Hide(); break; } case 4: { MessageBox.Show("You have failed so many times!!! Contact admin"); sg.Show(); this.Hide(); break; } case 5: { MessageBox.Show("You already sign in!!"); sg.Show(); this.Hide(); break; } } } }