Exemplo n.º 1
0
 private void PictureBox_MouseDown(object sender, MouseEventArgs e)
 {
     try
     {
         if (e.Button == MouseButtons.Left)
         {
             dragHandle = trainROI.HitTest(e.X, e.Y, zoomX, zoomY, (panX - mouseX) * (1 / zoomX), (panY - mouseY) * (1 / zoomY));
         }
         else if (e.Button == MouseButtons.Right)
         {
             recordX_1 = e.X;
             recordY_1 = e.Y;
             mouseX    = e.X - recordX_2;
             mouseY    = e.Y - recordY_2;
         }
         isDragging = true;
     }
     catch (EException exc)
     {
         StackFrame[] stackFrames = new StackTrace(true).GetFrames();
         clsLogFile.LogTryCatch(stackFrames, exc.Message, true, true);
     }
     catch (Exception ex)
     {
         StackFrame[] stackFrames = new StackTrace(true).GetFrames();
         clsLogFile.LogTryCatch(stackFrames, ex.Message, true, true);
     }
 }
Exemplo n.º 2
0
        public clsEasyFindPattern(PictureBox display, EPatternFinder ePatternFinder)
        {
            Display    = display;
            Base       = ePatternFinder;
            inputImage = new EImageBW8();
            trainROI   = new EROIBW8();
            trainImage = new EImageBW8();

            dragHandle = EDragHandle.NoHandle;

            patternTable = new DataTable("PatternTable");
            patternTable.Columns.Add("Index");
            patternTable.Columns.Add("Score");
            patternTable.Columns.Add("Center_X");
            patternTable.Columns.Add("Center_Y");
            patternTable.Columns.Add("Angle (Deg)");
            patternTable.Columns.Add("Scale (%)");
        }