Esempio n. 1
0
        /// <summary>
        /// Handle Play button to start processing changes in the watched folders list.
        /// </summary>
        private void buttonPlayPause_Click(object sender, EventArgs e)
        {
            // currently not watching for changes

            if (fileWatchEngine.WatchState == WatchState.Suspended)
            {
                this.buttonPlayPause.Image = global::RmsFileWatcher.Properties.Resources.Pause;
                fileWatchEngine.StartWatching();
                timerProcessChanges.Enabled = true;
            }

            // currently watching for changes

            else
            {
                this.buttonPlayPause.Image = global::RmsFileWatcher.Properties.Resources.Play;
                fileWatchEngine.SuspendWatching();
                timerProcessChanges.Enabled = false;
            }
        }