public void SaveUpdates(WorkItemController WIC) { SaveFieldData(); Update.DisplayTask = this; Update.Type = this.Type; WIC.QueueTaskUpdate(Update); }
public MainWindow(ObservableCollection <DisplayTask> allTasks) { pref = new Preferences(); InitializeComponent(); CreateSystemTray(); CreateBugTimer(); UICommon.AddToProperties("MainWindow", this); AllTasks = allTasks; WIC = new WorkItemController(); WIC.AllTasks = AllTasks; WIC.ProcessQueue(); Application.Current.Properties["WIC"] = WIC; lbUpdateQueue.ItemsSource = WIC.UpdateQueue; LoadData("All"); }
public WorkItemDetails(DisplayTask root) { InitializeComponent(); WIC = Application.Current.Properties["WIC"] as WorkItemController; root.LinkedTasks = WIC.GetRelatedWorkItems(root.workItem); var tasks = new ObservableCollection <DisplayTask>(root.LinkedTasks); tasks.Insert(0, root); icDetailTasks.ItemsSource = tasks; detailTaskEditor.DataContext = root; }
public async void LoadData() { prgLoadingBar.IsIndeterminate = true; await Task.Delay(20); var WIC = new WorkItemController(); var workItems = WIC.GetAllWorkItems(); prgLoadingBar.IsIndeterminate = false; prgLoadingBar.Maximum = workItems.Count; prgLoadingBar.Value = 0; await Task.Delay(20); var tasks = new ObservableCollection <DisplayTask>(); foreach (WorkItem workItem in workItems) { txtLoadingStatus.Text = string.Format("AreaPath: {0} Task Number: {1} Task Name: {2}", workItem.AreaPath, workItem.Id, workItem.Title); prgLoadingBar.Value++; var newTask = new DisplayTask(workItem); //newTask.LinkedTasks = WIC.GetRelatedWorkItems(workItem); tasks.Add(newTask); await Task.Delay(1); } var mainWindow = new MainWindow(tasks); Hide(); mainWindow.Show(); }
public void Remove(WorkItemController WIC) { parent.Attachments.Remove(this); parent.SaveUpdates(WIC); }