mCleaner.Logics.Clam.CommandLogic_Clam.LaunchCleaner C# (CSharp) Method

LaunchCleaner() public method

Scan custom paths
public LaunchCleaner ( bool remove = false, System.Action callback = null ) : void
remove bool
callback System.Action
return void
        public void LaunchCleaner(bool remove = false, Action callback = null)
        {
            if (Settings.Default.ClamWin_ScanLocations.Count != 0)
            {
                this.Clam.ShowClamWinVirusScanner = true;
                CleanerML.Run = false;
                CleanerML.ShowCleanerDescription = false;
                CleanerML.btnCleanNowPreviousState = CleanerML.btnPreviewCleanEnable;
                CleanerML.btnPreviewCleanEnable = false;
                CleanerML.btnCleaningOptionsEnable = false;
                CleanerML.ShowFrontPage = false;
                // get custom paths from settings
                List<string> paths = new List<string>();
                foreach (string path in Settings.Default.ClamWin_ScanLocations)
                {
                    paths.Add(path);
                }

                this.IsRemove = remove;
                LaunchScanner(SEARCH.clamscan_folderfile, string.Join("|", paths.ToArray()), true, remove: remove, callback: callback);
            }
            else
            {
                MessageBox.Show("You do not have folder selected where to scan for a virus.", "mCleaner", MessageBoxButton.OK, MessageBoxImage.Information);
                this.Prefs.ShowWindow = true;
                this.Prefs.SelectedTabIndex = 2;
            }
        }