/// <summary> /// Initializes the plugin. /// </summary> public override void InitPlugin() { // Updating application title this.AppManager.SetAppTitle("Rating Server"); // Show footer bar this.FooterBarManager.IsDisplayFooterBar = true; // Writing message at footer bar this.FooterBarManager.SetMessage($"Plugin {this.PluignName} is initializing"); // LeftdownMenuViewModel is main view which hosts other views and supports left-menu as well // You can replace LeftdownMenuViewModel by your view by calling this.AppManager.ShowMainUI(<your view model>); var mainViewModel = SimpleIoC.Get <LeftdownMenuViewModel>(); this.AppManager.ShowMainUI(mainViewModel); // Register menu using for LeftdownMenuViewModel only mainViewModel.RegisterMenu(new MEF.Launcher.Platform.Menu.MenuItemEx { Name = "Setting", ClickAction = () => { // ExampleView will be displayed when user click onto this button <Basic Menu> mainViewModel.ActivateItem(SimpleIoC.Get <SettingViewModel>()); } }); // Writing message at status-bar this.FooterBarManager.SetMessage($"Plugin {this.PluignName} is initialized"); }
/// <summary> /// Initializes the plugin. /// </summary> public override void InitPlugin() { var mainViewModel = SimpleIoC.Get <LeftdownMenuViewModel>(); this.AppManager.ShowMainUI(mainViewModel); this.AppManager.SetAppTitle(this.PluignName); // Register menu mainViewModel.RegisterMenu(new MEF.Launcher.Platform.Menu.MenuItemEx { Name = "IoT Device", ClickAction = () => { mainViewModel.ActivateItem(IoC.Get <IoTViewModel>()); } }); mainViewModel.RegisterMenu(new MEF.Launcher.Platform.Menu.MenuItemEx { Name = "Weighing Scale", ClickAction = () => { mainViewModel.ActivateItem(IoC.Get <WeighingScaleSystemViewModel>()); } }); this.FooterBarManager.SetMessage($"Plugin {this.PluignName} is initialized"); }
/// <summary> /// Initializes the plugin. /// </summary> public override void InitPlugin() { var mainViewModel = SimpleIoC.Get <LeftdownMenuViewModel>(); this.AppManager.ShowMainUI(mainViewModel); // Register menu mainViewModel.RegisterMenu(new MEF.Launcher.Platform.Menu.MenuItemEx { Name = "Basic Menu", ClickAction = () => { mainViewModel.ActivateItem(new ExampleViewModel()); } }); }