Beispiel #1
0
 public override void DrawToPicBox(MPicBox picBox)
 {
     if (Config.CanDrawToPicBox)
     {
         picBox.MShapes.Add(RectGauge);
     }
 }
Beispiel #2
0
 /// <summary>
 /// 画到外部图片框
 /// </summary>
 /// <param name="picBox"></param>
 /// <param name="be"></param>
 private void DrawPicBox(MPicBox picBox, List <BaseEvent> be)
 {
     picBox.objDatas.Clear();
     picBox.MShapes.Clear();
     picBox.MRois.Clear();
     picBox.MOcrs.Clear();
     picBox.MMatchers.Clear();
     picBox.FinderPatterns.Clear();
     picBox.lines.Clear();
     picBox.points.Clear();
     picBox.strs.Clear();
     picBox.Image = null;
     foreach (var item in be)
     {
         if (item.Config.CanDrawToPicBox)
         {
             item.DrawToPicBox(picBox);
         }
     }
     if (picBox.Image != null)
     {
         picBox.ImgAutoSize();
         picBox.Refresh();
     }
 }
Beispiel #3
0
 public override void DrawToPicBox(MPicBox picBox)
 {
     if (Config.CanDrawToPicBox)
     {
         picBox.MOcrs.Add(ocr);
     }
 }
 public override void DrawToPicBox(MPicBox picBox)
 {
     if (Config.CanDrawToPicBox)
     {
         picBox.Image = OutputImg;
     }
 }
Beispiel #5
0
        void picbox_DoubleClick(object sender, EventArgs e)
        {
            MPicBox picbox = sender as MPicBox;

            selectImg         = Convert.ToInt32(picbox.Tag);
            mPicBoxMain.Image = picbox.Image;
            mPicBoxMain.ImgAutoSize();
            mPicBoxMain.Refresh();
        }
Beispiel #6
0
 public override void DrawToPicBox(MPicBox picBox)
 {
     if (Config.CanDrawToPicBox)
     {
         if (objConfig != null && objConfig.UseRoi)
         {
             picBox.MRois.Add(Roi);
         }
         picBox.objDatas.Add(objData);
     }
 }
 public override void DrawToPicBox(MPicBox picBox)
 {
     if (Config.CanDrawToPicBox)
     {
         if (config.IsNormalShape)
         {
             picBox.points.Add(new PointAttribute(new Pen(Color.OrangeRed), P_Intersection));
         }
         else
         {
             P_Intersection    = ToolGroupEdit.GetRotatePoint(new PointF(), P_Intersection, Shape.Angle);
             P_Intersection.X += Shape.CenterX;
             P_Intersection.Y += Shape.CenterY;
             picBox.points.Add(new PointAttribute(new Pen(Color.OrangeRed), P_Intersection));
         }
     }
 }
Beispiel #8
0
 public void Initialize(EImageBW8[] imgs)
 {
     Imgs = imgs;
     if (Imgs != null && Imgs.Length > 0)
     {
         for (int i = 0; i < imgs.Length; i++)
         {
             MPicBox picbox = new MPicBox();
             picbox.Size  = new Size(160, 120);
             picbox.Image = imgs[i];
             picbox.ImgAutoSize();
             picbox.CanPicMove   = false;
             picbox.CanPicWheel  = false;
             picbox.Tag          = i;
             picbox.DoubleClick += picbox_DoubleClick;
             flowLayoutPanel1.Controls.Add(picbox);
         }
     }
 }
Beispiel #9
0
 public override void DrawToPicBox(MPicBox picBox)
 {
     if (Config.CanDrawToPicBox)
     {
         if (matcherConfig.MatchType == 0)
         {
             if (Matcher != null)
             {
                 picBox.MMatchers.Add(Matcher);
             }
         }
         else if (matcherConfig.MatchType == 1)
         {
             if (FinderPatterns != null)
             {
                 picBox.FinderPatterns.Add(FinderPatterns);
             }
         }
     }
 }
Beispiel #10
0
        public override void DrawToPicBox(MPicBox picBox)
        {
            if (Config.CanDrawToPicBox)
            {
                PointF p1 = new PointF(config.P_CenterX, config.P_CenterY);
                p1.X += Shape.CenterX;
                p1.Y += Shape.CenterY;
                p1    = ToolGroupEdit.GetRotatePoint(new PointF(Shape.CenterX, Shape.CenterY), p1, Shape.Angle);
                PointF p2 = P_Intersection;
                p2.X += Shape.CenterX;
                p2.Y += Shape.CenterY;
                p2    = ToolGroupEdit.GetRotatePoint(new PointF(Shape.CenterX, Shape.CenterY), p2, Shape.Angle);
                picBox.lines.Add(new LineAttribute(new Pen(Color.OrangeRed), p1, p2));
                PointF p3 = new PointF((config.P_CenterX + P_Intersection.X) / 2,
                                       (config.P_CenterY + P_Intersection.Y) / 2);
                p3.X += Shape.CenterX;
                p3.Y += Shape.CenterY;
                p3    = ToolGroupEdit.GetRotatePoint(new PointF(Shape.CenterX, Shape.CenterY), p3, Shape.Angle);

                picBox.strs.Add(new StrAttribute(Distance.ToString(), Color.OrangeRed, new Point((int)p3.X, (int)p3.Y)));
            }
        }
Beispiel #11
0
 public override void DrawToPicBox(MPicBox picBox)
 {
     picBox.Image = OutputImg;
 }
Beispiel #12
0
 public abstract void DrawToPicBox(MPicBox picbox);
Beispiel #13
0
 public override void DrawToPicBox(MPicBox picBox)
 {
     if (Config.CanDrawToPicBox)
     {
     }
 }