public async Task AddMenuItem(string name, MainControlBase control, string helpLink = null)
        {
            await control.Initialize(this.Window);

            this.menuItems.Add(new MainMenuItem(name, control, helpLink));
            if (this.menuItems.Count == 1)
            {
                this.MenuItemSelected(this.menuItems.First());
            }
        }
Пример #2
0
        public async Task <MainMenuItem> AddMenuItem(string name, MainControlBase control, string helpLink = null)
        {
            await control.Initialize(this.Window);

            MainMenuItem item = new MainMenuItem(name, control, helpLink);

            this.menuItems.Add(item);
            this.allMenuItems.Add(item);
            return(item);
        }
        public async Task AddMenuItem(string name, MainControlBase control, string helpLink = null)
        {
            await control.Initialize(this.Window);

            this.menuItems.Add(new MainMenuItem(name, control, helpLink));
        }