예제 #1
0
        internal static void PrintHeading(string heading)
        {
            var headingStyle = GlobalViewStyle.Style.HeadingStyle;

            if (string.IsNullOrEmpty(heading))
            {
                return;
            }

            var decorationChar = Convert.ToChar(headingStyle.Decoration.Substring(0, 1));
            var indents        = 3;
            var headingLength  = heading.Length + 2;

            if (headingStyle.DecorationType == HeadingDecoration.Wrapped)
            {
                WriteLine(new string(decorationChar, headingLength + indents));
            }

            if (headingStyle.DecorationType == HeadingDecoration.Wrapped || headingStyle.DecorationType == HeadingDecoration.Indentation)
            {
                WriteLine($"{new string(decorationChar,  indents)} {heading}");
            }
            else
            {
                WriteLine($"{heading}");
            }

            if (headingStyle.DecorationType == HeadingDecoration.Wrapped || headingStyle.DecorationType == HeadingDecoration.Underlined)
            {
                WriteLine(new string(decorationChar, headingLength + indents));
            }

            ConzapTools.SkipLines(headingStyle.SkipLines);
        }
예제 #2
0
        internal static void WritePrompt(string writeLine)
        {
            if (string.IsNullOrEmpty(writeLine))
            {
                return;
            }

            ConzapTools.SkipLines(1);
            WriteLine(writeLine);
            Write(">>> ");
        }
예제 #3
0
 internal static void ClearScreen()
 {
     Console.Clear();
     ConzapTools.SkipLines(GlobalViewStyle.Style.TopPadding);
 }