예제 #1
0
 public override void Draw()
 {
     Console.ForegroundColor = consoleColor;
     Console.WriteLine("Drawed a " + Color + " line " + Name);
     Console.WriteLine("and the points it go though is ");
     Point1.Output();
     Point2.Output();
     Console.ResetColor();
 }
예제 #2
0
 public override void Output()
 {
     try
     {
         Console.Write("Name: " + Name);
         Console.Write("Color: " + Color);
         Console.WriteLine("Point 1: ");
         Point1.Output();
         Console.WriteLine("Point 2: ");
         Point2.Output();
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
 }
예제 #3
0
 public override void Output()
 {
     try
     {
         Console.WriteLine("Name: " + Name);
         Console.WriteLine("Color: " + Color);
         Console.WriteLine("Point 1: ");
         Point1.Output();
         Console.WriteLine("Point 2: ");
         Point2.Output();
         Console.WriteLine("Length: {0}", Length);
         Console.WriteLine("Area: " + Area);
         Draw();
         Console.Write("The amout of length you want to increase or decrease: ");
         Dl = Convert.ToDouble(Console.ReadLine());
         LengthIncrease(Dl);
         Turn();
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
 }