private void button3_Click(object sender, EventArgs e) { if (mydb.IsServerConnected()) { Application.Idle -= ProcessFrame; Application.Idle -= runningFrame; ReleaseData(); FormManualTrain frmManTrain = new FormManualTrain(this); frmManTrain.Show(); button1.Enabled = true; this.Hide(); } else { MessageBox.Show("Database not connect."); } }
private void button3_Click(object sender, EventArgs e) { if (t != null) { Console.WriteLine(t.ThreadState); t.Abort(); timer.Stop(); timer.Close(); } Application.Idle -= ProcessFrame; Application.Idle -= runningFrame; ReleaseData(); FormManualTrain frmManTrain = new FormManualTrain(this); frmManTrain.Show(); button1.Enabled = true; this.Hide(); }