Example #1
0
        private void DrawTranArea(ZoomedGraphics zg)
        {
            foreach (var area in this.TranAreas)
            {
                Pen pen = Pens.Green;
                switch ((FormSDKInterface.FormSDKStatus)area.status)
                {
                case FormSDKInterface.FormSDKStatus.FORM_ST_CHAR_GIVEUP:
                    pen = Pens.OrangeRed;
                    break;

                case FormSDKInterface.FormSDKStatus.FORM_ST_OK:
                    pen = Pens.Green;
                    break;

                case FormSDKInterface.FormSDKStatus.FORM_ST_OUTOF_RANGE:
                    pen = Pens.HotPink;
                    break;

                case FormSDKInterface.FormSDKStatus.FORM_ST_TRANS_GIVEUP:
                    pen = Pens.Gray;
                    break;

                default:
                    break;
                }

                zg.DrawRectangle(pen, area.TransRect);

                pen = Pens.Purple;
                zg.DrawRectangle(pen, area.CharRect);
            }
        }
Example #2
0
        public void Draw(ZoomedGraphics zg)
        {
            List <Rectangle> normalRects = this.ToNormalRects();

            if (normalRects.Count > 0)
            {
                zg.DrawRectangles(Pens.Blue, normalRects.ToArray());
            }
            List <Rectangle> selRets = this.ToSelectedRects();

            if (selRets.Count > 0)
            {
                zg.DrawRectangles(Pens.Red, this.ToSelectedRects().ToArray());
            }
        }
Example #3
0
 public void Draw(ZoomedGraphics g)
 {
     if (this.BarcodeImage == null)
     {
         g.DrawRectangle(Pens.Red, this.Rect);
     }
     else
     {
         g.DrawImage(this.BarcodeImage, this.StartPoint);
         if (this.IsSelected)
         {
             g.DrawRectangle(Pens.Red, this.Rect);
         }
     }
 }
Example #4
0
        private void CanvasPicture_Paint(object sender, PaintEventArgs e)
        {
            if (this.Site != null && this.Site.DesignMode)
            {
                return;
            }
            ZoomedGraphics zg = new ZoomedGraphics(e.Graphics, realZoom);

            if (this.ShowFrames && this.Frames != null && this.Frames.Items.Count > 0)
            {
                foreach (BarcodeFrame frame in this.Frames.Items)
                {
                    frame.Draw(zg);
                }
            }
        }
Example #5
0
        private void CanvasPicture_Paint(object sender, PaintEventArgs e)
        {
            if (this.Site != null && this.Site.DesignMode)
            {
                return;
            }
            ZoomedGraphics zg = new ZoomedGraphics(e.Graphics, realZoom);

            if (this.ShowFrames && this.Frames != null && this.Frames.Items.Count > 0)
            {
                this.Frames.Draw(zg);
            }
            if (this.RectCrosses != null)
            {
                DrawRectCross(zg);
            }
            if (this.ShowFrames && this.TranAreas != null)
            {
                DrawTranArea(zg);
            }
        }
Example #6
0
 private void DrawRectCross(ZoomedGraphics zg)
 {
     if (!this.ShowRectCross)
     {
         return;
     }
     if (this.RectCrosses == null)
     {
         return;
     }
     if (this.RectCrosses.Rects.Count > 0)
     {
         zg.DrawRectangles(Pens.Red, this.RectCrosses.Rects.ToArray());
     }
     if (this.RectCrosses.Crosses.Count > 0)
     {
         foreach (Point pt in this.RectCrosses.Crosses)
         {
             zg.DrawLine(Pens.Red, pt.X - 5, pt.Y, pt.X + 5, pt.Y);
             zg.DrawLine(Pens.Red, pt.X, pt.Y - 5, pt.X, pt.Y + 5);
         }
     }
 }