push 0.60-live

This commit is contained in:
Belim
2025-05-10 14:13:15 +02:00
parent 1ea9f94e16
commit c5b77a463c
19 changed files with 718 additions and 219 deletions
+1 -1
View File
@@ -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()
+2 -1
View File
@@ -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);
}
}
}
}
+22 -4
View File
@@ -56,7 +56,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AppManagerService.cs" />
<Compile Include="FeatureManager.cs" />
<Compile Include="Features\FeatureManager.cs" />
<Compile Include="Features\Edge\BrowserSignin.cs" />
<Compile Include="Features\Edge\DefaultTopSites.cs" />
<Compile Include="Features\Edge\DefautBrowserSetting.cs" />
@@ -94,8 +94,8 @@
<Compile Include="PluginManager.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="FeatureBase.cs" />
<Compile Include="FeatureNode.cs" />
<Compile Include="Features\FeatureBase.cs" />
<Compile Include="Features\FeatureNode.cs" />
<Compile Include="Features\Ads\FileExlorerAds.cs" />
<Compile Include="Features\Ads\FinishSetupAds.cs" />
<Compile Include="Features\Ads\LockScreenAds.cs" />
@@ -123,12 +123,24 @@
<Compile Include="Features\UI\ShowTaskViewButton.cs" />
<Compile Include="Features\UI\StartLayout.cs" />
<Compile Include="Features\UI\TaskbarAlignment.cs" />
<Compile Include="Views\AboutView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Views\AboutView.Designer.cs">
<DependentUpon>AboutView.cs</DependentUpon>
</Compile>
<Compile Include="Views\SettingsView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Views\SettingsView.Designer.cs">
<DependentUpon>SettingsView.cs</DependentUpon>
</Compile>
<Compile Include="Views\OptionsView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Views\OptionsView.Designer.cs">
<DependentUpon>OptionsView.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
@@ -137,11 +149,17 @@
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Views\AboutView.resx">
<DependentUpon>AboutView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Views\SettingsView.resx">
<DependentUpon>SettingsView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Views\OptionsView.resx">
<DependentUpon>OptionsView.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" />
<Compile Include="FeatureLoader.cs" />
<Compile Include="Features\FeatureLoader.cs" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
+19 -18
View File
@@ -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;
+13 -2
View File
@@ -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
});
}
}
}
+16 -7
View File
@@ -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
{
/// <summary>
/// Get app version
/// </summary>
internal static string GetCurrentVersionTostring() => new Version(Application.ProductVersion).ToString(3);
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
/// <summary>
/// Retrieves the version of the app
/// </summary>
/// <returns>The application version in the format "major.minor.build"</returns>
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}";
}
}
}
}
+2 -2
View File
@@ -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")]
+153
View File
@@ -0,0 +1,153 @@
namespace Views
{
partial class AboutView
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
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;
}
}
+67
View File
@@ -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
});
}
}
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+108
View File
@@ -0,0 +1,108 @@
namespace MSCFixer.Views
{
partial class OptionsView
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
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;
}
}
+28
View File
@@ -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());
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+44 -131
View File
@@ -1,4 +1,4 @@
namespace Views
namespace MSCFixer.Views
{
partial class SettingsView
{
@@ -28,159 +28,72 @@
/// </summary>
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;
}
}
+3 -53
View File
@@ -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
});
}
}
}
}
}