Beispiel #1
0
        private void btnRemoveScreenshot_Click(object sender, EventArgs e)
        {
            bool carryOn = true;

            if (logsAndShots == null)
            {
                // Ask them to load a log file...
                MessageBox.Show("Please set the directory for log files...", "Please specify destination directory...");
                carryOn = false;
            }

            if (carryOn)
            {
                // What screenshot are we removing? Where from? Where to?
                File.Move(this.currentScreenshotFile, Path.Combine(config.RemovedScreenshotsDirectory, Path.GetFileName(this.currentScreenshotFile)));

                RemoveLineFromDisplayedLog();

                SaveUpdatedLogFile();

                // Update the screenshot count for the current log file...
                logsAndShots = null;
                logsAndShots = new DisplaySync(lblLogName.Text, config.OriginalScreenshotsDirectory);

                LoadScreenshotAndHighlightLogFile();
            }
        }
Beispiel #2
0
        private bool LoadFirstScreenshot()
        {
            bool result = false;

            try
            {
                currentScreenshotIndex = 0;

                logsAndShots = new DisplaySync(lblLogName.Text, config.OriginalScreenshotsDirectory);

                if (logsAndShots != null && logsAndShots.Screenshots.Length > 0)
                {
                    result = LoadScreenshotAndHighlightLogFile();
                }
            }
            catch
            {
                // Signal that we are not set up for screenshot deletion...
                logsAndShots = null;
            }
            return(result);
        }