Esempio n. 1
0
        public override void Dispose()
        {
            base.Dispose();

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

            StopFileSystemWatcher();
        }
Esempio n. 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();
        }
Esempio n. 4
0
        protected override void Initialize()
        {
            base.Initialize();

            ViewModel = CreateViewModel();

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

            UpdateCanContinue();
            UpdateIsPaused();
        }