private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Settings.Default.tb1 = this.Line1.Text;
Settings.Default.tb2 = this.Line2.Text;
Settings.Default.tb3 = this.Line3.Text;
Settings.Default.tb4 = this.Line4.Text;
Settings.Default.tb5 = this.FName.Text;
Settings.Default.Save();
if (MessageBox.Show("您确认退出吗?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
if (thread != null)
{
thread.Abort();
thread.Join();
}
if (thread1 != null)
{
thread1.Abort();
thread1.Join();
}
Runing = false;
Run = false;
Dispose();
//Application.Exit();
Environment.Exit(0);
}
else
{
e.Cancel = true;
}
}