private static void ViewShapeDetail(Shape shape) { string[] arraySplittedString; string objectValues; string colon = ":"; Console.BackgroundColor = ConsoleColor.DarkRed; Console.WriteLine(StringsViewMenu.FramOfEquals); Console.WriteLine(StringsViewMenu.OnlyEquals); Console.WriteLine(StringsViewMenu.MiddleFrameDetails); Console.WriteLine(StringsViewMenu.OnlyEquals); Console.WriteLine(StringsViewMenu.FramOfEquals); Console.BackgroundColor = ConsoleColor.Black; objectValues = shape.ToString(); arraySplittedString = objectValues.Split(':'); int i = 0; do { Console.WriteLine(string.Format("{0}{1}{2}", arraySplittedString[i], colon, arraySplittedString[i + 1])); i = i + 2; } while (i < arraySplittedString.Length); Console.WriteLine(); Console.WriteLine(StringsViewMenu.OnlyEquals); Console.WriteLine(); }
/// <summary> /// Shows the details of a single shape /// </summary> /// <param name="shape">The shape to show</param> private static void ViewShapeDetail(Shape shape) { Console.WriteLine(); Console.BackgroundColor = ConsoleColor.DarkRed; Console.ForegroundColor = ConsoleColor.White; Console.WriteLine(Properties.Strings.BoxLine); Console.WriteLine(Extensions.InsertEquals(Extensions.CenterAlignString(Properties.Strings.ViewDetailsHeader, Properties.Strings.BoxLine))); Console.WriteLine(Properties.Strings.BoxLine); Console.ResetColor(); Console.WriteLine(); Console.WriteLine(shape.ToString()); Console.WriteLine(); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine(Properties.Strings.BoxLine); Console.ResetColor(); }
/// <summary> /// Shows the details of a shape /// </summary> /// <param name="shape"></param> public static void ViewShapeDetail(Shape shape) { ViewHeader("Detaljer"); Console.WriteLine(shape.ToString()); }