コード例 #1
0
        private void LineBtn_Click(object sender, EventArgs e)
        {
            Input1 lineForm = new Input1();

            lineForm.ShowDialog();
            line.P1 = new Tuple <double, double>(lineForm.getX1(), lineForm.getY1());
            line.P2 = new Tuple <double, double>(lineForm.getX2(), lineForm.getY2());
            double lineProb = DLLFunctions.GetLineProperties(line);

            LineLengthTextBox.Text = lineProb.ToString();
        }
コード例 #2
0
        private void RectangleBtn_Click(object sender, EventArgs e)
        {
            Input1 rectangleForm = new Input1();

            rectangleForm.ShowDialog();
            rectangle.LengthSide = new Tuple <double, double>(rectangleForm.getX1(), rectangleForm.getY1());
            rectangle.WidthSide  = new Tuple <double, double>(rectangleForm.getX2(), rectangleForm.getY2());
            var rectangleProp = DLLFunctions.GetRectangleProperties(rectangle);

            RectangleLengthTextBox.Text = rectangleProp.Item1.ToString();
            RectangleAreaTextBox.Text   = rectangleProp.Item2.ToString();
        }
コード例 #3
0
        private void CircleBtn_Click(object sender, EventArgs e)
        {
            Input2 circleForm = new Input2();

            circleForm.ShowDialog();
            circle.Radius = circleForm.getRadius();
            circle.Center = new Tuple <double, double>(circleForm.getX1(), circleForm.getY1());
            var circleProp = DLLFunctions.GetCircleProperties(circle);

            CircleLengthTextBox.Text = circleProp.Item1.ToString();
            CircleAreaTextBox.Text   = circleProp.Item2.ToString();
        }