private void button1_Click(object sender, EventArgs e) { string message = ""; int userid = controller.GetUser(login_box.Text, passw_box.Text); if (userid == -1) { message = controller.error; MessageBox.Show(message); } else { if (!controller.LoadUserData(userid)) { message = controller.error; MessageBox.Show(message); } else { ShowStats stats_form = new ShowStats(ref controller); stats_form.Show(); } } passw_box.Text = ""; controller.Reset(); }
private void Stats_Click(object sender, EventArgs e) { ShowStats stats_form = new ShowStats(ref controller); stats_form.Show(); }