private void DLL3Method() { DLLExamination.Point point = new DLLExamination.Point (Convert.ToInt32(dll3PointX.Text), Convert.ToInt32(dll3PointY.Text), drawPanel.Size.Height); Square square = new Square(Convert.ToInt32(dll3SquareX.Text), Convert.ToInt32(dll3SquareY.Text), Convert.ToInt32(dll3Lenght.Text), drawPanel.Size.Height); square.DrawOnPanel(drawPanel, greenBrush); point.DrawOnPanel(drawPanel, blueBrush); if (square.IsPointOnTheSquare(Convert.ToInt32(dll3PointX.Text), Convert.ToInt32(dll3PointY.Text))) { dll3result.Text = "В квадрате"; } else { dll3result.Text = "За квадратом"; } }
private void DLL7Method() { DLLExamination.Point point = new DLLExamination.Point (Convert.ToInt32(dll7PoX.Text), Convert.ToInt32(dll7PoY.Text), drawPanel.Size.Height); DLLExamination.Tetragon tetragon = new DLLExamination.Tetragon(DLL7GeneratePointsArray(), drawPanel.Size.Height); tetragon.DrawOnPanel(drawPanel, greenBrush); point.DrawOnPanel(drawPanel, blueBrush); if (tetragon.IsPointOnTheTetragon(Convert.ToInt32(dll7PoX.Text), Convert.ToInt32(dll7PoY.Text))) { dll7Result.Text = "В тетрагоне"; } else { dll7Result.Text = "За тетрагоном"; } }
private void DLL6Method() { DLLExamination.Point point = new DLLExamination.Point (Convert.ToInt32(dll6PoX.Text), Convert.ToInt32(dll6PoY.Text), drawPanel.Size.Height); DLLExamination.Rhomb rhomb = new DLLExamination.Rhomb(Convert.ToInt32(dll6RomX1.Text), Convert.ToInt32(dll6RomY1.Text), Convert.ToInt32(dll6Len.Text), Convert.ToInt32(dll6Wid.Text), drawPanel.Size.Height); rhomb.DrawOnPanel(drawPanel, greenBrush); point.DrawOnPanel(drawPanel, blueBrush); if (rhomb.IsPointOnTheRhomb(Convert.ToInt32(dll6PoX.Text), Convert.ToInt32(dll6PoY.Text))) { dll6Result.Text = "В ромбе"; } else { dll6Result.Text = "За ромбом"; } }
private void DLL8Method() { DLLExamination.Point point = new DLLExamination.Point (Convert.ToInt32(dll8PoX.Text), Convert.ToInt32(dll8PoY.Text), drawPanel.Size.Height); DLLExamination.Triangle triangle = new DLLExamination.Triangle(Convert.ToInt32(dll8TriX1.Text), Convert.ToInt32(dll8TriY1.Text), Convert.ToInt32(dll8TriX2.Text), Convert.ToInt32(dll8TriY2.Text), Convert.ToInt32(dll8TriX3.Text), Convert.ToInt32(dll8TriY3.Text), drawPanel.Size.Height); triangle.DrawOnPanel(drawPanel, greenBrush); point.DrawOnPanel(drawPanel, blueBrush); if (triangle.IsPointOnTheTriangle(Convert.ToInt32(dll8PoX.Text), Convert.ToInt32(dll8PoY.Text))) { dll8Result.Text = "В треугольнике"; } else { dll8Result.Text = "За треугольником"; } }
private void DLL5Method() { DLLExamination.Point point = new DLLExamination.Point (Convert.ToInt32(dll5PoX.Text), Convert.ToInt32(dll5PoY.Text), drawPanel.Size.Height); DLLExamination.Rectangle rect = new DLLExamination.Rectangle(Convert.ToInt32(dll5RectangleX1.Text), Convert.ToInt32(dll5RectangleY1.Text), Convert.ToInt32(dll5Lenght.Text), Convert.ToInt32(dll5Width.Text), drawPanel.Size.Height); rect.DrawOnPanel(drawPanel, greenBrush); point.DrawOnPanel(drawPanel, blueBrush); if (rect.IsPointOnTheRectangle(Convert.ToInt32(dll5PoX.Text), Convert.ToInt32(dll5PoY.Text))) { dll5Result.Text = "В прямоугольнике"; } else { dll5Result.Text = "За прямоугольником"; } }
private void DLL4Method() { DLLExamination.Point point = new DLLExamination.Point (Convert.ToInt32(dll4PoX.Text), Convert.ToInt32(dll4PoY.Text), drawPanel.Size.Height); DLLExamination.Circle circle = new DLLExamination.Circle(Convert.ToInt32(dll4RadX.Text), Convert.ToInt32(dll4RadY.Text), Convert.ToInt32(dll4Radius.Text), drawPanel.Size.Height); circle.DrawOnPanel(drawPanel, greenBrush); point.DrawOnPanel(drawPanel, blueBrush); if (circle.IsPointOnTheCircle(Convert.ToInt32(dll4PoX.Text), Convert.ToInt32(dll4PoY.Text))) { dll4Result.Text = "В окружности"; } else { dll4Result.Text = "За окружностью"; } }
private void DLL2Method() { Line line = new Line(Convert.ToInt32(dll2LineX1.Text), Convert.ToInt32(dll2LineY1.Text) , Convert.ToInt32(dll2LineX2.Text), Convert.ToInt32(dll2LineY2.Text) , drawPanel.Size.Height); DLLExamination.Point point = new DLLExamination.Point (Convert.ToInt32(dll2PointX.Text), Convert.ToInt32(dll2PointY.Text), drawPanel.Size.Height); line.DrawOnPanel(drawPanel, redPen); point.DrawOnPanel(drawPanel, greenBrush); if (line.IsPointOnTheLine(Convert.ToInt32(dll2PointX.Text), Convert.ToInt32(dll2PointY.Text))) { dll2Result.Text = "На линии"; } else { dll2Result.Text = "Не в линии"; } }