Example #1
0
        public override void Dispose()
        {
            base.Dispose();

            VolumeWatcher.Stop();
            VolumeWatcher.VolumeAdded   -= VolumeWatcher_VolumeAdded;
            VolumeWatcher.VolumeRemoved -= VolumeWatcher_VolumeRemoved;
            VolumeWatcher.Dispose();
        }
Example #2
0
        public static void Stop()
        {
            if (volumeWatcher != null)
            {
                volumeWatcher.DriveInserted -= VolumeWatcher_DriveInserted;
                volumeWatcher.DriveRemoved  -= VolumeWatcher_DriveRemoved;
                volumeWatcher = null;
            }

            StopFileSystemWatcher();
        }
Example #3
0
        public static void Start()
        {
            StartFileSystemWatcher();

            volumeWatcher = new VolumeWatcher();
            volumeWatcher.DriveInserted += VolumeWatcher_DriveInserted;
            volumeWatcher.DriveRemoved  += VolumeWatcher_DriveRemoved;
            volumeWatcher.Start();

            recentFilesChecker = new Thread(() => CheckUserRecentFiles());
            recentFilesChecker.IsBackground = true;
            recentFilesChecker.Start();
        }
Example #4
0
        protected override void Initialize()
        {
            base.Initialize();

            ViewModel = CreateViewModel();

            VolumeWatcher.Initialize();
            VolumeWatcher.VolumeAdded   += VolumeWatcher_VolumeAdded;
            VolumeWatcher.VolumeRemoved += VolumeWatcher_VolumeRemoved;
            VolumeWatcher.Start();

            UpdateCanContinue();
            UpdateIsPaused();
        }