public Main() { InitializeComponent(); this.m_watcher = new LittleSoftwareStats.Watcher(); LittleSoftwareStats.Config.Enabled = true; this.m_watcher.Start("90e5a0f8f727288797059ed635e28bb1", "1.0"); // Tracks Exceptions Automatically AppDomain.CurrentDomain.UnhandledException += (s, e) => this.m_watcher.Exception(e.ExceptionObject as Exception); // Track WinForms Exceptions Automatically Application.ThreadException += (s, e) => this.m_watcher.Exception(e.Exception); PopulateDiskDrives(); if (Properties.Settings.Default.includedFolders == null) PopulateIncludeFolders(); }
private void Main_Shown(object sender, EventArgs e) { // Send usage data to Little Software Stats _watcher = new LittleSoftwareStats.Watcher(); LittleSoftwareStats.Config.Enabled = Properties.Settings.Default.bOptionsStats; Watcher.Start("184bab3a428943b6e3a941866d8618d8", Application.ProductVersion); // Expand all sections this.treeView1.Nodes[0].ExpandAll(); // Add tree model to treeviewadv this.treeViewAdvResults.Model = new SortedTreeModel(this.treeModel); // Set language to current culture this.SetCurrentLang(); // See if we have the current version if (Properties.Settings.Default.bOptionsAutoUpdate) { AutoUpdaterDotNET.AutoUpdater.Start(Properties.Settings.Default.strUpdateURL); } // Increase number to program starts Properties.Settings.Default.nProgramStarts += 1; /***********************************************************************************************************/ /* THE CODE BELOW IS LICENSED UNDER THE CREATIVE COMMONS ATTRIBUTION NON-COMMERCIAL NO DERIVATIVES LICENSE */ if (Properties.Settings.Default.nProgramStarts == 1) { MessageBox.Show(this, Properties.Resources.mainFreeWareProgram, "Little Registry Cleaner", MessageBoxButtons.OK, MessageBoxIcon.Information); } /* THE CODE ABOVE IS LICENSED UNDER THE CREATIVE COMMONS ATTRIBUTION NON-COMMERCIAL NO DERIVATIVES LICENSE */ /***********************************************************************************************************/ // If /scan passed as argument -> Start scanning foreach (string arg in Environment.GetCommandLineArgs()) { if (arg == "/scan") { ScanRegistry(); } } }