/// <summary>
 /// Initialization of window's elements.
 /// </summary>
 /// <param name="ProcToStart">Object for started process.</param>
 /// <param name="AppToStart">Object for started app.</param>
 public CreatProcWindow(Proc ProcToStart, CApp AppToStart)
 {
     _procToStart = ProcToStart;
     _appToStart = AppToStart;
     InitializeComponent();
     textBox1.Focus();
 }
Example #2
0
 /// <summary>
 /// Call starting new task.
 /// </summary>
 private void TaskStartButton_Click(object sender, RoutedEventArgs e)
 {
     Proc ProcToStart = new Proc();
     CApp AppToStart = new CApp();
     CreatProcWindow CrPrWind = new CreatProcWindow(ProcToStart, AppToStart);
     CrPrWind.ShowDialog();
     if (ProcToStart.Id != 0) // if new task has started
     {
         _procColl.Add(ProcToStart);
         _procColl = new List<Proc>(_procColl);
         ProcListView.ItemsSource = _procColl;
         if (AppToStart.Name != "") // if new task has window
         {
             _appColl.Add(AppToStart);
             _appColl = new List<CApp>(_appColl);
             AppListView.ItemsSource = _appColl;
         }
     }
 }