Пример #1
0
        public void Initialize(Str.ConsoleNavKeys keys, string[] choices, ConsoleColor selbg, Str.ConsoleVerticalNavStyle sr)
        {
            cns = sr;
            int    sel = 0;
            string ch  = "";

            if (sr == Str.ConsoleVerticalNavStyle.arrows)
            {
                ch = ">";
            }
            else if (sr == Str.ConsoleVerticalNavStyle.bullets)
            {
                ch = "o ";
            }
            else if (sr == Str.ConsoleVerticalNavStyle.space)
            {
                ch = " ";
            }
            else if (sr == Str.ConsoleVerticalNavStyle.dash)
            {
                ch = "-";
            }
            foreach (string choice in choices)
            {
                Console.WriteLine($"{ch} {choice}");
            }
            c   = choices;
            k   = keys;
            bg  = selbg;
            cns = sr;
        }
Пример #2
0
        public void Initialize(Str.ConsoleNavKeys keys, string[] choices, ConsoleColor selbg, Str.ConsoleHorizontalNavStyle chns)
        {
            Console.WriteLine();
            int sel = 0;

            if (chns == ConsoleHorizontalNavStyle.dash)
            {
                bfc = "-";
                afc = "-";
                foreach (string choice in choices)
                {
                    Console.Write($"- {choice} -");
                }
            }
            else if (chns == ConsoleHorizontalNavStyle.space)
            {
                bfc = "  ";
                afc = "  ";
                foreach (string choice in choices)
                {
                    Console.Write($"  {choice}  ");
                }
            }
            c  = choices;
            k  = keys;
            bg = selbg;
        }