상속: Xwt.Dialog
예제 #1
0
 internal static void Open(List <ExtendedItem> items, Microsoft.TeamFoundation.VersionControl.Client.Workspace workspace)
 {
     using (var dialog = new CheckInDialog())
     {
         dialog.FillStore(items, workspace);
         if (dialog.Run(Toolkit.CurrentEngine.WrapWindow(MessageService.RootWindow)) == Command.Ok)
         {
             using (var progress = VersionControlService.GetProgressMonitor("CheckIn", VersionControlOperationType.Push))
             {
                 progress.BeginTask("Check In", 1);
                 var result = workspace.CheckIn(dialog.SelectedChanges, dialog.Comment, dialog.SelectedWorkItems);
                 foreach (var failure in result.Failures.Where(f => f.SeverityType == SeverityType.Error))
                 {
                     progress.ReportError(failure.Code, new Exception(failure.Message));
                 }
                 progress.EndTask();
                 progress.ReportSuccess("Finish Check In");
             }
         }
     }
 }
 internal static void Open(List<ExtendedItem> items, Microsoft.TeamFoundation.VersionControl.Client.Workspace workspace)
 {
     using (var dialog = new CheckInDialog())
     {
         dialog.FillStore(items, workspace);
         if (dialog.Run(Toolkit.CurrentEngine.WrapWindow(MessageService.RootWindow)) == Command.Ok)
         {
             using (var progress = VersionControlService.GetProgressMonitor("CheckIn", VersionControlOperationType.Push))
             {
                 progress.BeginTask("Check In", 1);
                 var result = workspace.CheckIn(dialog.SelectedChanges, dialog.Comment, dialog.SelectedWorkItems);
                 foreach (var failure in result.Failures.Where(f => f.SeverityType == SeverityType.Error))
                 {
                     progress.ReportError(failure.Code, new Exception(failure.Message));
                 }
                 progress.EndTask();
                 progress.ReportSuccess("Finish Check In");
             }
         }
     }
 }