<commit_before>﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using GW2PAO.API.Data;
using GW2PAO.Data.UserData;
using GW2PAO.PresentationCore;
using NLog;

namespace GW2PAO.Modules.Events
{
    /// <summary>
    /// User settings for the Events Tracker and Event Notifications
    /// </summary>
    [Serializable]
    public class EventsUserData : UserData<EventsUserData>
    {
        /// <summary>
        /// Default logger
        /// </summary>
        private static Logger logger = LogManager.GetCurrentClassLogger();

        /// <summary>
        /// The default settings filename
        /// </summary>
        public const string Filename = "EventsUserData.xml";

        private bool areInactiveEventsVisible;
        private bool areEventNotificationsEnabled;
        private bool useAdjustedTimeTable;
        private DateTime lastResetDateTime;
        private ObservableCollection<Guid> hiddenEvents = new ObservableCollection<Guid>();
        private ObservableCollection<Guid> eventsWithTreasureObtained = new ObservableCollection<Guid>();

        /// <summary>
        /// True if inactive events are visible, else false
        /// </summary>
        public bool AreInactiveEventsVisible
        {
            get { return this.areInactiveEventsVisible; }
            set { SetProperty(ref this.areInactiveEventsVisible, value); }
        }

        /// <summary>
        /// True if event notifications are enabled, else false
        /// </summary>
        public bool AreEventNotificationsEnabled
        {
            get { return this.areEventNotificationsEnabled; }
            set { SetProperty(ref this.areEventNotificationsEnabled, value); }
        }

        /// <summary>
        /// True if the adjusted time table should be used, else false
        /// </summary>
        public bool UseAdjustedTimeTable
        {
            get { return this.useAdjustedTimeTable; }
            set { SetProperty(ref this.useAdjustedTimeTable, value); }
        }

        /// <summary>
        /// True if the standard time table should be used, else false
        /// </summary>
        [XmlIgnore]
        public bool UseStandardTimeTable
        {
            get { return !this.useAdjustedTimeTable; }
            set { SetProperty(ref this.useAdjustedTimeTable, !value); }
        }
<commit_msg>Fixed issue where selecting a different events time table did not actually trigger an update in the events controller.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using GW2PAO.API.Data;
using GW2PAO.Data.UserData;
using GW2PAO.PresentationCore;
using NLog;

namespace GW2PAO.Modules.Events
{
    /// <summary>
    /// User settings for the Events Tracker and Event Notifications
    /// </summary>
    [Serializable]
    public class EventsUserData : UserData<EventsUserData>
    {
        /// <summary>
        /// Default logger
        /// </summary>
        private static Logger logger = LogManager.GetCurrentClassLogger();

        /// <summary>
        /// The default settings filename
        /// </summary>
        public const string Filename = "EventsUserData.xml";

        private bool areInactiveEventsVisible;
        private bool areEventNotificationsEnabled;
        private bool useAdjustedTimeTable;
        private DateTime lastResetDateTime;
        private ObservableCollection<Guid> hiddenEvents = new ObservableCollection<Guid>();
        private ObservableCollection<Guid> eventsWithTreasureObtained = new ObservableCollection<Guid>();

        /// <summary>
        /// True if inactive events are visible, else false
        /// </summary>
        public bool AreInactiveEventsVisible
        {
            get { return this.areInactiveEventsVisible; }
            set { SetProperty(ref this.areInactiveEventsVisible, value); }
        }

        /// <summary>
        /// True if event notifications are enabled, else false
        /// </summary>
        public bool AreEventNotificationsEnabled
        {
            get { return this.areEventNotificationsEnabled; }
            set { SetProperty(ref this.areEventNotificationsEnabled, value); }
        }

        /// <summary>
        /// True if the adjusted time table should be used, else false
        /// </summary>
        public bool UseAdjustedTimeTable
        {
            get { return this.useAdjustedTimeTable; }
            set { SetProperty(ref this.useAdjustedTimeTable, value); }
        }

        /// <summary>
        /// True if the standard time table should be used, else false
        /// </summary>
        [XmlIgnore]
        public bool UseStandardTimeTable
        {
            get { return !this.UseAdjustedTimeTable; }
            set
            {
                if (this.UseAdjustedTimeTable != !value)
                {
                    this.UseAdjustedTimeTable = !value;
                    this.OnPropertyChanged(() => this.UseStandardTimeTable);
                }
            }
        }

{'fraction_non_alphanumeric': 0.08964623078347843, 'fraction_numerical': 0.0014817558807186516, 'mean_word_length': 2.2181168057210967, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4809174', 'n_tokens_mistral': 1339, 'n_tokens_neox': 1317, 'n_words': 372}