Ejemplo n.º 1
0
        public void ExecuteDeleteCommand(Model_ThingsToDelete ttd, BackgroundWorker bgWorker, Queue<Model_ThingsToDelete> TTD, bool preview = false)
        {
            if (preview)
            {
                FileInfo fi = new FileInfo(ttd.FullPathName);
                if (fi.Exists)
                {
                    string text = string.Format("{0} {1} {2}", "Delete", Win32API.FormatByteSize(fi.Length), ttd.FullPathName);

                    UpdateProgressLog(text, text);
                }
            }
            else
            {
                // next we need to know if the file exists so we can delete it.
                FileInfo fi = new FileInfo(ttd.FullPathName);
                if (fi.Exists)
                {
                    try
                    {
                        string text = string.Format("{0} {1} {2}", "Delete", Win32API.FormatByteSize(fi.Length), ttd.FullPathName);
                        // then report to the gui
                        bgWorker.ReportProgress(-1, text);

                        // then we delete it.
                        FileOperations.Delete(fi.FullName);

                        //text = string.Format(" - DELETED");

                        //// then report to the gui
                        //bgWorker.ReportProgress(-1, text);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine("ERROR while deleting a file: " + ex.Message);
                    }
                }

                // delete directories as well if search parameter is walk.all
                if (ttd.search == SEARCH.walk_all)
                {
                    if (TTD.Count == 0)
                    {
                        DirectoryInfo di = new DirectoryInfo(ttd.path);
                        if (di.Exists)
                        {
                            FileOperations.I.DeleteEmptyDirectories(ttd.path, (a) =>
                            {
                                //string text = string.Format("Delete 0 {0} - DELETED", a);
                                string text = string.Format("Delete 0 {0}", a);
                                // then report to the gui
                                bgWorker.ReportProgress(-1, text);
                            });
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Enqueque THINGS_TO_DELETE model
        /// </summary>
        /// <param name="ttd"></param>
        public void EnqueTTD(Model_ThingsToDelete ttd)
        {
            var a = from b in this.TTD
                    where b.FullPathName == ttd.FullPathName
                    select b;

            if (a.Count() == 0)
            {
                this.TTD.Enqueue(ttd);

                this.TotalWork = this.TTD.Count;

                if (ttd.WhatKind == THINGS_TO_DELETE.file)
                {
                    if (
                        ttd.command == COMMANDS.sqlite_vacuum || 
                        ttd.command == COMMANDS.ini ||
                        ttd.command == COMMANDS.json ||
                        ttd.command == COMMANDS.chrome_autofill ||
                        ttd.command == COMMANDS.chrome_database_db ||
                        ttd.command == COMMANDS.chrome_favicons ||
                        ttd.command == COMMANDS.chrome_history ||
                        ttd.command == COMMANDS.chrome_keywords
                        )
                    {
                        this.TotalSpecialOperations++;
                    }
                    else
                    {
                        FileInfo fi = new FileInfo(ttd.FullPathName);
                        if (fi.Exists)
                        {
                            this.TotalFileSize += fi.Length;
                            this.TotalFileDelete++;
                        }
                    }
                }
                else if (
                            ttd.WhatKind == THINGS_TO_DELETE.registry_key ||
                            ttd.WhatKind == THINGS_TO_DELETE.registry_name ||
                            ttd.WhatKind == THINGS_TO_DELETE.clamwin ||
                            ttd.WhatKind == THINGS_TO_DELETE.system
                        )
                {
                    this.TotalSpecialOperations++;
                }
            }
        }
Ejemplo n.º 3
0
        async Task<bool> ExecuteLittleRegistryCleanerCommand(Model_ThingsToDelete ttd, bool preview = false)
        {
            string text = "{0} {1}";

            List<ScannerBase.InvalidKeys> BadKeys = new List<ScannerBase.InvalidKeys>();
            switch (ttd.search)
            {
                case SEARCH.lrc_activex_com:
                    await ActiveXComObjects.I.Clean(preview);
                    BadKeys.AddRange(ActiveXComObjects.I.BadKeys);

                    break;
                case SEARCH.lrc_app_info:
                    await ApplicationInfo.I.Clean(preview);
                    BadKeys.AddRange(ApplicationInfo.I.BadKeys);

                    break;
                case SEARCH.lrc_progam_location:
                    await ApplicationPaths.I.Clean(preview);
                    BadKeys.AddRange(ApplicationPaths.I.BadKeys);

                    break;
                case SEARCH.lrc_software_settings:
                    await ApplicationSettings.I.Clean(preview);
                    BadKeys.AddRange(ApplicationSettings.I.BadKeys);

                    break;
                case SEARCH.lrc_startup:
                    await StartupFiles.I.Clean(preview);
                    BadKeys.AddRange(StartupFiles.I.BadKeys);

                    break;
                case SEARCH.lrc_system_drivers:
                    await SystemDrivers.I.Clean(preview);
                    BadKeys.AddRange(SystemDrivers.I.BadKeys);

                    break;
                case SEARCH.lrc_shared_dll:
                    await SharedDLLs.I.Clean(preview);
                    BadKeys.AddRange(SharedDLLs.I.BadKeys);

                    break;
                case SEARCH.lrc_help_file:
                    await WindowsHelpFiles.I.Clean(preview);
                    BadKeys.AddRange(WindowsHelpFiles.I.BadKeys);

                    break;
                case SEARCH.lrc_sound_event:
                    await WindowsSounds.I.Clean(preview);
                    BadKeys.AddRange(WindowsSounds.I.BadKeys);

                    break;
                case SEARCH.lrc_history_list:
                    await RecentDocs.I.Clean(preview);
                    BadKeys.AddRange(RecentDocs.I.BadKeys);

                    break;
                case SEARCH.lrc_win_fonts:
                    await WindowsFonts.I.Clean(preview);
                    BadKeys.AddRange(WindowsFonts.I.BadKeys);

                    break;
            }

            foreach (ScannerBase.InvalidKeys badkey in BadKeys)
            {
                string log = string.Empty;

                string root = badkey.Root.OpenSubKey(badkey.Subkey).ToString();

                log = string.Format(text, "Clean", root + (badkey.Key != string.Empty ? "\\" + badkey.Key : string.Empty) + ", " + badkey.Name);
                //PreviewLog += log + "\r\n";

                if (preview)
                {
                    UpdateProgressLog(log, log, false);
                }
                else
                {
                    bgWorker.ReportProgress(-1, log);
                }

                this.TotalSpecialOperations++;
            }

            return true;
        }
Ejemplo n.º 4
0
        void ExecuteClamWinCommand(Model_ThingsToDelete ttd, bool preview = false)
        {
            string text = "Clean {0} {1}";

            if (preview)
            {
                if (ttd.search == SEARCH.clamscan_file)
                {
                    FileInfo fi = new FileInfo(ttd.FullPathName);
                    if (fi.Exists)
                    {
                        string log = string.Format(text, Win32API.FormatByteSize(fi.Length), fi.FullName);
                        //PreviewLog += log + "\r\n";
                        UpdateProgressLog(log, log);

                    }
                }
                else if(ttd.search == SEARCH.clamscan_folder_recurse || ttd.search == SEARCH.clamscan_folder) 
                {
                    if (Directory.Exists(ttd.FullPathName))
                    {
                        string log = string.Format(text, "", ttd.FullPathName);
                        //PreviewLog += log + "\r\n";
                        UpdateProgressLog(log, log);
                    }
                }
            }
            else
            {
                if (ttd.search == SEARCH.clamscan_file)
                {
                    FileInfo fi = new FileInfo(ttd.FullPathName);
                    string log = string.Format(text, Win32API.FormatByteSize(fi.Length), fi.FullName);
                    bgWorker.ReportProgress(-1, log);

                    CommandLogic_Clam.I.LaunchScanner(ttd.search, ttd.FullPathName);

                    log = " - CLEANED";
                    bgWorker.ReportProgress(-1, log);
                }
                else if (ttd.search == SEARCH.clamscan_folder_recurse || ttd.search == SEARCH.clamscan_folder)
                {
                    string log = string.Format(text, "", ttd.FullPathName);
                    bgWorker.ReportProgress(-1, log);

                    CommandLogic_Clam.I.LaunchScanner(ttd.search, ttd.FullPathName, regex: ttd.regex);

                    log = " - CLEANED";
                    bgWorker.ReportProgress(-1, log);
                }
            }
        }
Ejemplo n.º 5
0
        void ExecuteChromeCommand(Model_ThingsToDelete ttd, bool preview = false)
        {
            string ret = string.Empty;

            string text = "Clean file {0} {1}";

            if (preview)
            {
                FileInfo fi = new FileInfo(ttd.FullPathName);
                if (fi.Exists)
                {
                    string log = string.Format(text, Win32API.FormatByteSize(fi.Length), fi.FullName);
                    //PreviewLog += log + "\r\n";
                    UpdateProgressLog(log, text);
                }
            }
            else
            {
                string log = string.Empty;
                log = string.Format(text, string.Empty, ttd.FullPathName);
                bgWorker.ReportProgress(-1, log);

                switch (ttd.command)
                {
                    case COMMANDS.chrome_autofill:
                        ProgressWorker.I.EnQ("Cleaning Chrome Autofill");
                        ret = CommandLogic_Chrome.CleanAutofill(ttd.FullPathName);
                        break;
                    case COMMANDS.chrome_database_db:
                        ProgressWorker.I.EnQ("Cleaning Chrome Database.db");
                        ret = CommandLogic_Chrome.CleanDatabases(ttd.FullPathName);
                        break;
                    case COMMANDS.chrome_favicons:
                        ProgressWorker.I.EnQ("Cleaning Chrome Favicons");
                        ret = CommandLogic_Chrome.CleanFavIcons(ttd.FullPathName);
                        break;
                    case COMMANDS.chrome_history:
                        ProgressWorker.I.EnQ("Cleaning Chrome History");
                        ret = CommandLogic_Chrome.CleanHistory(ttd.FullPathName);
                        break;
                    case COMMANDS.chrome_keywords:
                        ProgressWorker.I.EnQ("Cleaning Chrome Keywords");
                        ret = CommandLogic_Chrome.CleanKeywords(ttd.FullPathName);
                        break;
                }

                if (ret != string.Empty)
                {
                    log = string.Format(" - Not cleaned due to error\r\n\t{0}", ret);
                    bgWorker.ReportProgress(-1, log);
                }
                else
                {
                    bgWorker.ReportProgress(-1, " - Cleaned");
                }
            }
        }
Ejemplo n.º 6
0
        void ExecuteJSONCommand(Model_ThingsToDelete ttd, bool preview = false)
        {
            string text = "Remove JSON entries in \"{0}\" from \"{1}\"";
            string[] add = ttd.address.Split('/');

            if (preview)
            {   
                string log = string.Format(text, add[add.Length - 1], ttd.FullPathName);
                //PreviewLog += log + "\r\n";

                UpdateProgressLog(log, text);
            }
            else
            {
                string log = string.Empty;
                string json = JSON.OpenJSONFiel(ttd.FullPathName);
                bool isfound = JSON.isAddressFound(json, ttd.address);
                if (isfound)
                {
                    log = string.Format(text, add[add.Length - 1], ttd.FullPathName);
                    bgWorker.ReportProgress(-1, log);

                    json = JSON.RemoveElementFromAddress(json, ttd.address);
                    using (StreamWriter writer = new StreamWriter(ttd.FullPathName))
                    {
                        writer.Write(json);
                    }

                    log = " - CLEANED";
                    bgWorker.ReportProgress(-1, log);
                }
            }
        }
Ejemplo n.º 7
0
        void ExecuteIniCommand(Model_ThingsToDelete ttd, bool preview = false)
        {
            string text = "Delete \"{0}\" from \"{1}\" secion in \"{2}\"";

            string val = string.Empty;

            if (ttd.key != null)
            {
                string log = string.Empty;
                val = Win32API.IniHelper.GetValue(ttd.path, ttd.section, ttd.key);
                log = string.Format(text, ttd.key, ttd.section, ttd.path);

                if (!preview)
                {
                    Win32API.IniHelper.SetValue(ttd.path, ttd.section, ttd.key, string.Empty);
                    bgWorker.ReportProgress(-1, log);
                }
                else
                {
                    //PreviewLog += log + "\r\n";
                    UpdateProgressLog(log, log);
                }
            }
            else
            {
                // key is empty, so we need to enumerate keys from the secion
                List<string> keys = new List<string>(Win32API.IniHelper.GetKeyNames(ttd.section, ttd.path));
                //string[] keys = ini.GetKeyNames(ttd.section);
                foreach (string key in keys)
                {
                    string log = string.Empty;
                    val = Win32API.IniHelper.GetValue(ttd.path, ttd.section, ttd.key);
                    log = string.Format(text, key, ttd.section, ttd.path);

                    if (!preview)
                    {
                        Win32API.IniHelper.SetValue(ttd.path, ttd.section, key, string.Empty);
                        bgWorker.ReportProgress(-1, log);
                    }
                    else
                    {
                        //PreviewLog += log + "\r\n";
                        UpdateProgressLog(log, log);
                    }
                }
            }
        }
Ejemplo n.º 8
0
        void ExecuteSQLiteVacuumCommand(Model_ThingsToDelete ttd, bool preview = false)
        {
            string text = "Vacuum {0} {1}";

            FileInfo fi = new FileInfo(ttd.FullPathName);
            if (fi.Exists)
            {
                text = string.Format(text, Win32API.FormatByteSize(fi.Length), ttd.FullPathName);
            }

            if (preview)
            {
                //PreviewLog += text + "\r\n";

                UpdateProgressLog(text, text);
            }
            else
            {
                bgWorker.ReportProgress(-1, text);

                bool res = SQLite.I.Vacuum(ttd.FullPathName);
                string status = string.Empty;

                if (res)
                {
                    long old_size = fi.Length;
                    fi = new FileInfo(ttd.FullPathName);
                    long new_size = fi.Length;

                    this.TotalFileSize += old_size - new_size;

                    if (this.TotalFileSize > 0)
                    {
                        status = "CLEANED! new size " + Win32API.FormatByteSize(fi.Length);
                    }
                    else
                    {
                        status = "NO CHANGE";
                    }
                }

                text = string.Format(" - " + (res ? status : "NOT CLEANED"));
                bgWorker.ReportProgress(-1, text);
            }
        }
Ejemplo n.º 9
0
        void ExecuteWinRegCommand(Model_ThingsToDelete ttd, bool preview = false)
        {
            string text = string.Format("{0} {1} {2}",
                                        "Clean",
                                        ttd.reg_name == null ?
                                            "registry key" :
                                            "registry name",
                                        ttd.reg_name == null ?
                                            ttd.reg_root + "\\" + ttd.reg_subkey :
                                            ttd.reg_root + "\\" + ttd.reg_subkey + "\\" + ttd.reg_name
                                        );

            if (preview)
            {
                //string text = string.Format("{0} {1} {2}",
                //        "Delete",
                //        ttd.reg_name == null ?
                //            "registry key" :
                //            "registry name",
                //        ttd.reg_name == null ?
                //            ttd.reg_root + "\\" + ttd.reg_subkey :
                //            ttd.reg_root + "\\" + ttd.reg_subkey + "\\" + ttd.reg_name
                //        );

                //PreviewLog += text + "\r\n";

                UpdateProgressLog(text, text);
            }
            else
            {
                //string text = string.Format("{0} {1} {2}",
                //        "Delete",
                //        ttd.reg_name == null ?
                //            "registry key" :
                //            "registry name",
                //        ttd.reg_name == null ?
                //            ttd.reg_root + "\\" + ttd.reg_subkey :
                //            ttd.reg_root + "\\" + ttd.reg_subkey + "\\" + ttd.reg_name
                //        );

                bgWorker.ReportProgress(-1, text);

                if (ttd.reg_name == null) // name is empty so 
                {
                    // we are deleting a key
                    RegistryHelper.I.DeleteEntries(ttd.reg_root, ttd.reg_subkey);
                }
                else
                {
                    // we are now deleting a name value
                    RegistryHelper.I.DeleteEntries(ttd.reg_root, ttd.reg_subkey, ttd.reg_name);
                }

                text = string.Format(" - DELETED");
                bgWorker.ReportProgress(-1, text);
            }
        }
Ejemplo n.º 10
0
        public void ExecuteDeleteCommand(Model_ThingsToDelete ttd, BackgroundWorker bgWorker, Queue<Model_ThingsToDelete> TTD, bool preview = false)
        {
            if (preview)
            {
                FileInfo fi = new FileInfo(ttd.FullPathName);
                if (fi.Exists)
                {
                    string text = string.Format("{0} {1} {2}", "Delete", Win32API.FormatByteSize(fi.Length), ttd.FullPathName);

                    UpdateProgressLog(text, text);
                }
            }
            else
            {
                // next we need to know if the file exists so we can delete it.
                FileInfo fi = new FileInfo(ttd.FullPathName);
                if (fi.Exists)
                {
                    long FileSize = 0;
                    try
                    {
                        string text = string.Format("{0} {1} {2}", "Delete", Win32API.FormatByteSize(fi.Length),
                            ttd.FullPathName);
                        // then report to the gui
                        bgWorker.ReportProgress(-1, text);

                        // then we delete it.
                        if (fi.Exists)
                            FileSize = fi.Length;

                        FileOperations.Delete(fi.FullName);

                        text = string.Format(" - DELETED");

                        //// then report to the gui
                        bgWorker.ReportProgress(-1, text);

                        Worker.I.TotalFileSize += FileSize;
                        Worker.I.TotalFileDelete++;
                    }
                    catch (Exception ex)
                    {
                        Worker.I.TotalFileSkipped++;
                        Worker.I.TotalSkippedFileSize += FileSize;
                        var text =
                            "-ERROR while deleting a above file please close application which may lock this file " +
                            ex.Message;
                        bgWorker.ReportProgress(-1, text);
                    }
                }

                // delete directories as well if search parameter is walk.all
                if (ttd.search == SEARCH.walk_all)
                {
                    if (TTD.Count == 0)
                    {
                        DirectoryInfo di = new DirectoryInfo(ttd.path);
                        if (di.Exists)
                        {
                            FileOperations.I.DeleteEmptyDirectories(ttd.path, (a) =>
                            {
                                //string text = string.Format("Delete 0 {0} - DELETED", a);
                                string text = string.Format("Delete 0 {0}", a);
                                // then report to the gui
                                bgWorker.ReportProgress(-1, text);
                            });
                        }
                    }
                }
            }
        }
Ejemplo n.º 11
0
        async Task<bool> ExecuteLittleRegistryCleanerCommand(Model_ThingsToDelete ttd, string RegistryDatSaveFolderPath, bool preview = false)
        {
            try
            {
            string text = "{0} {1}";

            List<ScannerBase.InvalidKeys> BadKeys = new List<ScannerBase.InvalidKeys>();
            string strRegistryDatSaveFolderPath = RegistryDatSaveFolderPath;
            if (!preview && dtThingsDeleted== null)
            {
                dtThingsDeleted = CreateTableSchemaForRegistryStore();
            }

            switch (ttd.search)
            {
                case SEARCH.lrc_activex_com:
                    ActiveXComObjects.I.dtRegistryKeyDeleted = dtThingsDeleted;
                    ActiveXComObjects.I.strRegistryBackupFolderPath = strRegistryDatSaveFolderPath;
                    await ActiveXComObjects.I.Clean(preview);
                    BadKeys.AddRange(ActiveXComObjects.I.BadKeys);
                    dtThingsDeleted = ActiveXComObjects.I.dtRegistryKeyDeleted;
                    break;
                case SEARCH.lrc_app_info:
                    ApplicationInfo.I.dtRegistryKeyDeleted = dtThingsDeleted;
                    ApplicationInfo.I.strRegistryBackupFolderPath = strRegistryDatSaveFolderPath;
                    await ApplicationInfo.I.Clean(preview);
                    BadKeys.AddRange(ApplicationInfo.I.BadKeys);
                    dtThingsDeleted = ApplicationInfo.I.dtRegistryKeyDeleted;
                    break;
                case SEARCH.lrc_progam_location:
                    ApplicationPaths.I.dtRegistryKeyDeleted = dtThingsDeleted;
                    ApplicationPaths.I.strRegistryBackupFolderPath = strRegistryDatSaveFolderPath;
                    await ApplicationPaths.I.Clean(preview);
                    BadKeys.AddRange(ApplicationPaths.I.BadKeys);
                    dtThingsDeleted = ApplicationPaths.I.dtRegistryKeyDeleted;

                    break;
                case SEARCH.lrc_software_settings:
                    ApplicationSettings.I.dtRegistryKeyDeleted = dtThingsDeleted;
                    ApplicationSettings.I.strRegistryBackupFolderPath = strRegistryDatSaveFolderPath;
                    await ApplicationSettings.I.Clean(preview);
                    BadKeys.AddRange(ApplicationSettings.I.BadKeys);
                    dtThingsDeleted = ApplicationSettings.I.dtRegistryKeyDeleted;
                    break;
                case SEARCH.lrc_startup:
                    StartupFiles.I.dtRegistryKeyDeleted = dtThingsDeleted;
                    StartupFiles.I.strRegistryBackupFolderPath = strRegistryDatSaveFolderPath;
                    await StartupFiles.I.Clean(preview);
                    BadKeys.AddRange(StartupFiles.I.BadKeys);
                    dtThingsDeleted = StartupFiles.I.dtRegistryKeyDeleted;
                    break;
                case SEARCH.lrc_system_drivers:
                    SystemDrivers.I.dtRegistryKeyDeleted = dtThingsDeleted;
                    SystemDrivers.I.strRegistryBackupFolderPath = strRegistryDatSaveFolderPath;
                    await SystemDrivers.I.Clean(preview);
                    BadKeys.AddRange(SystemDrivers.I.BadKeys);
                    dtThingsDeleted = SystemDrivers.I.dtRegistryKeyDeleted;
                    break;
                case SEARCH.lrc_shared_dll:
                    SharedDLLs.I.dtRegistryKeyDeleted = dtThingsDeleted;
                    SharedDLLs.I.strRegistryBackupFolderPath = strRegistryDatSaveFolderPath;
                    await SharedDLLs.I.Clean(preview);
                    BadKeys.AddRange(SharedDLLs.I.BadKeys);
                    dtThingsDeleted = SharedDLLs.I.dtRegistryKeyDeleted;

                    break;
                case SEARCH.lrc_help_file:
                    WindowsHelpFiles.I.dtRegistryKeyDeleted = dtThingsDeleted;
                    WindowsHelpFiles.I.strRegistryBackupFolderPath = strRegistryDatSaveFolderPath;
                    await WindowsHelpFiles.I.Clean(preview);
                    BadKeys.AddRange(WindowsHelpFiles.I.BadKeys);
                    dtThingsDeleted = WindowsHelpFiles.I.dtRegistryKeyDeleted;
                    break;
                case SEARCH.lrc_sound_event:
                    WindowsSounds.I.dtRegistryKeyDeleted = dtThingsDeleted;
                    WindowsSounds.I.strRegistryBackupFolderPath = strRegistryDatSaveFolderPath;
                    await WindowsSounds.I.Clean(preview);
                    BadKeys.AddRange(WindowsSounds.I.BadKeys);
                    dtThingsDeleted = WindowsSounds.I.dtRegistryKeyDeleted;

                    break;
                case SEARCH.lrc_history_list:
                    RecentDocs.I.dtRegistryKeyDeleted = dtThingsDeleted;
                    RecentDocs.I.strRegistryBackupFolderPath = strRegistryDatSaveFolderPath;
                    await RecentDocs.I.Clean(preview);
                    BadKeys.AddRange(RecentDocs.I.BadKeys);
                    dtThingsDeleted = RecentDocs.I.dtRegistryKeyDeleted;
                    break;
                case SEARCH.lrc_win_fonts:
                    WindowsFonts.I.dtRegistryKeyDeleted = dtThingsDeleted;
                    WindowsFonts.I.strRegistryBackupFolderPath = strRegistryDatSaveFolderPath;
                    await WindowsFonts.I.Clean(preview);
                    BadKeys.AddRange(WindowsFonts.I.BadKeys);
                    dtThingsDeleted = WindowsFonts.I.dtRegistryKeyDeleted;
                    break;
            }

            if(!Preview)

            foreach (ScannerBase.InvalidKeys badkey in BadKeys)
            {
                string log = string.Empty;

                string root = badkey.Root.OpenSubKey(badkey.Subkey).ToString();

                log = string.Format(text, "Clean", root + (badkey.Key != string.Empty ? "\\" + badkey.Key : string.Empty) + ", " + badkey.Name);
                //PreviewLog += log + "\r\n";

                if (preview)
                {
                    UpdateProgressLog(log, log, false);
                }
                else
                {
                    bgWorker.ReportProgress(-1, log);
                }

                this.TotalSpecialOperations++;
            }
            }
            catch (Exception)
            {

                throw;
            }

            return true;
        }
Ejemplo n.º 12
0
        void ExecuteChromeCommand(Model_ThingsToDelete ttd, bool preview = false)
        {
            string text = "Clean file {0} {1}";

            if (preview)
            {
                FileInfo fi = new FileInfo(ttd.FullPathName);
                if (fi.Exists)
                {
                    string log = string.Format(text, Win32API.FormatByteSize(fi.Length), fi.FullName);
                    _preview_log += log + "\r\n";
                    UpdateProgressLog(text);
                }
            }
            else
            {

            }
        }