Пример #1
0
 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)));
 }
Пример #2
0
 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)));
 }
Пример #3
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="eventData">The event's details/data</param>
        /// <param name="userData">Event tracker user data</param>
        public WorldBossEventViewModel(WorldBossEvent eventData, EventsUserData userData)
        {
            this.EventModel = eventData;
            this.UserData   = userData;
            this.IsVisible  = true;

            this.State      = EventState.Unknown;
            this.TimerValue = TimeSpan.Zero;
            this.UserData.PropertyChanged += (o, e) => this.RefreshVisibility();
            this.UserData.HiddenEvents.CollectionChanged += (o, e) => this.RefreshVisibility();
        }
Пример #4
0
        /// <summary>
        /// Default Constructor
        /// </summary>
        public MetaEventViewModel(MetaEvent metaEventData, EventsUserData userData)
        {
            this.metaEventData = metaEventData;
            this.UserData      = userData;
            this.IsVisible     = true;

            var currentTime = DateTime.UtcNow.TimeOfDay;

            this.InitializeStagesAndTimers(currentTime);
            this.prevUpdateTimeUtc = currentTime;

            this.UserData.HiddenMetaEvents.CollectionChanged += (o, e) => this.RefreshVisibility();
        }
Пример #5
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="eventData">The event's details/data</param>
        /// <param name="userData">Event tracker user data</param>
        /// <param name="displayedNotificationsCollection">Collection of displayed event notifications</param>
        public EventViewModel(WorldEvent eventData, EventsUserData userData, ICollection <EventViewModel> displayedNotificationsCollection)
        {
            this.EventModel             = eventData;
            this.UserData               = userData;
            this.displayedNotifications = displayedNotificationsCollection;
            this.IsVisible              = true;
            this.IsNotificationShown    = false;
            this.IsRemovingNotification = false;

            this.State      = EventState.Unknown;
            this.TimerValue = TimeSpan.Zero;
            this.UserData.PropertyChanged += (o, e) => this.RefreshVisibility();
            this.UserData.HiddenEvents.CollectionChanged += (o, e) => this.RefreshVisibility();
        }
Пример #6
0
        /// <summary>
        /// Default Constructor
        /// </summary>
        public MetaEventViewModel(MetaEvent metaEventData, EventsUserData userData)
        {
            this.metaEventData = metaEventData;
            this.UserData = userData;
            this.IsVisible = true;

            var currentTime = DateTime.UtcNow.TimeOfDay;
            this.InitializeStagesAndTimers(currentTime);
            this.prevUpdateTimeUtc = currentTime;

            this.UserData.HiddenMetaEvents.CollectionChanged += (o, e) => this.RefreshVisibility();
        }
Пример #7
0
        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.InitializeWorldEvents();

            // Do this on a background thread since it takes awhile
            Task.Factory.StartNew(this.InitializeWorldEventZoneNames);

            logger.Info("Event Tracker Controller initialized");
        }
Пример #8
0
 public EventSettingsViewModel(EventsUserData userData)
 {
     this.UserData = userData;
 }
Пример #9
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="eventData">The event's details/data</param>
        /// <param name="userData">Event tracker user data</param>
        /// <param name="displayedNotificationsCollection">Collection of displayed event notifications</param>
        public EventViewModel(WorldEvent eventData, EventsUserData userData, ICollection<EventViewModel> displayedNotificationsCollection)
        {
            this.EventModel = eventData;
            this.UserData = userData;
            this.displayedNotifications = displayedNotificationsCollection;
            this.IsVisible = true;
            this.IsNotificationShown = false;
            this.IsRemovingNotification = false;

            this.State = EventState.Unknown;
            this.TimerValue = TimeSpan.Zero;
            this.UserData.PropertyChanged += (o, e) => this.RefreshVisibility();
            this.UserData.HiddenEvents.CollectionChanged += (o, e) => this.RefreshVisibility();
        }
Пример #10
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="eventData">The event's details/data</param>
        /// <param name="userData">Event tracker user data</param>
        public WorldBossEventViewModel(WorldBossEvent eventData, EventsUserData userData)
        {
            this.EventModel = eventData;
            this.UserData = userData;
            this.IsVisible = true;

            this.State = EventState.Unknown;
            this.TimerValue = TimeSpan.Zero;
            this.UserData.PropertyChanged += (o, e) => this.RefreshVisibility();
            this.UserData.HiddenEvents.CollectionChanged += (o, e) => this.RefreshVisibility();
        }
Пример #11
0
 public EventSettingsViewModel(EventsUserData userData)
 {
     this.UserData = userData;
 }