private void AddMessagetoJobItems(ComponentProcessMessage message) { if (message.MessageSource == MessageSource.ServerBatchLevel && message.Message == "Batch Ended") { foreach (var groupItem in UiProcessBatch) { groupItem.ProcessStatus = "Finished"; } } else if (message.MessageSource == MessageSource.ServerGroupLevel && message.Message == "Group Ended") { var group = UiProcessBatch.FirstOrDefault(c => c.Id == message.GroupId); if (group != null) { group.ProcessStatus = "Finished"; } } else { foreach (var groupItem in UiProcessBatch) { var job = groupItem.Children.FirstOrDefault(c => c.Id == message.JobId); if (job != null && message.Message == "Job Ended") { job.ProcessStatus = "Finished"; string ms = string.Format("job {0} get message from {1} : {2}", job.Name, message.MessageSource.ToString(), message.Message); ProgressMessage.Add(ms); } } } }
public void AddGroup() { string name = "Group" + UiProcessBatch.Count + 1; ProcessItem newGroup = new ProcessItem() { Name = name }; UiProcessBatch.Add(newGroup); CurrentGroup = newGroup; Samples.Clear(); }
public void AddGroup() { ObservableCollection <ProcessItem> seq = new ObservableCollection <ProcessItem>(); CurrentGroup = seq; ProcessItem item = new IdNamePairProcessItem(); item.Name = "group" + (UiProcessBatch.Count + 1).ToString(); item.Children = seq; item.CrtDepthLevel = 1; UiProcessBatch.Add(item); }