Example #1
0
 public void SaveUpdates(WorkItemController WIC)
 {
     SaveFieldData();
     Update.DisplayTask = this;
     Update.Type        = this.Type;
     WIC.QueueTaskUpdate(Update);
 }
Example #2
0
        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");
        }
Example #3
0
        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;
        }
Example #4
0
        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();
        }
Example #5
0
 public void Remove(WorkItemController WIC)
 {
     parent.Attachments.Remove(this);
     parent.SaveUpdates(WIC);
 }