private void ShowCoordinates(CreateSquare createSquare) { ResultAX.Text = $"{createSquare.GetPointA().X-311d}"; ResultBX.Text = $"{createSquare.GetPointB().X-311d}"; ResultCX.Text = $"{createSquare.GetPointC().X-311d}"; ResultDX.Text = $"{createSquare.GetPointD().X-311d}"; ResultAY.Text = $"{-(createSquare.GetPointA().Y - 240d)}"; ResultBY.Text = $"{-(createSquare.GetPointB().Y - 240d)}"; ResultCY.Text = $"{-(createSquare.GetPointC().Y - 240d)}"; ResultDY.Text = $"{-(createSquare.GetPointD().Y - 240d)}"; }
private void DrawSquare(CreateSquare createSquare) { //First line AB LineA.X1 = createSquare.GetPointA().X; LineA.X2 = createSquare.GetPointB().X; LineA.Y1 = createSquare.GetPointA().Y; LineA.Y2 = createSquare.GetPointB().Y; //Second Line BC LineB.X1 = createSquare.GetPointB().X; LineB.X2 = createSquare.GetPointC().X; LineB.Y1 = createSquare.GetPointB().Y; LineB.Y2 = createSquare.GetPointC().Y; //Third Line CD LineC.X1 = createSquare.GetPointC().X; LineC.X2 = createSquare.GetPointD().X; LineC.Y1 = createSquare.GetPointC().Y; LineC.Y2 = createSquare.GetPointD().Y; //Fourth Line CA LineD.X1 = createSquare.GetPointD().X; LineD.X2 = createSquare.GetPointA().X; LineD.Y1 = createSquare.GetPointD().Y; LineD.Y2 = createSquare.GetPointA().Y; }