public static WpfHostingWinForm CreateVerificationProgressForm( [NotNull] IQualityVerificationProgressTracker progressTracker, [NotNull] Func <Task <ServiceCallStatus> > verificationAction, [CanBeNull] Action <QualityVerification> showReportAction, [CanBeNull] Action <IQualityVerificationResult> saveAction, [CanBeNull] string title) { var qaProgressViewmodel = new VerificationProgressViewModel { ProgressTracker = progressTracker, VerificationAction = verificationAction, ShowReportAction = showReportAction, SaveAction = saveAction }; VerificationProgressWpfControl progressControl = new VerificationProgressWpfControl(); progressControl.SetDataSource(qaProgressViewmodel); var progressForm = new WpfHostingWinForm(progressControl); progressForm.FixedHeight = true; progressForm.Text = title; return(progressForm); }
public static WpfHostingWinForm CreateVerificationProgressForm( [NotNull] IQualityVerificationProgressTracker progressTracker, [NotNull] Func <Task <ServiceCallStatus> > verificationAction, [CanBeNull] Action <QualityVerification> showReportAction, [CanBeNull] Action <IQualityVerificationResult, ErrorDeletionInPerimeter, bool> saveAction, [CanBeNull] ICommand openErrorWorklist, [CanBeNull] ICommand zoomToPerimeter, [CanBeNull] Action <IList <EnvelopeXY> > flashTileProgressAction, [CanBeNull] string title) { var qaProgressViewmodel = new VerificationProgressViewModel { ProgressTracker = progressTracker, VerificationAction = verificationAction, ShowReportAction = showReportAction, SaveAction = saveAction, OpenWorkListCommand = openErrorWorklist, ZoomToPerimeterCommand = zoomToPerimeter, FlashProgressAction = flashTileProgressAction }; VerificationProgressWpfControl progressControl = new VerificationProgressWpfControl(); progressControl.SetDataSource(qaProgressViewmodel); var progressForm = new WpfHostingWinForm(progressControl); progressForm.FixedHeight = true; progressForm.Text = title; return(progressForm); }
private static void UpdateServiceProgress( IQualityVerificationProgressTracker serviceProgress, VerificationResponse messageProto) { // No access to COM objects here (we're on the background thread!) serviceProgress.ErrorCount += messageProto.Issues.Count(i => !i.Allowable); serviceProgress.WarningCount += messageProto.Issues.Count(i => i.Allowable); VerificationProgressMsg progressMsg = messageProto.Progress; if (progressMsg == null) { return; } serviceProgress.ProgressType = (VerificationProgressType)progressMsg.ProgressType; serviceProgress.ProgressStep = (VerificationProgressStep)progressMsg.ProgressStep; serviceProgress.ProcessingMessage = progressMsg.ProcessingStepMessage; if (progressMsg.OverallProgressTotalSteps > 0) { serviceProgress.OverallProgressTotalSteps = progressMsg.OverallProgressTotalSteps; } serviceProgress.OverallProgressCurrentStep = progressMsg.OverallProgressCurrentStep; if (progressMsg.DetailedProgressTotalSteps > 0) { serviceProgress.DetailedProgressTotalSteps = progressMsg.DetailedProgressTotalSteps; } serviceProgress.DetailedProgressCurrentStep = progressMsg.DetailedProgressCurrentStep; if (progressMsg.CurrentBox != null && progressMsg.CurrentBox.XMax > 0 && progressMsg.CurrentBox.YMax > 0) { serviceProgress.CurrentTile = new EnvelopeXY( progressMsg.CurrentBox.XMin, progressMsg.CurrentBox.YMin, progressMsg.CurrentBox.XMax, progressMsg.CurrentBox.YMax); } serviceProgress.StatusMessage = progressMsg.Message; serviceProgress.RemoteCallStatus = (ServiceCallStatus)messageProto.ServiceCallStatus; }