public WorkItemController() { TFSServer = ConfigurationManager.AppSettings["TFSUrl"]; tpc = new TfsTeamProjectCollection( new Uri(TFSServer)); try { workItemStore = (WorkItemStore)tpc.GetService(typeof(WorkItemStore)); } catch (Exception ex) { MessageBox.Show("Unable to Connect to TFS. Check your VPN Connection. \nError " + ex.Message); Environment.Exit(-1); return; } parentLinkType = workItemStore.WorkItemLinkTypes.FirstOrDefault(l => l.ReverseEnd.Name == "Parent"); workItemProject = workItemStore.Projects[0]; GetAreas(workItemProject); GetIterations(workItemProject); GetUsers(tpc); GetStates(); UpdateQueue = new ObservableCollection <TaskUpdate>(); lastRefresh = DateTime.Now; mainWindow = UICommon.GetProperty("MainWindow") as MainWindow; }
private void btnBugOpenApp_Click(object sender, RoutedEventArgs e) { var mainWindow = UICommon.GetProperty("MainWindow") as MainWindow; mainWindow.Show(); this.Close(); }
public TaskEditor() { InitializeComponent(); ddArea.ItemsSource = UICommon.GetProperty("Areas") as List <string>; ddUser.ItemsSource = UICommon.GetProperty("Users") as List <string>; ddIteration.ItemsSource = UICommon.GetProperty("Iterations") as List <string>; }
private void btnAttachmentUpload_Click(object sender, RoutedEventArgs e) { Task.Attachments.Add(new TaskAttachment(txtAttachmentFile.Text, Task)); var WIC = UICommon.GetProperty("WIC") as WorkItemController; Task.SaveUpdates(WIC); }
public EditPreferences() { InitializeComponent(); ddPrefUserNames.ItemsSource = UICommon.GetProperty("Users") as List <string>; Preferences = new Preferences(); DataContext = Preferences; }
public TaskEditor(DisplayTask task) { InitializeComponent(); Task = task; DataContext = Task; ddArea.ItemsSource = UICommon.GetProperty("Areas") as List <string>; ddUser.ItemsSource = UICommon.GetProperty("Users") as List <string>; ddIteration.ItemsSource = UICommon.GetProperty("Iterations") as List <string>; icTaskAttachments.ItemsSource = Task.Attachments; }
public DisplayTask(string taskType) { var WIC = UICommon.GetProperty("WIC") as WorkItemController; workItem = WIC.GetNewWorkItem(taskType); workItem["Stack Rank"] = 500; LinkedTasks = new ObservableCollection <DisplayTask>(); Attachments = new ObservableCollection <TaskAttachment>(); Update = new TaskUpdate(); borderColor = DefaultBorderColor; BuildFieldList(); }
private void btnDeleteAttachment_Click(object sender, RoutedEventArgs e) { var result = MessageBox.Show("Are you sure you want to delete this attachment?", "Attachment Deletion Confirmation", MessageBoxButton.YesNo); if (result != MessageBoxResult.Yes) { return; } var attachment = DataContext as TaskAttachment; attachment.Remove(UICommon.GetProperty("WIC") as WorkItemController); }
private void BindTaskData() { icNewTaskList.ItemsSource = NewTasks; icActiveTaskList.ItemsSource = ActiveTasks; icCompleteTaskList.ItemsSource = CompleteTasks; icPlanningUserStories.ItemsSource = UserStories; dgMoveTasks.ItemsSource = AllTasks; ddMassMoveAreas.ItemsSource = UICommon.GetProperty("Areas") as List <string>; ddMassMoveUsers.ItemsSource = UICommon.GetProperty("Users") as List <string>; ddMassMoveIterations.ItemsSource = UICommon.GetProperty("Iterations") as List <string>; ddIterationCopySource.ItemsSource = UICommon.GetProperty("Iterations") as List <string>; ddIterationCopyDestination.ItemsSource = UICommon.GetProperty("Iterations") as List <string>; }
private void btnPrefSave_Click(object sender, RoutedEventArgs e) { Preferences.Save(); var mainWindow = UICommon.GetProperty("MainWindow") as MainWindow; mainWindow.BugTimer.Interval = new TimeSpan(0, Convert.ToInt32(Preferences.BugTimer), 0); if (userChanged) { var WIC = UICommon.GetProperty("WIC") as WorkItemController; WIC.UpdateQueue.AddOnUI(new TaskUpdate { IsReadRequest = true, ID = -1 }); } Close(); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { var mainWindow = UICommon.GetProperty("MainWindow") as MainWindow; mainWindow.FilterTasksFromThread(); }