Пример #1
0
        public ActiveCircle(RichPictureBox richPictureBox, ActiveLaser laser)
        {
            HoleType   = InHoleType.CenterHole;
            this.laser = laser;
            shape      = LaserShape.Line;
            HolesInfo  = new HolesInfo();
            HolesInfo.HolesInfoChangeHandler += Program.EntryForm.HolesInfoChangeHandler;
            IsMouseUp           = false;
            InTheHole           = false;
            this.richPictureBox = richPictureBox;

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

            outterCircleSize = new SizeF(pulseSize + Program.SysConfig.GraphicsPropertiesManager.GetPropertiesByName("Circle").ExclusionSize,
                                         pulseSize + Program.SysConfig.GraphicsPropertiesManager.GetPropertiesByName("Circle").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);
     //}
 }