public EventsController(IEventsService eventsService, IZoneService zoneService, IPlayerService playerService, EventsUserData userData) { logger.Debug("Initializing Event Tracker Controller"); this.eventsService = eventsService; this.zoneService = zoneService; this.playerService = playerService; this.isStopped = false; this.userData = userData; // Initialize the refresh timer this.eventRefreshTimer = new Timer(this.RefreshEvents); this.EventRefreshInterval = 1000; // Initialize the start call count to 0 this.startCallCount = 0; // Set up handling of the event settings UseAdjustedTable property changed so that we can load the correct table when it changes this.UserData.PropertyChanged += UserData_PropertyChanged; // Initialize the WorldEvents collection this.InitializeEvents(); this.InitializeEventZoneNames(); this.InitializeNotifications(); logger.Info("Event Tracker Controller initialized"); }
public EventsMenu(IEventsViewController viewFactory, EventsUserData userData) { this.SubMenuItems = new ObservableCollection <IMenuItem>(); this.SubMenuItems.Add(new MenuItem(Properties.Resources.OpenEventsTracker, viewFactory.DisplayEventsTracker, viewFactory.CanDisplayEventsTracker)); this.SubMenuItems.Add(new CheckableMenuItem(Properties.Resources.EventNotifications, false, () => userData.AreEventNotificationsEnabled, userData)); this.SubMenuItems.Add(new MenuItem(Properties.Resources.Configure, () => Commands.OpenEventSettingsCommand.Execute(null))); }
public EventsMenu(IEventsViewController viewFactory, EventsUserData userData) { this.SubMenuItems = new ObservableCollection <IMenuItem>(); this.SubMenuItems.Add(new MenuItem(Properties.Resources.OpenWorldBossTimers, viewFactory.DisplayWorldBossTimers, viewFactory.CanDisplayWorldBossTimers)); this.SubMenuItems.Add(new MenuItem(Properties.Resources.OpenMetaEventTimers, viewFactory.DisplayMetaEventTimers, viewFactory.CanDisplayMetaEventTimers)); this.SubMenuItems.Add(null); // Null for a seperator this.SubMenuItems.Add(new CheckableMenuItem(Properties.Resources.EventNotifications, false, () => userData.AreEventNotificationsEnabled, userData)); this.SubMenuItems.Add(new MenuItem(Properties.Resources.Configure, () => Commands.OpenEventSettingsCommand.Execute(null))); }
/// <summary> /// Performs all neccesary shutdown activities for this module /// </summary> private void Shutdown() { logger.Debug("Shutting down Events Module"); // Shut down the commerce controller this.eventsController.Shutdown(); // Shutdown the view controller this.viewController.Shutdown(); // Make sure we have saved all user data // Note that this is a little redundant given the AutoSave feature, // but it does help to make sure the user's data is really saved EventsUserData.SaveData(this.UserData, EventsUserData.Filename); }