Exemple #1
0
        static void Main(string[] args)
        {
            var mainMenu = new NavigationMenu()
            {
                Header    = "Main Menu",
                MenuItems = new List <MenuItem>()
                {
                    new MenuItem()
                    {
                        Command      = "A",
                        MenuItemLine = "First Command",
                        MethodToCall = DoAnAction
                    },
                    new MenuItem()
                    {
                        Command      = "B",
                        MenuItemLine = "Second Command",
                        MethodToCall = DoAnAction,
                        SubMenu      = null
                    }
                }
            };

            mainMenu.DoMenu();
        }
Exemple #2
0
        public static void OpenSubMenuOne(string param)
        {
            var subMenu = new NavigationMenu()
            {
                Header    = "Sub Menu",
                MenuItems = new List <MenuItem>()
                {
                    new MenuItem()
                    {
                        Command      = "1",
                        MenuItemLine = "First command in sub",
                        MethodToCall = DoAnAction
                    },
                }
            };

            subMenu.DoMenu();
        }