Beispiel #1
0
        private void callSwitch(MainMenuEnum input)
        {
            switch (input)
            {
            case MainMenuEnum.kreiraj:
                create();
                break;

            case MainMenuEnum.pretrazi:
                search();
                break;

            case MainMenuEnum.ispravi:
                update();
                break;

            case MainMenuEnum.izbrisi:
                delete();
                break;

            case MainMenuEnum.pomoc:
                help();
                break;

            case MainMenuEnum.napusti:
                _finishedBool = true;
                break;

            default:
                Console.Clear();
                Console.WriteLine("Odaberite validnu opciju!");
                break;
            }
        }
Beispiel #2
0
        public void Show()
        {
            while (true)
            {
                MainMenuEnum choice = RenderMenu();

                try
                {
                    switch (choice)
                    {
                    case MainMenuEnum.Select:
                    {
                        ListAll();
                        break;
                    }

                    case MainMenuEnum.View:
                    {
                        View();
                        break;
                    }

                    case MainMenuEnum.Add:
                    {
                        Add();
                        break;
                    }

                    case MainMenuEnum.Tasks:
                    {
                        Tasks();
                        break;
                    }

                    case MainMenuEnum.Edit:
                    {
                        Edit();
                        break;
                    }

                    case MainMenuEnum.Delete:
                    {
                        Delete();
                        break;
                    }

                    case MainMenuEnum.Exit:
                    {
                        return;
                    }
                    }
                }
                catch (Exception ex)
                {
                    Console.Clear();
                    Console.WriteLine(ex.Message);
                    Console.ReadKey(true);
                }
            }
        }
Beispiel #3
0
 public void NavigateToMenuItem(MainMenuEnum menuItem)
 {
     _linkMenuItem = new Link(
         By.XPath(string.Format(TemplateMenuLocator, menuItem.GetStringMapping())),
         "Link main side menu item:" + menuItem.GetStringMapping());
     _linkMenuItem.Click();
 }
 public void InitialedMenuItem(MainMenuEnum menuEnum, System.Action <UIMainMenuItem> clickCallback)
 {
     m_MainMenuEnum  = menuEnum;
     m_ClickCallback = clickCallback;
 }