private void buttonTools_Click(object sender, EventArgs e) { this.panelProgress.Visible = false; buttonTools.BackColor = ApplicationSettings.SelectedButtonColor; buttonCleaner.BackColor = ApplicationSettings.NormalButtonColor; buttonRegistry.BackColor = ApplicationSettings.NormalButtonColor; buttonOptions.BackColor = ApplicationSettings.NormalButtonColor; if (panelCleanerComponents.Controls.Find("Registry", false).Count() > 0) { UCRegistry registry = panelCleanerComponents.Controls.Find("Registry", false)[0] as UCRegistry; registry.Hide(); } if (panelCleanerComponents.Controls.Find("ucCleaner1", false).Count() > 0) { UCCleaner registry = panelCleanerComponents.Controls.Find("ucCleaner1", false)[0] as UCCleaner; registry.Hide(); } if (gboxResult.Controls.Find("Options", false).Count() > 0) { UCOptions result = this.gboxResult.Controls.Find("Options", true)[0] as UCOptions; result.Visible = false; } if (gboxResult.Controls.Find("Tools", false).Count() > 0) { foreach (Control ctrl in this.gboxResult.Controls) { ctrl.Visible = false; } UCTools registry = gboxResult.Controls.Find("Tools", false)[0] as UCTools; registry.Visible = true; } else { UCTools tools = new UCTools(); tools.Name = "Tools"; tools.Dock = DockStyle.Fill; foreach (Control ctrl in this.gboxResult.Controls) { ctrl.Visible = false; } this.gboxResult.Controls.Add(tools); Task.Delay(500); Task.Factory.StartNew(() => tools.LoadPrograms()); } ShowHideControls(ApplicationItem.Tools); SelectedItem = ApplicationItem.Tools; this.panelActionButtons.Hide(); }
private void buttonCleaner_Click(object sender, EventArgs e) { panelActionButtons.Show(); this.panelProgress.Visible = true; buttonCleaner.BackColor = ApplicationSettings.SelectedButtonColor; buttonRegistry.BackColor = ApplicationSettings.NormalButtonColor; buttonTools.BackColor = ApplicationSettings.NormalButtonColor; buttonOptions.BackColor = ApplicationSettings.NormalButtonColor; this.ucCleaner1.Visible = true; this.ucResult.Visible = false; this.panelCleanerComponents.Visible = true; this.gboxResult.Visible = true; this.panelProgress.Visible = true; if (panelCleanerComponents.Controls.Find("Registry", false).Count() > 0) { UCRegistry registry = panelCleanerComponents.Controls.Find("Registry", false)[0] as UCRegistry; registry.Hide(); } if (panelCleanerComponents.Controls.Find("ucCleaner1", false).Count() > 0) { UCCleaner registry = panelCleanerComponents.Controls.Find("ucCleaner1", false)[0] as UCCleaner; registry.Show(); } if (gboxResult.Controls.Find("Tools", false).Count() > 0) { UCTools registry = gboxResult.Controls.Find("Tools", false)[0] as UCTools; registry.Hide(); } if (this.gboxResult.Controls.Find("UCResultRegistry", true).Count() > 0) { UCResultRegistry result = this.gboxResult.Controls.Find("UCResultRegistry", true)[0] as UCResultRegistry; result.Visible = false; } if (gboxResult.Controls.Find("Options", false).Count() > 0) { UCOptions result = this.gboxResult.Controls.Find("Options", true)[0] as UCOptions; result.Visible = false; } ShowHideControls(ApplicationItem.Cleaner); SelectedItem = ApplicationItem.Cleaner; //ucResult.ResetView(); }
public void ShowSubscriptionForm() { if (panelCleanerComponents.Controls.Find("ucCleaner1", false).Count() > 0) { UCCleaner registry = panelCleanerComponents.Controls.Find("ucCleaner1", false)[0] as UCCleaner; registry.Hide(); } UCOptions tools = new UCOptions(); tools.Name = "Options"; tools.Dock = DockStyle.Fill; foreach (Control ctrl in this.gboxResult.Controls) { ctrl.Visible = false; } this.gboxResult.Controls.Add(tools); }
public void ShowOptionForm(bool showSubscription = false, bool showAboutFormOnly = false) { this.panelProgress.Visible = false; this.panelActionButtons.Hide(); buttonTools.BackColor = ApplicationSettings.NormalButtonColor; buttonCleaner.BackColor = ApplicationSettings.NormalButtonColor; buttonRegistry.BackColor = ApplicationSettings.NormalButtonColor; buttonOptions.BackColor = ApplicationSettings.SelectedButtonColor; if (panelCleanerComponents.Controls.Find("Registry", false).Count() > 0) { UCRegistry registry = panelCleanerComponents.Controls.Find("Registry", false)[0] as UCRegistry; registry.Hide(); } if (panelCleanerComponents.Controls.Find("ucCleaner1", false).Count() > 0) { UCCleaner registry = panelCleanerComponents.Controls.Find("ucCleaner1", false)[0] as UCCleaner; registry.Hide(); } if (gboxResult.Controls.Find("Tools", false).Count() > 0) { foreach (Control ctrl in this.gboxResult.Controls) { ctrl.Hide(); } UCTools registry = gboxResult.Controls.Find("Tools", false)[0] as UCTools; registry.Hide(); } if (gboxResult.Controls.Find("Options", false).Count() > 0) { foreach (Control ctrl in this.gboxResult.Controls) { ctrl.Hide(); } UCOptions options = gboxResult.Controls.Find("Options", false)[0] as UCOptions; options.Show(); } else { UCOptions tools = new UCOptions(); tools.Name = "Options"; tools.Dock = DockStyle.Fill; foreach (Control ctrl in this.gboxResult.Controls) { ctrl.Visible = false; } this.gboxResult.Controls.Add(tools); if (showSubscription) { tools.ShowSubscriptionForm(showSubscription); } if (showAboutFormOnly) { tools.ShowAboutUs(true); } } ShowHideControls(ApplicationItem.Options); SelectedItem = ApplicationItem.Options; this.panelActionButtons.Hide(); if (showSubscription || showAboutFormOnly) { if (this.OwnedForms.Count() > 0) { this.OwnedForms[0].Hide(); } buttonCleaner.Enabled = false; buttonRegistry.Enabled = false; buttonTools.Enabled = false; } }