Пример #1
0
        /// <summary>
        /// initialize frmTrackSelector
        /// </summary>
        void InitFormClassParams()
        {
            var culture = new CultureInfo(CfgFile.Get("Lang"));
            SetCulture(culture);

            filesToDelete = new List<string>();
            foldersToDelete = new List<string>();
            regValuesToDelete = new List<string>();
            UrlHistory = new UrlHistoryWrapperClass();
            Enumerator = UrlHistory.GetEnumerator();
        }
Пример #2
0
        /// <summary>
        /// Starts scanning files
        /// </summary>
        /// <param name="fixErrorsAfterScan">Delete tracks after scanning</param>
        public void ScanFiles(bool fixErrorsAfterScan)
        {
            filesToDelete = new List<string>();
            foldersToDelete = new List<string>();
            regValuesToDelete = new List<string>();
            UrlHistory = new UrlHistoryWrapperClass();
            Enumerator = UrlHistory.GetEnumerator();

            fixAfterScan = fixErrorsAfterScan;
            if (!IsAnyNodeChecked())
            {
                // Check all nodes if none selected
                CheckAllNodes();
            }
            StartScan();
        }
Пример #3
0
 /// <summary>
 /// handle click event to show options
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void optionsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     UrlHistory = new UrlHistoryWrapperClass();
     Enumerator = UrlHistory.GetEnumerator();
     frmOptions frmOptions = new frmOptions();
     frmOptions.ShowDialog();
 }
Пример #4
0
        /// <summary>
        /// Runs Scanning process
        /// </summary>
        private void RunScan()
        {
            filesToDelete = new List<string>();
            regValuesToDelete = new List<string>();
            foldersToDelete = new List<string>();
            UrlHistory = new UrlHistoryWrapperClass();
            Enumerator = UrlHistory.GetEnumerator();
            CheckNotInstalledApps();

            tsbAnalyse.Enabled = false;
            tsbErase.Enabled = false;
            tsbCheck.Enabled = false;
            btnAnalyse.Text = rm.GetString("cancel");
            tsbAnalyse.Text = rm.GetString("scanning");

            Scanninglbl.Visible = true;
            Scanninglbl.Text = rm.GetString("scanning_tracks");
            pcbScanning.Visible = true;
            scanBackgroundWorker = new BackgroundWorker();
            scanBackgroundWorker.WorkerSupportsCancellation = true;
            scanBackgroundWorker.ProgressChanged += ProgressChanged;
            scanBackgroundWorker.DoWork += DoWork;
            scanBackgroundWorker.RunWorkerCompleted += WorkerCompleted;
            scanBackgroundWorker.RunWorkerAsync();
        }
Пример #5
0
        /// <summary>
        /// load the form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void frmMain_Load(object sender, EventArgs e)
        {
            try
            {
                RunEraser.Enabled = false;
                culture = new CultureInfo(CfgFile.Get("Lang"));
                SetCulture(culture);

                filesToDelete = new List<string>();
                regValuesToDelete = new List<string>();
                foldersToDelete = new List<string>();
                UrlHistory = new UrlHistoryWrapperClass();
                Enumerator = UrlHistory.GetEnumerator();

                trvTracks.ExpandAll();
                trvTracks.SelectedNode = trvTracks.Nodes[0];

                CheckNotInstalledApps();

                Process[] pname = Process.GetProcessesByName("iexplore");
                if (pname.Length > 0)
                {
                    trvTracks.Nodes[1].ForeColor = Color.DarkGray;
                    for (int i = 0; i < trvTracks.Nodes[1].Nodes.Count; i++)
                    {
                        trvTracks.Nodes[1].Nodes[i].ForeColor = Color.DarkGray;
                        trvTracks.Nodes[1].Nodes[i].ImageIndex = 7;
                    }
                }

                pname = Process.GetProcessesByName("firefox");
                if (pname.Length > 0)
                {
                    trvTracks.Nodes[3].ForeColor = Color.DarkGray;
                    for (int i = 0; i < trvTracks.Nodes[3].Nodes.Count; i++)
                    {
                        trvTracks.Nodes[3].Nodes[i].ForeColor = Color.DarkGray;
                        trvTracks.Nodes[3].Nodes[i].ImageIndex = 7;
                    }
                }

                pname = Process.GetProcessesByName("chrome");
                if (pname.Length > 0)
                {
                    trvTracks.Nodes[4].ForeColor = Color.DarkGray;
                    for (int i = 0; i < trvTracks.Nodes[4].Nodes.Count; i++)
                    {
                        trvTracks.Nodes[4].Nodes[i].ForeColor = Color.DarkGray;
                        trvTracks.Nodes[4].Nodes[i].ImageIndex = 7;
                    }
                }
            }
            catch (Exception)
            {
                // ToDo: send exception details via SmartAssembly bug reporting!
            }
        }