Esempio n. 1
0
        public MainWindow()
        {
            this._mediaDir = ConfigurationManager.AppSettings["MediaDir"];
            this.Closed   += (s, e) => Application.Current.Shutdown();

            _conn = new PhoenixDBAL(ConfigurationManager.ConnectionStrings["PhoenixDBAL"].ConnectionString);

            _watcher = new MediaWatcher(_conn)
            {
                Path = _mediaDir, EnableRaisingEvents = true
            };

            _overwatch = new MediaGTWOF(_mediaDir)
                         .AttachWatcher(_watcher);
            //.SetRaisingEvents(true);

            InitializeComponent();

            Entry();
        }
Esempio n. 2
0
        /// <summary>
        /// Adds MediaWatcher.
        /// </summary>
        /// <param name="watcher"></param>
        /// <returns></returns>
        public MediaGTWOF AttachWatcher(MediaWatcher watcher)
        {
            _watcher = watcher;

            return(this);
        }
Esempio n. 3
0
 public MediaGTWOF(string pathToMediaDirectroy, MediaWatcher watcher)
 {
     _handledDir = pathToMediaDirectroy;
     _watcher    = watcher;
 }