public static FormController GetInstance() { if (instance == null) { instance = new FormController(); } return(instance); }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { MessageBox.Show("Старт"); System.Threading.Thread.Sleep(100); MessageBox.Show("Инстанс"); FormController.GetInstance(); MessageBox.Show("Стоп"); backgroundWorker1.CancelAsync(); }