protected override void Run() { int ticker = 0; int step = Math.Max(100 / ((forms == null || forms.Count == 0 ? 1 : forms.Count) + (answers == null ? 0 : 1)), 1); AnswerReviewCount = new Workspace.ReviewCounter(); ResultsReviewCount = new Workspace.ReviewCounter(); if (answers != null) { Progress(ticker += step, "Analyzing key..."); AnswerReviewCount = Workspace.GetManualReviewCollection(answers, verificationParameters); } if (forms == null || forms.Count == 0) { return; } for (int i = 0; i < forms.Count; i++) { IRecognitionForm form = forms[i]; Progress(ticker += step, string.Format("Analyzing {0}...", form.Name)); ResultsReviewCount += Workspace.GetManualReviewCollection(form, verificationParameters, answers); } base.Run(); }
private void SetupAnswerKey() { if (rowIndex >= dgv.Rows.Count || dgv.Rows[rowIndex].Tag == null) { return; } IRecognitionForm form = (IRecognitionForm)dgv.Rows[rowIndex].Tag; string guid = form.Id; string fileName = workspace.AnswerKeyPath; lblFilename.Text = LBL_FILENAME + Path.GetFileName(fileName); if (File.Exists(fileName)) { masterSheet = workspace.ImageManager.Get(guid); SetupAnnotations(masterSheet); } else { Label lbl = new Label(); lbl.TextAlign = ContentAlignment.MiddleCenter; lbl.Text = string.Format("The image file for the answer key \n\"{0}\"\n was not found.", fileName); spltMain.Panel2.Controls.Add(lbl); lbl.AutoSize = false; lbl.Dock = DockStyle.Fill; lbl.BringToFront(); } Workspace.ReviewCounter rc = Workspace.GetManualReviewCollection(form, workspace.VerificationParameters, workspace.Answers); }
public ErrorStatisticsPanel(Workspace.ReviewCounter answerReviewCounts, Workspace.ReviewCounter resultsReviewCounts) : base() { InitializeComponent(); this.answerReviewCounts = answerReviewCounts; this.resultsReviewCounts = resultsReviewCounts; PopulateListBox(); Title = "Report"; }
private void DoWorksheetSetup(IRecognitionForm form) { if (rowIndex >= dgv.Rows.Count || dgv.Rows[rowIndex].Tag == null) { return; } string guid = form.Id; string fileName = workspace.GetImageFilePath(guid); Workspace.ReviewCounter rc = Workspace.GetManualReviewCollection(form, workspace.VerificationParameters, workspace.Answers); masterSheet = workspace.ImageManager.Get(guid); SetupAnnotations(masterSheet); }