Example #1
0
        private CheckboxReturn[] PrintCheckBoxField(string fieldName, string[] options)
        {
            Console.Write($"\t{fieldName}: ");
            while (Console.ReadKey(true).Key != ConsoleKey.Enter)
            {
            }
            ;
            var checkBoxForRegions = new Checkbox("Виберіть варіанти", true, true, options); //TODO: Як тестувати?
            var selectedRegions    = checkBoxForRegions.Select();

            return(selectedRegions);
        }
Example #2
0
        private async Task Test()
        {
            string[] options = { "first option", "second option", "third option", "fourth option", "fifth option" };

            ////////////////////////////////////////////////////////////
            //// EXAMPLE: SELECT MAX ONE OPTION; SELECTION REQUIRED ////
            ////////////////////////////////////////////////////////////

            // class init
            var c1   = new Checkbox("Select one of the following options", true, true, options);
            var res1 = c1.Select();

            Console.WriteLine(res1);
        }