Beispiel #1
0
        public Settings()
        {
            InitializeComponent();
            this.Loaded += OnLoaded;

            _model = EagleConfigurationModel.Current;
            this.DataContext = _model;
        }
Beispiel #2
0
        public EagleObserver(Dispatcher dispatcher)
        {
            _dispatcher = dispatcher;

            _model = EagleConfigurationModel.Current;
            _watchers = new List<FileSystemWatcher>();
            _messages = new List<string>();
            _lastTimeEmailWasSent = DateTime.MinValue;
        }
Beispiel #3
0
        /// <summary>
        /// Restart observing dirs.
        /// </summary>
        private void Reset()
        {
            //release memory
            foreach (var watcher in _watchers)
            {
                DisableFileWatcherEvents(watcher);
            }

            _watchers.Clear();

            //Refresh the model getting new configuration
            _model = EagleConfigurationModel.Current;
        }