/// <summary> /// Shows a couple of shapes /// </summary> public static void ViewShapes(Shape[] shapes) { Console.Clear(); Console.BackgroundColor = ConsoleColor.DarkRed; Console.ForegroundColor = ConsoleColor.White; Array.Sort(shapes); if (shapes[0].IsShape3D) { Console.WriteLine("-------------------------------------------------------------------"); Console.WriteLine("Figur Längd Bredd Höjd Mantelarea Begräns.area Volym"); Console.WriteLine("-------------------------------------------------------------------"); } else { Console.WriteLine("--------------------------------------"); Console.WriteLine("Figur Längd Bredd Omkrets Area"); Console.WriteLine("--------------------------------------"); } Console.ResetColor(); foreach (Shape shape in shapes) { Console.WriteLine(shape.ToString("R")); } Console.WriteLine(); }
/// <summary> /// Shows the details of a shape /// </summary> /// <param name="shape"></param> public static void ViewShapeDetail(Shape shape) { ViewHeader("Detaljer"); Console.WriteLine(shape.ToString()); }