Exemplo n.º 1
0
 //-------------------------------------------------------------------------
 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;
 }
Exemplo n.º 2
0
        //-------------------------------------------------------------------------
        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)
            {
            }
        }
Exemplo n.º 3
0
 public void NotifyUpdated(EventHandler<BubbleEventArgs> key, object obj, BubbleEventArgs e)
 {
     var handler = key;
     if (handler != null) handler(obj, e);
 }