public CyclesMenu(ICyclesViewController viewFactory, CyclesUserData userData) { this.SubMenuItems = new ObservableCollection <IMenuItem>(); this.SubMenuItems.Add(new MenuItem(Properties.Resources.OpenCyclesTracker, viewFactory.DisplayCyclesTracker, viewFactory.CanDisplayCyclesTracker)); this.SubMenuItems.Add(new CheckableMenuItem(Properties.Resources.CycleNotifications, false, () => userData.AreCycleNotificationsEnabled, userData)); this.SubMenuItems.Add(new MenuItem(Properties.Resources.Configure, () => Commands.OpenCycleSettingsCommand.Execute(null))); }
/// <summary> /// Notifies the module that it has be initialized. /// </summary> public void Initialize() { logger.Debug("Initializing Cycles Module"); this.cyclesController = this.container.GetExportedValue <ICyclesController>(); this.viewController = this.container.GetExportedValue <ICyclesViewController>(); // Register for shutdown Commands.ApplicationShutdownCommand.RegisterCommand(new DelegateCommand(this.Shutdown)); // Get the cycles controller started this.cyclesController.Start(); // Initialize the view controller this.viewController.Initialize(); logger.Debug("Cycles Module initialized"); }