Example #1
0
        private TaskItemElement CreateNewTaskItem(PocTask taskModel)
        {
            var taskItemViewModel = new TaskItemViewModel(taskModel);

            taskItemViewModel.IsAddState = true;
            return(new TaskItemElement(taskItemViewModel));
        }
Example #2
0
        public InstallationPackagesViewModel(TaskItemViewModel taskItemViewModel)
        {
            _taskItemViewModel = taskItemViewModel;
            SoftwareCollection = new ObservableCollection <SoftwareContentView>(GetSoftwareCollection());

            SoftwareWithTaskCommand = new RelayCommand(ExecuteSoftwareWithTask);
        }
Example #3
0
 public void RemoveTask(TaskItemViewModel taskItemViewModel)
 {
     for (int i = TaskItemElements.Count - 1; i >= 0; i--)
     {
         if (TaskItemElements[i].Model == taskItemViewModel)
         {
             TaskItemElements.RemoveAt(i);
             for (int j = ApplicationContext.TaskSoftwareSelectedList.Count - 1; j >= 0; j--)
             {
                 if (ApplicationContext.TaskSoftwareSelectedList[j].TaskId == taskItemViewModel.Id)
                 {
                     ApplicationContext.TaskSoftwareSelectedList.RemoveAt(j);
                     break;
                 }
             }
         }
     }
 }
Example #4
0
 private void OnLoadTask_Completed(object sender, RunWorkerCompletedEventArgs e)
 {
     if (_pocTasks != null)
     {
         UpdateHeader();
         foreach (var pocTask in _pocTasks)
         {
             var currentElement = TaskItemElements.FirstOrDefault(c => c.Model.Id == pocTask.Id);
             if (currentElement != null)
             {
                 currentElement.Model.RefreshModel(pocTask);
             }
             else
             {
                 var taskItemViewModel = new TaskItemViewModel(pocTask);
                 currentElement = new TaskItemElement(taskItemViewModel);
                 TaskItemElements.Add(currentElement);
             }
         }
     }
     RefreshAllPieChart();
     InitPieChartTimer(1000);
     //_mainViewModel.IsBusy = false;
 }
 public PieChartViewModel(TaskItemViewModel taskItemViewModel)
 {
     _taskItemViewModel = taskItemViewModel;
     InitData();
 }
Example #6
0
 private void InitChildViewModel(TaskItemViewModel taskItemViewModel)
 {
     InstallationPackagesViewModel = new InstallationPackagesViewModel(taskItemViewModel);
     PieChartViewModel             = new PieChartViewModel(taskItemViewModel);
 }