示例#1
0
        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();
        }
示例#2
0
 public void Work()
 {
     var context = SynchronizationContext.Current;
     var depLogic = new DepLogic(context);
 }