private void Test_Load(object sender, EventArgs e) { Test lg = new Test(); lg.ShowDialog(); Dataprocess dt = new Dataprocess(); list = dt.GetQuestions(); LoadQuestion(index, list); timer1.Start(); }
private void button1_Click(object sender, EventArgs e) { string user = txtUserName.Text; string pass = txtPassword.Text; Dataprocess dt = new Dataprocess(); if (dt.CheckLogin(user, pass) == true) { Test tt = new Test(); tt.Show(); } else { MessageBox.Show(this, "LOGIN FAILED", "RESULT", MessageBoxButtons.OK, MessageBoxIcon.Error); txtUserName.Text = ""; txtPassword.Text = ""; txtUserName.Focus(); } }