示例#1
0
        public ActiveCircle(ZWPictureBox pictureBox, ActiveLaser laser)
        {
            HoleType   = InHoleType.CenterHole;
            this.laser = laser;
            shape      = LaserShape.Line;
            HolesInfo  = new HolesInfo();
            HolesInfo.HolesInfoChangeHandler += pictureBox.HolesInfoChangeHandler;
            IsMouseUp       = false;
            InTheHole       = false;
            this.pictureBox = pictureBox;

            circleData = new CircleData();
            InitializeGraphicsProperties();
            float pulseSize = SysConfig.GetSysConfig().LaserConfig.PulseSize;

            OutterCircleSize = new SizeF(pulseSize + SysConfig.GetSysConfig().LaserConfig.GraphicsProperties.ExclusionSize,
                                         pulseSize + SysConfig.GetSysConfig().LaserConfig.GraphicsProperties.ExclusionSize);
            InnerCircleSize = new SizeF(pulseSize, pulseSize);
            crossSize       = new Size(38, 38);
            clickCount      = 0;

            innerCircles  = new List <Circle>();
            outterCircles = new List <Circle>();
        }
示例#2
0
 private void DrawConnectLine(Graphics g, Pen pen, Circle startCircle, Circle endCircle, CircleData circleData, bool isArc)
 {
     //if (shape == LaserShape.Arc)
     //{
     //    //draw connect arc
     //    var x = circleData.CenterPt.X - circleData.Radius;
     //    var y = circleData.CenterPt.Y - circleData.Radius;
     //    var width = 2 * circleData.Radius;
     //    var height = 2 * circleData.Radius;
     //    var startAngle = 180 / Math.PI * Math.Atan2(startCircle.CenterPoint.Y - circleData.CenterPt.Y,
     //        startCircle.CenterPoint.X - circleData.CenterPt.X);
     //    var endAngle = 180 / Math.PI * Math.Atan2(endCircle.CenterPoint.Y - circleData.CenterPt.Y,
     //        endCircle.CenterPoint.X - circleData.CenterPt.X);
     //    g.DrawArc(pen, (float)x, (float)y, (float)width, (float)height, (float)startAngle, (float)endAngle);
     //}
     //else if (shape == LaserShape.Line)
     //{
     //    //draw connect Line
     //    g.DrawLine(pen, startCircle.CenterPoint, endCircle.CenterPoint);
     //}
 }