Exemplo n.º 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;
            }
        }
Exemplo n.º 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);
                }
            }
        }
Exemplo n.º 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();
 }
Exemplo n.º 4
0
 public void InitialedMenuItem(MainMenuEnum menuEnum, System.Action <UIMainMenuItem> clickCallback)
 {
     m_MainMenuEnum  = menuEnum;
     m_ClickCallback = clickCallback;
 }