From deb34a6b94202d9114d7e9c14083cd35a1246b3c Mon Sep 17 00:00:00 2001 From: Belim Date: Thu, 8 May 2025 18:57:42 +0200 Subject: [PATCH 01/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 41a82d9..e77a729 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - +# Crapf🧼xer # the tool that says what everyone’s thinking ## the tool Microsoft would build, if they hated bloatware as much as we do From dfe5b1730a73805f1a974acd6187b6d7149c7b08 Mon Sep 17 00:00:00 2001 From: Belim Date: Sat, 10 May 2025 10:26:01 +0200 Subject: [PATCH 02/17] Include IniStateManager --- MSCFixer/IniStateManager.cs | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 MSCFixer/IniStateManager.cs diff --git a/MSCFixer/IniStateManager.cs b/MSCFixer/IniStateManager.cs new file mode 100644 index 0000000..fb87969 --- /dev/null +++ b/MSCFixer/IniStateManager.cs @@ -0,0 +1,69 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Windows.Forms; + +public static class IniStateManager +{ + // Saves the states of the TreeView nodes to an INI file + public static void Save(TreeView tree, string path) + { + using (var writer = new StreamWriter(path)) + { + // Iterates through all nodes and saves their state + WriteNodeStates(writer, tree.Nodes); + } + } + + // Loads the states of the TreeView nodes from an INI file + public static void Load(TreeView tree, string path) + { + if (!File.Exists(path)) return; + + var lines = File.ReadAllLines(path); + var states = lines.Select(l => l.Split(new[] { '=' }, 2)) + .Where(p => p.Length == 2) + .ToDictionary(p => p[0].Trim(), p => p[1].Trim().ToLower() == "true"); + + // Sets the state of the nodes based on the loaded data + ApplyStates(tree.Nodes, states); + } + + /// + /// Saves the state of each node in the TreeView recursively. + /// + /// + /// + private static void WriteNodeStates(StreamWriter writer, TreeNodeCollection nodes) + { + foreach (TreeNode node in nodes) + { + // Saves the node's name and its checked status + writer.WriteLine($"{node.Text.Trim()}={node.Checked}"); + // If the node has children, recursively go through all nodes + if (node.Nodes.Count > 0) + WriteNodeStates(writer, node.Nodes); + } + } + + /// + /// Applies the saved states to the TreeView nodes recursively. + /// + /// + /// + private static void ApplyStates(TreeNodeCollection nodes, Dictionary states) + { + foreach (TreeNode node in nodes) + { + string nodeName = node.Text.Trim(); + if (states.ContainsKey(nodeName)) + { + node.Checked = states[nodeName]; + } + + // Apply recursively to child nodes + if (node.Nodes.Count > 0) + ApplyStates(node.Nodes, states); + } + } +} From f965c7dad646491cdfb2e28d6caf6dbfad8c6e6e Mon Sep 17 00:00:00 2001 From: Belim Date: Sat, 10 May 2025 10:27:03 +0200 Subject: [PATCH 03/17] Upt IniStateManager --- MSCFixer/MainForm.cs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/MSCFixer/MainForm.cs b/MSCFixer/MainForm.cs index 98c8622..4e77275 100644 --- a/MSCFixer/MainForm.cs +++ b/MSCFixer/MainForm.cs @@ -1,5 +1,6 @@ using MSCFixer; using MSCFixer.Properties; +using MSCFixer.Views; using System; using System.Diagnostics; using System.Drawing; @@ -8,15 +9,17 @@ using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; using Views; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; namespace Crapfixer { public partial class MainForm : Form { + private readonly string iniPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Crapfixer.ini"); + private NavigationManager navigationManager; private NavigationHandler navigationHandler; private readonly AppManagerService appManager = new AppManagerService(); - private readonly string iniPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Crapfixer.ini"); public MainForm() { @@ -25,18 +28,17 @@ namespace Crapfixer Logger.OutputBox = rtbLogger; FeatureNodeManager.LoadFeatures(treeFeatures); PluginManager.LoadPlugins(treeFeatures); - + IniStateManager.Load(treeFeatures, iniPath); } private void MainForm_Shown(object sender, EventArgs e) { InitializeUI(); - IniStateManager.Load(treeFeatures, iniPath); } private void InitializeUI() { - navigationHandler = new NavigationHandler(btnHome, btnRestore, btnSettings); + navigationHandler = new NavigationHandler(btnHome, btnSettings); btnHome.Click += (s, e) => { @@ -44,14 +46,9 @@ namespace Crapfixer navigationHandler.SetActive(btnHome); }; - btnRestore.Click += (s, e) => - { - navigationHandler.SetActive(btnRestore); - }; - btnSettings.Click += (s, e) => { - navigationManager.SwitchView(new SettingsView(navigationManager)); + navigationManager.SwitchView(new OptionsView(navigationManager)); navigationHandler.SetActive(btnSettings); }; @@ -106,7 +103,7 @@ namespace Crapfixer .Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries) .Select(s => s.Trim()).ToArray() ?? Array.Empty(); - // Logger.Log("Using built-in bloatware list.", LogLevel.Info); + // Logger.Log("Using built-in bloatware list.", LogLevel.Info); } else { @@ -127,7 +124,6 @@ namespace Crapfixer } } - private async void btnFix_Click(object sender, EventArgs e) { rtbLogger.Clear(); From 0deb54ac55aaaf4a662ea65e668773bc7291c714 Mon Sep 17 00:00:00 2001 From: Belim Date: Sat, 10 May 2025 13:33:13 +0200 Subject: [PATCH 04/17] Create Update.md --- Update.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Update.md diff --git a/Update.md b/Update.md new file mode 100644 index 0000000..50cb5a0 --- /dev/null +++ b/Update.md @@ -0,0 +1,6 @@ +# Crapfixer Update Info + +Version: 0.51.150 +Download: https://github.com/builtbybel/Crapfixer/releases +Changelog: +- xyz From 0aeb3d0a163e6786328a7e9840db7166c6272294 Mon Sep 17 00:00:00 2001 From: Belim Date: Sat, 10 May 2025 13:41:02 +0200 Subject: [PATCH 05/17] Update Update.md --- Update.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Update.md b/Update.md index 50cb5a0..b4d3b2f 100644 --- a/Update.md +++ b/Update.md @@ -1,6 +1,6 @@ # Crapfixer Update Info Version: 0.51.150 -Download: https://github.com/builtbybel/Crapfixer/releases +Download:https://github.com/builtbybel/Crapfixer/releases Changelog: - xyz From 7eb146a8a1400ffa984d887c19645d17712deb8e Mon Sep 17 00:00:00 2001 From: Belim Date: Sat, 10 May 2025 13:46:41 +0200 Subject: [PATCH 06/17] Create update-check.html --- docs/update-check.html | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 docs/update-check.html diff --git a/docs/update-check.html b/docs/update-check.html new file mode 100644 index 0000000..9352c7a --- /dev/null +++ b/docs/update-check.html @@ -0,0 +1,41 @@ + + + + Crapfixer Update Check + + + +

🔍 Crapfixer Update Check

+

+ + + + From 820dae32b3a9f96340a0c8791a13440efc4e13a6 Mon Sep 17 00:00:00 2001 From: Belim Date: Sat, 10 May 2025 13:49:52 +0200 Subject: [PATCH 07/17] Delete Update.md --- Update.md | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 Update.md diff --git a/Update.md b/Update.md deleted file mode 100644 index b4d3b2f..0000000 --- a/Update.md +++ /dev/null @@ -1,6 +0,0 @@ -# Crapfixer Update Info - -Version: 0.51.150 -Download:https://github.com/builtbybel/Crapfixer/releases -Changelog: -- xyz From 22f4f299f974372e7eb4125eb5af67f79786cd90 Mon Sep 17 00:00:00 2001 From: Belim Date: Sat, 10 May 2025 13:53:38 +0200 Subject: [PATCH 08/17] Update update-check.html --- docs/update-check.html | 60 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/docs/update-check.html b/docs/update-check.html index 9352c7a..2afa356 100644 --- a/docs/update-check.html +++ b/docs/update-check.html @@ -1,12 +1,64 @@ - + + + Crapfixer Update Check - +

🔍 Crapfixer Update Check

-

+

Checking version...

+ + From c5b77a463ce94c647989ab8fe37f32eb01a0dc3b Mon Sep 17 00:00:00 2001 From: Belim Date: Sat, 10 May 2025 14:13:15 +0200 Subject: [PATCH 10/17] push 0.60-live --- MSCFixer/{ => Features}/FeatureBase.cs | 0 MSCFixer/{ => Features}/FeatureLoader.cs | 0 MSCFixer/{ => Features}/FeatureManager.cs | 0 MSCFixer/{ => Features}/FeatureNode.cs | 0 MSCFixer/Features/Issues/WingetUpgrade.cs | 2 +- MSCFixer/Helpers/Utils.cs | 3 +- MSCFixer/MSCFixer.csproj | 26 +++- MSCFixer/MainForm.Designer.cs | 37 ++--- MSCFixer/MainForm.cs | 15 +- MSCFixer/Program.cs | 23 ++- MSCFixer/Properties/AssemblyInfo.cs | 4 +- MSCFixer/Views/AboutView.Designer.cs | 153 +++++++++++++++++++ MSCFixer/Views/AboutView.cs | 67 +++++++++ MSCFixer/Views/AboutView.resx | 120 +++++++++++++++ MSCFixer/Views/OptionsView.Designer.cs | 108 +++++++++++++ MSCFixer/Views/OptionsView.cs | 28 ++++ MSCFixer/Views/OptionsView.resx | 120 +++++++++++++++ MSCFixer/Views/SettingsView.Designer.cs | 175 ++++++---------------- MSCFixer/Views/SettingsView.cs | 56 +------ 19 files changed, 718 insertions(+), 219 deletions(-) rename MSCFixer/{ => Features}/FeatureBase.cs (100%) rename MSCFixer/{ => Features}/FeatureLoader.cs (100%) rename MSCFixer/{ => Features}/FeatureManager.cs (100%) rename MSCFixer/{ => Features}/FeatureNode.cs (100%) create mode 100644 MSCFixer/Views/AboutView.Designer.cs create mode 100644 MSCFixer/Views/AboutView.cs create mode 100644 MSCFixer/Views/AboutView.resx create mode 100644 MSCFixer/Views/OptionsView.Designer.cs create mode 100644 MSCFixer/Views/OptionsView.cs create mode 100644 MSCFixer/Views/OptionsView.resx diff --git a/MSCFixer/FeatureBase.cs b/MSCFixer/Features/FeatureBase.cs similarity index 100% rename from MSCFixer/FeatureBase.cs rename to MSCFixer/Features/FeatureBase.cs diff --git a/MSCFixer/FeatureLoader.cs b/MSCFixer/Features/FeatureLoader.cs similarity index 100% rename from MSCFixer/FeatureLoader.cs rename to MSCFixer/Features/FeatureLoader.cs diff --git a/MSCFixer/FeatureManager.cs b/MSCFixer/Features/FeatureManager.cs similarity index 100% rename from MSCFixer/FeatureManager.cs rename to MSCFixer/Features/FeatureManager.cs diff --git a/MSCFixer/FeatureNode.cs b/MSCFixer/Features/FeatureNode.cs similarity index 100% rename from MSCFixer/FeatureNode.cs rename to MSCFixer/Features/FeatureNode.cs diff --git a/MSCFixer/Features/Issues/WingetUpgrade.cs b/MSCFixer/Features/Issues/WingetUpgrade.cs index 8da64db..fce85f5 100644 --- a/MSCFixer/Features/Issues/WingetUpgrade.cs +++ b/MSCFixer/Features/Issues/WingetUpgrade.cs @@ -9,7 +9,7 @@ namespace Settings.System { public override string GetFeatureDetails() { - return "Launches Windows Terminal to check and upgrade all installed apps via winget."; + return "winget upgrade --include-unknown"; } public override string ID() diff --git a/MSCFixer/Helpers/Utils.cs b/MSCFixer/Helpers/Utils.cs index ea42a11..3016a49 100644 --- a/MSCFixer/Helpers/Utils.cs +++ b/MSCFixer/Helpers/Utils.cs @@ -2,6 +2,8 @@ using System.Windows.Forms; using System; using System.Diagnostics; +using System.Linq; +using System.Net; // This file is part of MSCFixer. namespace Crapfixer @@ -78,6 +80,5 @@ namespace Crapfixer Logger.Log("Failed to restart Explorer: " + ex.Message, LogLevel.Error); } } - } } \ No newline at end of file diff --git a/MSCFixer/MSCFixer.csproj b/MSCFixer/MSCFixer.csproj index 2753731..f944cae 100644 --- a/MSCFixer/MSCFixer.csproj +++ b/MSCFixer/MSCFixer.csproj @@ -56,7 +56,7 @@ - + @@ -94,8 +94,8 @@ - - + + @@ -123,12 +123,24 @@ + + UserControl + + + AboutView.cs + UserControl SettingsView.cs + + UserControl + + + OptionsView.cs + MainForm.cs @@ -137,11 +149,17 @@ Designer Resources.Designer.cs + + AboutView.cs + SettingsView.cs + + OptionsView.cs + - + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/MSCFixer/MainForm.Designer.cs b/MSCFixer/MainForm.Designer.cs index 95d584f..62944a4 100644 --- a/MSCFixer/MainForm.Designer.cs +++ b/MSCFixer/MainForm.Designer.cs @@ -52,7 +52,7 @@ this.lblHeader = new System.Windows.Forms.Label(); this.pictureHeader = new System.Windows.Forms.PictureBox(); this.btnRestore = new System.Windows.Forms.Button(); - this.linkHelp = new System.Windows.Forms.LinkLabel(); + this.linkUpdateCheck = new System.Windows.Forms.LinkLabel(); this.btnSettings = new System.Windows.Forms.Button(); this.btnHome = new System.Windows.Forms.Button(); this.linkSelection = new System.Windows.Forms.LinkLabel(); @@ -345,21 +345,22 @@ this.btnRestore.UseVisualStyleBackColor = true; this.btnRestore.Click += new System.EventHandler(this.btnRestore_Click); // - // linkHelp + // linkUpdateCheck // - this.linkHelp.ActiveLinkColor = System.Drawing.Color.Blue; - this.linkHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.linkHelp.AutoEllipsis = true; - this.linkHelp.AutoSize = true; - this.linkHelp.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.linkHelp.LinkColor = System.Drawing.Color.White; - this.linkHelp.Location = new System.Drawing.Point(620, 447); - this.linkHelp.Name = "linkHelp"; - this.linkHelp.Size = new System.Drawing.Size(63, 13); - this.linkHelp.TabIndex = 203; - this.linkHelp.TabStop = true; - this.linkHelp.Text = "GitHub Help"; - this.linkHelp.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.linkUpdateCheck.ActiveLinkColor = System.Drawing.Color.Blue; + this.linkUpdateCheck.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.linkUpdateCheck.AutoEllipsis = true; + this.linkUpdateCheck.AutoSize = true; + this.linkUpdateCheck.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.linkUpdateCheck.LinkColor = System.Drawing.Color.White; + this.linkUpdateCheck.Location = new System.Drawing.Point(595, 447); + this.linkUpdateCheck.Name = "linkUpdateCheck"; + this.linkUpdateCheck.Size = new System.Drawing.Size(95, 13); + this.linkUpdateCheck.TabIndex = 203; + this.linkUpdateCheck.TabStop = true; + this.linkUpdateCheck.Text = "Check for updates"; + this.linkUpdateCheck.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.linkUpdateCheck.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkUpdateCheck_LinkClicked); // // btnSettings // @@ -391,7 +392,7 @@ this.btnHome.Size = new System.Drawing.Size(99, 69); this.btnHome.TabIndex = 206; this.btnHome.TabStop = false; - this.btnHome.Text = "&Home"; + this.btnHome.Text = "&Fixer"; this.btnHome.UseVisualStyleBackColor = false; // // linkSelection @@ -422,7 +423,7 @@ this.Controls.Add(this.btnSettings); this.Controls.Add(this.panelHeader); this.Controls.Add(this.btnRestore); - this.Controls.Add(this.linkHelp); + this.Controls.Add(this.linkUpdateCheck); this.Controls.Add(this.panelContainer); this.Name = "MainForm"; this.ShowIcon = false; @@ -467,7 +468,7 @@ private System.Windows.Forms.CheckedListBox checkedListBoxApps; private System.Windows.Forms.ToolStripSeparator seperatorToolStripMenuItem; private System.Windows.Forms.Panel panelContent; - private System.Windows.Forms.LinkLabel linkHelp; + private System.Windows.Forms.LinkLabel linkUpdateCheck; private System.Windows.Forms.ToolStripMenuItem helpMarkedFeatureToolStripMenuItem; private System.Windows.Forms.TreeView treeFeatures; private System.Windows.Forms.Label lblOSInfo; diff --git a/MSCFixer/MainForm.cs b/MSCFixer/MainForm.cs index 4e77275..ecc0315 100644 --- a/MSCFixer/MainForm.cs +++ b/MSCFixer/MainForm.cs @@ -52,14 +52,14 @@ namespace Crapfixer navigationHandler.SetActive(btnSettings); }; - linkHelp.Click += (s, e) => + linkUpdateCheck.Click += (s, e) => { Process.Start("https://github.com/builtbybel/Crapfixer/issues"); }; UpdateTitleWithOSVersion(); // Update OS version label - this.lblVersionInfo.Text = $"v{Program.GetCurrentVersionTostring()} "; // Update version label + this.lblVersionInfo.Text = $"v{Program.GetAppVersion()} "; // Update version label } private async void UpdateTitleWithOSVersion() @@ -314,5 +314,16 @@ namespace Crapfixer { IniStateManager.Save(treeFeatures, iniPath); } + + private void linkUpdateCheck_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + string version = Program.GetAppVersion(); + string url = $"https://builtbybel.github.io/Crapfixer/update-check.html?version={version}"; + Process.Start(new ProcessStartInfo + { + FileName = url, + UseShellExecute = true + }); + } } } \ No newline at end of file diff --git a/MSCFixer/Program.cs b/MSCFixer/Program.cs index 745bf14..a84b426 100644 --- a/MSCFixer/Program.cs +++ b/MSCFixer/Program.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using System.Threading.Tasks; using System.Windows.Forms; @@ -8,20 +9,28 @@ namespace Crapfixer { internal static class Program { - /// - /// Get app version - /// - internal static string GetCurrentVersionTostring() => new Version(Application.ProductVersion).ToString(3); - /// /// The main entry point for the application. /// [STAThread] - static void Main() + private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); } + + /// + /// Retrieves the version of the app + /// + /// The application version in the format "major.minor.build" + public static string GetAppVersion() + { + // Get the version of the current executing assembly + Version version = Assembly.GetExecutingAssembly().GetName().Version; + + // Return the version in the format "major.minor.build" + return $"{version.Major}.{version.Minor}.{version.Build}"; + } } -} +} \ No newline at end of file diff --git a/MSCFixer/Properties/AssemblyInfo.cs b/MSCFixer/Properties/AssemblyInfo.cs index f815d86..e046a7a 100644 --- a/MSCFixer/Properties/AssemblyInfo.cs +++ b/MSCFixer/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.50.135")] -[assembly: AssemblyFileVersion("0.50.135")] +[assembly: AssemblyVersion("0.55.160")] +[assembly: AssemblyFileVersion("0.55.160")] diff --git a/MSCFixer/Views/AboutView.Designer.cs b/MSCFixer/Views/AboutView.Designer.cs new file mode 100644 index 0000000..fb75eb4 --- /dev/null +++ b/MSCFixer/Views/AboutView.Designer.cs @@ -0,0 +1,153 @@ +namespace Views +{ + partial class AboutView + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Komponenten-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + this.lblHeader = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.lblVersionInfo = new System.Windows.Forms.Label(); + this.linkGitHub = new System.Windows.Forms.LinkLabel(); + this.btnDonate = new System.Windows.Forms.Button(); + this.panelSettings = new System.Windows.Forms.Panel(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.panelSettings.SuspendLayout(); + this.SuspendLayout(); + // + // lblHeader + // + this.lblHeader.AutoEllipsis = true; + this.lblHeader.AutoSize = true; + this.lblHeader.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Bold); + this.lblHeader.ForeColor = System.Drawing.Color.Black; + this.lblHeader.Location = new System.Drawing.Point(61, 19); + this.lblHeader.Name = "lblHeader"; + this.lblHeader.Size = new System.Drawing.Size(69, 21); + this.lblHeader.TabIndex = 235; + this.lblHeader.Text = "Crapfixer"; + this.lblHeader.UseCompatibleTextRendering = true; + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.AutoEllipsis = true; + this.label1.Location = new System.Drawing.Point(18, 121); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(589, 26); + this.label1.TabIndex = 236; + this.label1.Text = "You can download the latest version, report bugs and submit feature requests at t" + + "he following GitHub page."; + // + // pictureBox1 + // + this.pictureBox1.Image = global::MSCFixer.Properties.Resources.AppIcon32; + this.pictureBox1.Location = new System.Drawing.Point(18, 19); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(37, 34); + this.pictureBox1.TabIndex = 237; + this.pictureBox1.TabStop = false; + // + // lblVersionInfo + // + this.lblVersionInfo.AutoSize = true; + this.lblVersionInfo.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F); + this.lblVersionInfo.ForeColor = System.Drawing.Color.Black; + this.lblVersionInfo.Location = new System.Drawing.Point(61, 40); + this.lblVersionInfo.Name = "lblVersionInfo"; + this.lblVersionInfo.Size = new System.Drawing.Size(13, 13); + this.lblVersionInfo.TabIndex = 238; + this.lblVersionInfo.Text = "v"; + // + // linkGitHub + // + this.linkGitHub.AutoSize = true; + this.linkGitHub.Location = new System.Drawing.Point(37, 156); + this.linkGitHub.Name = "linkGitHub"; + this.linkGitHub.Size = new System.Drawing.Size(190, 13); + this.linkGitHub.TabIndex = 239; + this.linkGitHub.TabStop = true; + this.linkGitHub.Text = "https://github.com/builtbybel/Crapfixer"; + this.linkGitHub.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkGitHub_LinkClicked); + // + // btnDonate + // + this.btnDonate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(131)))), ((int)(((byte)(222))))); + this.btnDonate.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnDonate.FlatAppearance.BorderSize = 0; + this.btnDonate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnDonate.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnDonate.ForeColor = System.Drawing.Color.White; + this.btnDonate.Location = new System.Drawing.Point(60, 68); + this.btnDonate.Name = "btnDonate"; + this.btnDonate.Size = new System.Drawing.Size(207, 39); + this.btnDonate.TabIndex = 240; + this.btnDonate.Text = "Like Crapfixer? Support future updates on Ko-fi or PayPal"; + this.btnDonate.UseVisualStyleBackColor = false; + this.btnDonate.Click += new System.EventHandler(this.btnDonate_Click); + // + // panelSettings + // + this.panelSettings.Controls.Add(this.btnDonate); + this.panelSettings.Controls.Add(this.lblHeader); + this.panelSettings.Controls.Add(this.linkGitHub); + this.panelSettings.Controls.Add(this.label1); + this.panelSettings.Controls.Add(this.lblVersionInfo); + this.panelSettings.Controls.Add(this.pictureBox1); + this.panelSettings.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelSettings.Location = new System.Drawing.Point(0, 0); + this.panelSettings.Name = "panelSettings"; + this.panelSettings.Size = new System.Drawing.Size(625, 395); + this.panelSettings.TabIndex = 242; + // + // AboutView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.AutoScroll = true; + this.BackColor = System.Drawing.Color.White; + this.Controls.Add(this.panelSettings); + this.Name = "AboutView"; + this.Size = new System.Drawing.Size(625, 395); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.panelSettings.ResumeLayout(false); + this.panelSettings.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.Label lblHeader; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label lblVersionInfo; + private System.Windows.Forms.LinkLabel linkGitHub; + private System.Windows.Forms.Button btnDonate; + private System.Windows.Forms.Panel panelSettings; + } +} diff --git a/MSCFixer/Views/AboutView.cs b/MSCFixer/Views/AboutView.cs new file mode 100644 index 0000000..3d33afa --- /dev/null +++ b/MSCFixer/Views/AboutView.cs @@ -0,0 +1,67 @@ +using Crapfixer; +using MSCFixer.Views; +using System; +using System.Diagnostics; +using System.Windows.Forms; + +namespace Views +{ + public partial class AboutView : UserControl + + { + + public AboutView() + { + InitializeComponent(); + InitializeUI(); + } + + private void InitializeUI() + { + // Update version label + this.lblVersionInfo.Text = $"v{Program.GetAppVersion()} "; + } + + private void linkGitHub_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + Process.Start("https://github.com/builtbybel/Crapfixer/releases"); + } + + private void btnDonate_Click(object sender, EventArgs e) + { + var result = MessageBox.Show( + "Hi! I'm building Crapfixer solo. Want to support me and help launch Version 1.0?", + "Support Crapfixer ❤️", + MessageBoxButtons.YesNo, + MessageBoxIcon.Information); + + if (result == DialogResult.Yes) + { + var donationChoice = MessageBox.Show( + "Would you like to donate via PayPal? (Click No for Ko-fi)", + "Choose Your Support Method", + MessageBoxButtons.YesNoCancel, + MessageBoxIcon.Question); + + if (donationChoice == DialogResult.Yes) + { + System.Diagnostics.Process.Start(new ProcessStartInfo + { + FileName = "https://www.paypal.com/donate/?hosted_button_id=M9DW4VNKH9ECQ", + UseShellExecute = true + }); + } + else if (donationChoice == DialogResult.No) + { + System.Diagnostics.Process.Start(new ProcessStartInfo + { + FileName = "https://ko-fi.com/builtbybel", + UseShellExecute = true + }); + } + } + } + + + } +} \ No newline at end of file diff --git a/MSCFixer/Views/AboutView.resx b/MSCFixer/Views/AboutView.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/MSCFixer/Views/AboutView.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSCFixer/Views/OptionsView.Designer.cs b/MSCFixer/Views/OptionsView.Designer.cs new file mode 100644 index 0000000..6e8a797 --- /dev/null +++ b/MSCFixer/Views/OptionsView.Designer.cs @@ -0,0 +1,108 @@ +namespace MSCFixer.Views +{ + partial class OptionsView + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Komponenten-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + this.panelSettings = new System.Windows.Forms.Panel(); + this.panelSubContent = new System.Windows.Forms.Panel(); + this.btnAboutMenu = new System.Windows.Forms.Button(); + this.btnSettingsMenu = new System.Windows.Forms.Button(); + this.panelSettings.SuspendLayout(); + this.SuspendLayout(); + // + // panelSettings + // + this.panelSettings.BackColor = System.Drawing.Color.White; + this.panelSettings.Controls.Add(this.panelSubContent); + this.panelSettings.Controls.Add(this.btnAboutMenu); + this.panelSettings.Controls.Add(this.btnSettingsMenu); + this.panelSettings.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelSettings.Location = new System.Drawing.Point(0, 0); + this.panelSettings.Name = "panelSettings"; + this.panelSettings.Size = new System.Drawing.Size(625, 395); + this.panelSettings.TabIndex = 243; + // + // panelSubContent + // + this.panelSubContent.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panelSubContent.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panelSubContent.Location = new System.Drawing.Point(135, 14); + this.panelSubContent.Name = "panelSubContent"; + this.panelSubContent.Size = new System.Drawing.Size(474, 363); + this.panelSubContent.TabIndex = 246; + // + // btnAboutMenu + // + this.btnAboutMenu.BackColor = System.Drawing.Color.White; + this.btnAboutMenu.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnAboutMenu.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnAboutMenu.Font = new System.Drawing.Font("Tahoma", 8F); + this.btnAboutMenu.Location = new System.Drawing.Point(14, 53); + this.btnAboutMenu.Name = "btnAboutMenu"; + this.btnAboutMenu.Size = new System.Drawing.Size(107, 34); + this.btnAboutMenu.TabIndex = 242; + this.btnAboutMenu.Text = "About"; + this.btnAboutMenu.UseVisualStyleBackColor = false; + this.btnAboutMenu.Click += new System.EventHandler(this.btnAboutMenu_Click); + // + // btnSettingsMenu + // + this.btnSettingsMenu.BackColor = System.Drawing.Color.White; + this.btnSettingsMenu.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnSettingsMenu.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSettingsMenu.Font = new System.Drawing.Font("Tahoma", 8F); + this.btnSettingsMenu.Location = new System.Drawing.Point(14, 13); + this.btnSettingsMenu.Name = "btnSettingsMenu"; + this.btnSettingsMenu.Size = new System.Drawing.Size(107, 34); + this.btnSettingsMenu.TabIndex = 241; + this.btnSettingsMenu.Text = "Settings"; + this.btnSettingsMenu.UseVisualStyleBackColor = false; + this.btnSettingsMenu.Click += new System.EventHandler(this.btnSettingsMenu_Click); + // + // OptionsView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.panelSettings); + this.Name = "OptionsView"; + this.Size = new System.Drawing.Size(625, 395); + this.panelSettings.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panelSettings; + private System.Windows.Forms.Button btnSettingsMenu; + private System.Windows.Forms.Button btnAboutMenu; + private System.Windows.Forms.Panel panelSubContent; + } +} diff --git a/MSCFixer/Views/OptionsView.cs b/MSCFixer/Views/OptionsView.cs new file mode 100644 index 0000000..a4c1884 --- /dev/null +++ b/MSCFixer/Views/OptionsView.cs @@ -0,0 +1,28 @@ +using System; +using System.Windows.Forms; +using Views; + +namespace MSCFixer.Views +{ + public partial class OptionsView : UserControl + { + private NavigationManager subNavigation; + + public OptionsView(NavigationManager navigationManager) + { + InitializeComponent(); + subNavigation = new NavigationManager(panelSubContent); + subNavigation.SwitchView(new AboutView()); // Startsite + } + + private void btnAboutMenu_Click(object sender, EventArgs e) + { + subNavigation.SwitchView(new AboutView()); + } + + private void btnSettingsMenu_Click(object sender, EventArgs e) + { + subNavigation.SwitchView(new SettingsView()); + } + } +} \ No newline at end of file diff --git a/MSCFixer/Views/OptionsView.resx b/MSCFixer/Views/OptionsView.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/MSCFixer/Views/OptionsView.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSCFixer/Views/SettingsView.Designer.cs b/MSCFixer/Views/SettingsView.Designer.cs index dd781cf..fbed524 100644 --- a/MSCFixer/Views/SettingsView.Designer.cs +++ b/MSCFixer/Views/SettingsView.Designer.cs @@ -1,4 +1,4 @@ -namespace Views +namespace MSCFixer.Views { partial class SettingsView { @@ -28,159 +28,72 @@ /// private void InitializeComponent() { - this.lblHeader = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.lblVersionInfo = new System.Windows.Forms.Label(); - this.linkGitHub = new System.Windows.Forms.LinkLabel(); - this.btnDonate = new System.Windows.Forms.Button(); - this.panelSettings = new System.Windows.Forms.Panel(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.checkBox2 = new System.Windows.Forms.CheckBox(); this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.panelSettings.SuspendLayout(); this.SuspendLayout(); // - // lblHeader + // checkBox1 // - this.lblHeader.AutoEllipsis = true; - this.lblHeader.AutoSize = true; - this.lblHeader.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Bold); - this.lblHeader.ForeColor = System.Drawing.Color.Black; - this.lblHeader.Location = new System.Drawing.Point(195, 16); - this.lblHeader.Name = "lblHeader"; - this.lblHeader.Size = new System.Drawing.Size(69, 21); - this.lblHeader.TabIndex = 235; - this.lblHeader.Text = "Crapfixer"; - this.lblHeader.UseCompatibleTextRendering = true; + this.checkBox1.AutoSize = true; + this.checkBox1.Checked = true; + this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox1.Enabled = false; + this.checkBox1.Location = new System.Drawing.Point(15, 44); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(135, 17); + this.checkBox1.TabIndex = 0; + this.checkBox1.Text = "Save settings to INI file"; + this.checkBox1.UseVisualStyleBackColor = true; // - // label1 + // checkBox2 // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label1.AutoEllipsis = true; - this.label1.Location = new System.Drawing.Point(168, 118); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(454, 26); - this.label1.TabIndex = 236; - this.label1.Text = "You can download the latest version, report bugs and submit feature requests at t" + - "he following GitHub page."; - // - // pictureBox1 - // - this.pictureBox1.Image = global::MSCFixer.Properties.Resources.AppIcon32; - this.pictureBox1.Location = new System.Drawing.Point(152, 16); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(37, 34); - this.pictureBox1.TabIndex = 237; - this.pictureBox1.TabStop = false; - // - // lblVersionInfo - // - this.lblVersionInfo.AutoSize = true; - this.lblVersionInfo.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F); - this.lblVersionInfo.ForeColor = System.Drawing.Color.Black; - this.lblVersionInfo.Location = new System.Drawing.Point(195, 37); - this.lblVersionInfo.Name = "lblVersionInfo"; - this.lblVersionInfo.Size = new System.Drawing.Size(13, 13); - this.lblVersionInfo.TabIndex = 238; - this.lblVersionInfo.Text = "v"; - // - // linkGitHub - // - this.linkGitHub.AutoSize = true; - this.linkGitHub.Location = new System.Drawing.Point(183, 156); - this.linkGitHub.Name = "linkGitHub"; - this.linkGitHub.Size = new System.Drawing.Size(190, 13); - this.linkGitHub.TabIndex = 239; - this.linkGitHub.TabStop = true; - this.linkGitHub.Text = "https://github.com/builtbybel/Crapfixer"; - this.linkGitHub.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkGitHub_LinkClicked); - // - // btnDonate - // - this.btnDonate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(131)))), ((int)(((byte)(222))))); - this.btnDonate.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnDonate.FlatAppearance.BorderSize = 0; - this.btnDonate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnDonate.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnDonate.ForeColor = System.Drawing.Color.White; - this.btnDonate.Location = new System.Drawing.Point(194, 65); - this.btnDonate.Name = "btnDonate"; - this.btnDonate.Size = new System.Drawing.Size(207, 39); - this.btnDonate.TabIndex = 240; - this.btnDonate.Text = "Like Crapfixer? Support future updates on Ko-fi or PayPal"; - this.btnDonate.UseVisualStyleBackColor = false; - this.btnDonate.Click += new System.EventHandler(this.btnDonate_Click); - // - // panelSettings - // - this.panelSettings.Controls.Add(this.button1); - this.panelSettings.Controls.Add(this.btnDonate); - this.panelSettings.Controls.Add(this.lblHeader); - this.panelSettings.Controls.Add(this.linkGitHub); - this.panelSettings.Controls.Add(this.label1); - this.panelSettings.Controls.Add(this.lblVersionInfo); - this.panelSettings.Controls.Add(this.pictureBox1); - this.panelSettings.Controls.Add(this.button2); - this.panelSettings.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelSettings.Location = new System.Drawing.Point(0, 0); - this.panelSettings.Name = "panelSettings"; - this.panelSettings.Size = new System.Drawing.Size(625, 395); - this.panelSettings.TabIndex = 242; + this.checkBox2.AutoSize = true; + this.checkBox2.Checked = true; + this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox2.Enabled = false; + this.checkBox2.Location = new System.Drawing.Point(15, 67); + this.checkBox2.Name = "checkBox2"; + this.checkBox2.Size = new System.Drawing.Size(211, 17); + this.checkBox2.TabIndex = 1; + this.checkBox2.Text = "Activate Plugins for PowerShell Tooling"; + this.checkBox2.UseVisualStyleBackColor = true; // // button1 // - this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(242)))), ((int)(((byte)(242))))); - this.button1.Enabled = false; - this.button1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button1.BackColor = System.Drawing.Color.WhiteSmoke; + this.button1.FlatAppearance.BorderColor = System.Drawing.Color.Gainsboro; this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Font = new System.Drawing.Font("Tahoma", 8F); - this.button1.Location = new System.Drawing.Point(10, 53); + this.button1.Location = new System.Drawing.Point(15, 10); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(107, 34); - this.button1.TabIndex = 241; - this.button1.Text = "Settings"; + this.button1.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0); + this.button1.Size = new System.Drawing.Size(594, 25); + this.button1.TabIndex = 2; + this.button1.Text = "Basic settings"; + this.button1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button1.UseVisualStyleBackColor = false; // - // button2 - // - this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(242)))), ((int)(((byte)(242))))); - this.button2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("Tahoma", 8F); - this.button2.Location = new System.Drawing.Point(10, 13); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(107, 34); - this.button2.TabIndex = 242; - this.button2.Text = "About"; - this.button2.UseVisualStyleBackColor = false; - // // SettingsView // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.AutoScroll = true; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.panelSettings); + this.Controls.Add(this.button1); + this.Controls.Add(this.checkBox2); + this.Controls.Add(this.checkBox1); this.Name = "SettingsView"; this.Size = new System.Drawing.Size(625, 395); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.panelSettings.ResumeLayout(false); - this.panelSettings.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion - private System.Windows.Forms.Label lblHeader; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.Label lblVersionInfo; - private System.Windows.Forms.LinkLabel linkGitHub; - private System.Windows.Forms.Button btnDonate; - private System.Windows.Forms.Panel panelSettings; + + private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.CheckBox checkBox2; private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button button2; } } diff --git a/MSCFixer/Views/SettingsView.cs b/MSCFixer/Views/SettingsView.cs index 6060150..bf86eb0 100644 --- a/MSCFixer/Views/SettingsView.cs +++ b/MSCFixer/Views/SettingsView.cs @@ -3,65 +3,15 @@ using System; using System.Diagnostics; using System.Windows.Forms; -namespace Views +namespace MSCFixer.Views { public partial class SettingsView : UserControl - { - private NavigationManager navigationManager; - - public SettingsView(NavigationManager navigationManager) + public SettingsView() { InitializeComponent(); - this.navigationManager = navigationManager; - InitializeUI(); - } - - private void InitializeUI() - { - // Update version label - this.lblVersionInfo.Text = $"v{Program.GetCurrentVersionTostring()} "; - } - - private void linkGitHub_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - Process.Start("https://github.com/builtbybel/Crapfixer/releases"); - } - - private void btnDonate_Click(object sender, EventArgs e) - { - var result = MessageBox.Show( - "Hi! I'm building Crapfixer solo. Want to support me and help launch Version 1.0?", - "Support Crapfixer ❤️", - MessageBoxButtons.YesNo, - MessageBoxIcon.Information); - - if (result == DialogResult.Yes) - { - var donationChoice = MessageBox.Show( - "Would you like to donate via PayPal? (Click No for Ko-fi)", - "Choose Your Support Method", - MessageBoxButtons.YesNoCancel, - MessageBoxIcon.Question); - - if (donationChoice == DialogResult.Yes) - { - System.Diagnostics.Process.Start(new ProcessStartInfo - { - FileName = "https://www.paypal.com/donate/?hosted_button_id=M9DW4VNKH9ECQ", - UseShellExecute = true - }); - } - else if (donationChoice == DialogResult.No) - { - System.Diagnostics.Process.Start(new ProcessStartInfo - { - FileName = "https://ko-fi.com/builtbybel", - UseShellExecute = true - }); - } - } } + } } \ No newline at end of file From 9f6eac9f311fb7b7933b1b05aaef29295e54f697 Mon Sep 17 00:00:00 2001 From: Belim Date: Sat, 10 May 2025 14:13:49 +0200 Subject: [PATCH 11/17] Update update-check.html --- docs/update-check.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/update-check.html b/docs/update-check.html index 4a1e330..65b5c00 100644 --- a/docs/update-check.html +++ b/docs/update-check.html @@ -61,7 +61,7 @@ From f4abebeb166cc0aa1f4290d19651555005781b2d Mon Sep 17 00:00:00 2001 From: Belim Date: Sat, 10 May 2025 14:24:57 +0200 Subject: [PATCH 15/17] Update update-check.html --- docs/update-check.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/update-check.html b/docs/update-check.html index 4b4e271..420f7f9 100644 --- a/docs/update-check.html +++ b/docs/update-check.html @@ -51,14 +51,14 @@ } .project-follow a { padding: 10px 20px; - background-color: #0077cc; + background-color: #24292f; /* GitHub Dark Blue */ color: white; border-radius: 5px; text-decoration: none; font-size: 16px; } .project-follow a:hover { - background-color: #005fa3; + background-color: #0366d6; /* GitHub Blue */ } @@ -76,7 +76,7 @@