/// <summary> /// Initializes a new instance of the <see cref="PluginUI"/> class. /// </summary> /// <param name="main">The main plugin instance.</param> /// <remarks>Documented by CFI, 2010-06-26</remarks> public PluginUI(TfsManager manager) { Manager = manager; InitializeComponent(); Enabled = false; listViewSourceFiles.SmallImageList = new ImageList(); listViewSourceFiles.LargeImageList = new ImageList(); ToolTip toolTip = new ToolTip(); toolTip.SetToolTip(radioButtonSourceFiles, "Source Files"); toolTip.SetToolTip(radioButtonWorkItems, "Work Items"); toolTip.SetToolTip(radioButtonCheckInNotes, "Check-in Notes"); toolTip.SetToolTip(radioButtonPolicyWarnings, "Policy Warnings"); toolTip.SetToolTip(radioButtonConflicts, "Conflicts"); olvColumnCheckInAction.AspectToStringConverter = delegate(object x) { if (x is WorkItemCheckinAction) { WorkItemCheckinAction action = (WorkItemCheckinAction)x; if (action == WorkItemCheckinAction.None) { return(""); } else { return(action.ToString()); } } else { return(x.ToString()); } }; objectListViewWorkItems.BooleanCheckStatePutter = delegate(Object rowObject, bool newValue) { (rowObject as WorkItemCheckinInfo).CheckinAction = newValue ? WorkItemCheckinAction.Associate : WorkItemCheckinAction.None; return(newValue); }; olvColumnDescription.AspectGetter = delegate(object item) { if (item is PolicyFailure) { return((item as PolicyFailure).Message); } else if (item is Exception) { return((item as Exception).Message); } else { return(item.ToString()); } }; ShowSourceFiles(); }
private WorkItemCheckinInfo GetWorkItemInfo(string workItem, WorkItemCheckinAction checkinAction) { return new WorkItemCheckinInfo(WorkItems.GetWorkItem(Convert.ToInt32(workItem)), checkinAction); }
private static WorkItemCheckedInfo GetWorkItemCheckedInfo(string workitem, WorkItemCheckinAction checkinAction) { return(new WorkItemCheckedInfo(Convert.ToInt32(workitem), true, checkinAction)); }
private IEnumerable<WorkItemCheckinInfo> GetWorkItemInfos(IEnumerable<string> workItems, WorkItemCheckinAction checkinAction) { return workItems.Select(workItem => GetWorkItemInfo(workItem, checkinAction)); }
private WorkItemCheckinInfo GetWorkItemInfo(string workItem, WorkItemCheckinAction checkinAction) { return(new WorkItemCheckinInfo(WorkItems.GetWorkItem(Convert.ToInt32(workItem)), checkinAction)); }