Ejemplo n.º 1
0
        /// <summary>
        /// Displays the given file (ie. asPathFile) using whatever
        /// application is associated with its filename extension.
        /// </summary>
        private void DisplayFileAsErrors(string asFileAsStream, string asCaption)
        {
            ScrollingText   loErrors = new ScrollingText(asFileAsStream, asCaption);
                            loErrors.Show();

                            if ( null != this.oUI )
                            this.oUI.oOtherWindows.Add(loErrors);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Displays the file cleanup output file.
        /// </summary>
        private void DisplayDeletedFileList()
        {
            if ( moProfile.bValue("-ShowDeletedFileList", false) )
            {
                if ( !this.mbHasNoDeletionGroups )
                {
                    string lsFileAsStream = this.sFileAsStream(this.sDeletedFileListOutputPathFile);

                    if ( null != lsFileAsStream )
                    {
                        ScrollingText   loFileList = new ScrollingText(lsFileAsStream, "Deleted File List");
                                        loFileList.TextBackground = Brushes.LightYellow;
                                        loFileList.TextFontFamily = new FontFamily("Courier New");
                                        loFileList.Show();

                                        if ( null != this.oUI )
                                        this.oUI.oOtherWindows.Add(loFileList);
                    }
                }
                else
                {
                    string lsFileGroup1 = moProfile.sValue("-CleanupSet", "One of many file groups to delete goes here.");

                    this.ShowError(
                              string.Format(@"
Here's what you have configured:

-CleanupSet={0}


Please add at least one '-FilesToDelete=' reference. See 'Help' for examples.

No file cleanup will be done until you update the configuration.
"                           , lsFileGroup1)
                            , "No File Cleanup Sets Defined"
                            );
                }
            }
        }
Ejemplo n.º 3
0
        private void ShowHelp()
        {
            if ( this.bNoPrompts )
                return;

            // If a help window is already open, close it.
            foreach (ScrollingText loWindow in moOtherWindows)
            {
                if ( loWindow.Title.Contains("Help") )
                {
                    loWindow.Close();
                    moOtherWindows.Remove(loWindow);
                    break;
                }
            }

            ScrollingText   loHelp = new ScrollingText(moProfile["-Help"].ToString(), "Backup Help", true);
                            loHelp.TextBackground = Brushes.Khaki;
                            loHelp.Show();

                            moOtherWindows.Add(loHelp);
        }