Пример #1
0
        static void Main()
        {
            int selection;

            do
            {
                Console.WriteLine("1. Date Existance");
                Console.WriteLine("2. HTML Replacer");
                Console.WriteLine("3. Email Finder");
                Console.WriteLine("4. Number Validator");
                Console.WriteLine("5. Time Counter");
                Console.WriteLine("0. Exit");
                if (int.TryParse(Console.ReadLine(), out selection))
                {
                    switch (selection)
                    {
                    case 1:
                        DateExistance.dateSearch();
                        break;

                    case 2:
                        HtmlReplacer.htmlReplace();
                        break;

                    case 3:
                        EmailFinder.emailSearch();
                        break;

                    case 4:
                        NumberValidator.Show();
                        break;

                    case 5:
                        TimeCounter.timeCounter();
                        break;
                    }
                }
            } while (selection != 0);
        }
Пример #2
0
        private static void regex()
        {
            while (true)
            {
                Console.Clear();
                Menu();
                if (!int.TryParse(Console.ReadLine(), out int Mode))
                {
                    Console.WriteLine("Incorrect input. Try again:");
                    continue;
                }

                switch (Mode)
                {
                case 1:
                {
                    Console.Clear();
                    DateExistence.reg();
                    Console.WriteLine("Press any key to continue");
                    Console.ReadLine();
                    break;
                }

                case 2:
                {
                    Console.Clear();
                    HtmlReplacer.reg();
                    Console.WriteLine("Press any key to continue");
                    Console.ReadLine();
                    break;
                }

                case 3:
                {
                    Console.Clear();
                    EmailFinder.reg();
                    Console.WriteLine("Press any key to continue");
                    Console.ReadLine();
                    break;
                }

                case 4:
                {
                    Console.Clear();
                    NumberValidator.reg();
                    Console.WriteLine("Press any key to continue");
                    Console.ReadLine();
                    break;
                }

                case 5:
                {
                    Console.Clear();
                    TimeCounter.reg();
                    Console.WriteLine("Press any key to continue");
                    Console.ReadLine();
                    break;
                }

                case 0:
                {
                    return;
                }

                default:
                {
                    Console.WriteLine("Wrong input.");
                    break;
                }
                }

                if (Mode == 0)
                {
                    break;
                }
            }
        }