public CommerceMenu(ICommerceViewController viewFactory, CommerceUserData userData) { logger.Debug("Initializing menu items"); this.SubMenuItems = new ObservableCollection<IMenuItem>(); // Build up the sub menu items this.SubMenuItems.Add(new MenuItem(Properties.Resources.Configure, () => Commands.OpenCommerceSettingsCommand.Execute(null))); this.SubMenuItems.Add(new MenuItem(Properties.Resources.PriceTracker, viewFactory.DisplayPriceTracker, viewFactory.CanDisplayPriceTracker)); this.SubMenuItems.Add(null); // Null for a seperator this.SubMenuItems.Add(new CheckableMenuItem(Properties.Resources.BuyOrderPriceNotifications, true, () => userData.AreBuyOrderPriceNotificationsEnabled, userData)); this.SubMenuItems.Add(new CheckableMenuItem(Properties.Resources.SellListingPriceNotifications, true, () => userData.AreSellListingPriceNotificationsEnabled, userData)); this.SubMenuItems.Add(null); // Null for a seperator this.SubMenuItems.Add(new MenuItem(Properties.Resources.TPCalculator, viewFactory.DisplayTPCalculator, viewFactory.CanDisplayTPCalculator)); }
public CommerceMenu(ICommerceViewController viewFactory, CommerceUserData userData) { logger.Debug("Initializing menu items"); this.SubMenuItems = new ObservableCollection <IMenuItem>(); // Build up the sub menu items this.SubMenuItems.Add(new MenuItem(Properties.Resources.PriceTracker, viewFactory.DisplayPriceTracker, viewFactory.CanDisplayPriceTracker)); this.SubMenuItems.Add(null); // Null for a seperator this.SubMenuItems.Add(new MenuItem(Properties.Resources.TPCalculator, viewFactory.DisplayTPCalculator, viewFactory.CanDisplayTPCalculator)); this.SubMenuItems.Add(new MenuItem(Properties.Resources.EctoSalvageHelper, viewFactory.DisplayEctoSalvageTracker, viewFactory.CanDisplayEctoSalvageTracker)); this.SubMenuItems.Add(null); // Null for a seperator this.SubMenuItems.Add(new CheckableMenuItem(Properties.Resources.BuyOrderPriceNotifications, true, () => userData.AreBuyOrderPriceNotificationsEnabled, userData)); this.SubMenuItems.Add(new CheckableMenuItem(Properties.Resources.SellListingPriceNotifications, true, () => userData.AreSellListingPriceNotificationsEnabled, userData)); this.SubMenuItems.Add(new MenuItem(Properties.Resources.Configure, () => Commands.OpenCommerceSettingsCommand.Execute(null))); }
/// <summary> /// Notifies the module that it has be initialized. /// </summary> public void Initialize() { logger.Debug("Initializing Commerce Module"); this.commerceController = this.container.GetExportedValue <ICommerceController>(); this.viewController = this.container.GetExportedValue <ICommerceViewController>(); // Register for shutdown Commands.ApplicationShutdownCommand.RegisterCommand(new DelegateCommand(this.Shutdown)); // Get the commerce controller started this.commerceController.Start(); // Initialize the view controller this.viewController.Initialize(); logger.Debug("Commerce Module initialized"); }
/// <summary> /// Notifies the module that it has be initialized. /// </summary> public void Initialize() { logger.Debug("Initializing Commerce Module"); this.commerceController = this.container.GetExportedValue<ICommerceController>(); this.viewController = this.container.GetExportedValue<ICommerceViewController>(); // Register for shutdown Commands.ApplicationShutdownCommand.RegisterCommand(new DelegateCommand(this.Shutdown)); // Get the commerce controller started this.commerceController.Start(); // Initialize the view controller this.viewController.Initialize(); logger.Debug("Commerce Module initialized"); }
public CommerceSettingsViewModel(ICommerceViewController viewController, CommerceUserData userData, MonitoredItemsConfigViewModel monitoredItemsConfigViewModel) { this.UserData = userData; this.MonitoredItemsConfigViewModel = monitoredItemsConfigViewModel; this.RebuildNamesDatabaseCommand = new DelegateCommand(viewController.DisplayRebuildItemNamesView, viewController.CanDisplayRebuildItemNamesView); }