コード例 #1
0
        private void OkButton_Click(object sender, RoutedEventArgs e)
        {
            xCenter       = HelperClass.ConvertToDouble(xCenterTextBox.Text);
            yCenter       = HelperClass.ConvertToDouble(yCenterTextBox.Text);
            arcRadius     = HelperClass.ConvertToDouble(arcRadiusTextBox.Text);
            startingAngle = HelperClass.ConvertToDouble(startingAngleTextBox.Text);
            endingAngle   = HelperClass.ConvertToDouble(endingAngleTextBox.Text);

            if (pCombobox.Text == "Cen")
            {
                P = 0;
            }
            else if (pCombobox.Text == "Int")
            {
                P = -1;
            }
            else
            {
                P = 1;
            }
            distanceBetweenHits = HelperClass.ConvertToDouble(distanceBetweenHitsTexBox.Text);
            toolSize            = new Size(HelperClass.ConvertToDouble(toolWidthTextBox.Text), HelperClass.ConvertToDouble(toolHeightTextBox.Text));
            tool = HelperClass.GetToolFromComboBox(cmbTool, toolSize);

            curveContour = new CurveContour(xCenter, yCenter, arcRadius, startingAngle, endingAngle, P, distanceBetweenHits, tool, false);

            this.Close();
        }
コード例 #2
0
        private static void AddCurveContour(ref List <Gcode> gcodeList)
        {
            CurveContourView CCV = new CurveContourView();
            CurveContour     CC  = CCV.ShowWindow();

            if (CC != null)
            {
                gcodeList.Add(CC);

                //gcodeList.Insert(0, CC);
            }
        }