Beispiel #1
0
        void core_OnFoundFinishedScanForEmptyDirs(object sender, FinishedScanForEmptyDirsEventArgs e)
        {
            // Finished scan

            runtimeWatch.Stop();

            setStatusAndLogMessage(String.Format(RED2.Properties.Resources.found_x_empty_folders, e.EmptyFolderCount, e.FolderCount, runtimeWatch.Elapsed.Minutes, runtimeWatch.Elapsed.Seconds));

            this.btnDelete.Enabled        = (e.EmptyFolderCount > 0);
            this.pbProgressStatus.Style   = ProgressBarStyle.Blocks;
            this.pbProgressStatus.Maximum = e.EmptyFolderCount;
            this.pbProgressStatus.Minimum = 0;
            this.pbProgressStatus.Value   = this.pbProgressStatus.Maximum;
            this.pbProgressStatus.Step    = 5;

            this.btnScan.Enabled    = true;
            this.btnCancel.Enabled  = false;
            this.btnShowLog.Enabled = true;
            UpdateContextMenu(cmStrip, true);

            this.tvFolders.ResumeLayout();
            this.tree.AddRootNode();
            this.tree.EnsureRootNodeIsVisible();

            this.btnScan.Text = RED2.Properties.Resources.btn_scan_again;
        }
        void core_OnFoundFinishedScanForEmptyDirs(object sender, FinishedScanForEmptyDirsEventArgs e)
        {
            // Finished scan

            runtimeWatch.Stop();

            setStatusAndLogMessage(String.Format(RED2.Properties.Resources.found_x_empty_folders, e.EmptyFolderCount, e.FolderCount, runtimeWatch.Elapsed.Minutes, runtimeWatch.Elapsed.Seconds));

            this.btnDelete.Enabled = (e.EmptyFolderCount > 0);
            this.pbProgressStatus.Style = ProgressBarStyle.Blocks;
            this.pbProgressStatus.Maximum = e.EmptyFolderCount;
            this.pbProgressStatus.Minimum = 0;
            this.pbProgressStatus.Value = this.pbProgressStatus.Maximum;
            this.pbProgressStatus.Step = 5;

            this.btnScan.Enabled = true;
            this.btnCancel.Enabled = false;
            this.btnShowLog.Enabled = true;
            this.cmStrip.Enabled = true;

            this.tree.EnsureRootNodeIsVisible();

            this.btnScan.Text = RED2.Properties.Resources.btn_scan_again;
        }