public void ShowDepart() { var departForm = new Depart(); departForm.SetMdiParent(_mainForm.GetForm()); DepLogic depLogic = new DepLogic(_context); var departPresenter = new DepartPresenter(departForm, depLogic); // Task.Factory.StartNew(() => { depLogic.Work(); }); Thread myThread = new Thread(new ThreadStart(depLogic.Work)); myThread.Name = "Поток "; myThread.IsBackground = true; myThread.Start(); //departForm.MdiParent = this; departForm.Show(); }
public void Work() { var context = SynchronizationContext.Current; var depLogic = new DepLogic(context); }