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()); } }
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 MainMenuItem(string name, MainControlBase control, string helpLink = null) { this.Name = name; this.Control = control; this.HelpLink = helpLink; }
public async Task AddMenuItem(string name, MainControlBase control, string helpLink = null) { await control.Initialize(this.Window); this.menuItems.Add(new MainMenuItem(name, control, helpLink)); }