//------------------------------------------------------------------------- private void AddBubblesAreaControl(BubbleEventArgs e) { if (Status == StatusMessage.ChangeAmoutOfQuestions) return; //linesPerArea = new int[rec.areas.Length]; //bubblesPerLine = new int[rec.areas.Length]; linesPerArea = new int[rec.linesPerArea.Length]; bubblesPerLine = new int[rec.linesPerArea.Length]; for (int j = 0; j < rec.linesPerArea.Length; j++) { if (j > rec.bubblesPerLine.Length - 1) break; linesPerArea[j] = rec.linesPerArea[j]; bubblesPerLine[j] = rec.bubblesPerLine[j]; } rec.areas = (RegionsArea[])e.Areas.Clone(); bac = CreateNewBubblesAreaControl(rec.areas, rec.AmoutOfQuestions); DrawBubbleItems(); VerifyButton.Enabled = true; }
//------------------------------------------------------------------------- private void Recognize_ChangedBubble(object sender, BubbleEventArgs e) { try { Invoke(new MethodInvoker(delegate { if (!DarknessManualySet.Checked) { UpdateUI("nudPerCentEmptyBubble", (decimal)rec.DarknessPercent); UpdateUI("nudPerCentBestBubble", (decimal)rec.DarknessDifferenceLevel); } //DateTime dt = DateTime.Now; AddBubblesAreaControl(e); //TimeSpan ts = DateTime.Now - dt; bac.Refresh(); pictureBox1.Refresh(); //lblErr.Visible = false; VerifyButton.Enabled = true; //VerifyButton.Focus(); if (rec.BarCodesPrompt != "") { UpdateUI("StatusLabel", rec.BarCodesPrompt); lblErr.Text = rec.BarCodesPrompt; if (!errList.Contains(lblErr.Text)) errList.Add(lblErr.Text); lblErr.Visible = true; } else { UpdateUI("StatusLabel", "Ready"); } //comboBoxSetFocus(); })); } catch (Exception) { } }
public void NotifyUpdated(EventHandler<BubbleEventArgs> key, object obj, BubbleEventArgs e) { var handler = key; if (handler != null) handler(obj, e); }