private void Form1_FormClosed(object sender, FormClosedEventArgs e) { if (thread != null) { thread = null; } Application.Exit(); }
private void выходToolStripMenuItem_Click(object sender, EventArgs e) { if (thread != null) { thread = null; } Application.Exit(); }
private void button2_Click(object sender, EventArgs e) { if (thread.Unit != null) { if (thread.Unit.ObjectExcel.Visible) { thread.Unit.ObjectExcel.Quit(); thread = null; } label1.Text = "Выберите другую маршрутку"; } openMarsh.PerformClick(); }
public Form1() { InitializeComponent(); thread = new RoutedThread(); }