diff --git a/CpuCheckNative/CpuCheckNative.vcxproj b/CpuCheckNative/CpuCheckNative.vcxproj new file mode 100644 index 0000000..d8f92aa --- /dev/null +++ b/CpuCheckNative/CpuCheckNative.vcxproj @@ -0,0 +1,161 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {a2038e07-e21f-4b05-b811-3052a2b014bc} + CpuCheckNative + 10.0 + + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(ProjectName) + + + + Level3 + true + WIN32;_DEBUG;CPUCHECKNATIVE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + + + + + Level3 + true + true + true + WIN32;NDEBUG;CPUCHECKNATIVE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + true + true + false + + + + + Level3 + true + _DEBUG;CPUCHECKNATIVE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + + + + + Level3 + true + true + true + NDEBUG;CPUCHECKNATIVE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + true + true + false + + + + + + + + + + Create + Create + Create + Create + + + + + + + \ No newline at end of file diff --git a/CpuCheckNative/CpuCheckNative.vcxproj.filters b/CpuCheckNative/CpuCheckNative.vcxproj.filters new file mode 100644 index 0000000..7b15837 --- /dev/null +++ b/CpuCheckNative/CpuCheckNative.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Headerdateien + + + Headerdateien + + + + + Quelldateien + + + Quelldateien + + + Quelldateien + + + \ No newline at end of file diff --git a/CpuCheckNative/PopcntCheck.cpp b/CpuCheckNative/PopcntCheck.cpp new file mode 100644 index 0000000..0fc71b6 --- /dev/null +++ b/CpuCheckNative/PopcntCheck.cpp @@ -0,0 +1,20 @@ +#include "pch.h" +#include + +extern "C" __declspec(dllexport) bool __cdecl HasPopcnt() +{ + int cpuInfo[4] = { 0 }; + + // Get CPU info by calling __cpuid, which fills the cpuInfo array with CPU feature flags + __cpuid(cpuInfo, 1); + + // Check if the processor supports SSE4.2 (bit 20 of the ECX register) + bool hasSSE42 = (cpuInfo[2] & (1 << 20)) != 0; + + // Check if the processor supports POPCNT (bit 23 of the ECX register) + bool hasPOPCNT = (cpuInfo[2] & (1 << 23)) != 0; + + // POPCNT is the critical instruction for Windows 11 upgrade compatibility!! + // If both SSE4.2 and POPCNT are supported, yeah we can return true; otherwise, false + return hasSSE42 && hasPOPCNT; +} diff --git a/CpuCheckNative/dllmain.cpp b/CpuCheckNative/dllmain.cpp new file mode 100644 index 0000000..3b33069 --- /dev/null +++ b/CpuCheckNative/dllmain.cpp @@ -0,0 +1,19 @@ +// dllmain.cpp : Definiert den Einstiegspunkt für die DLL-Anwendung. +#include "pch.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/CpuCheckNative/framework.h b/CpuCheckNative/framework.h new file mode 100644 index 0000000..c0766ad --- /dev/null +++ b/CpuCheckNative/framework.h @@ -0,0 +1,5 @@ +#pragma once + +#define WIN32_LEAN_AND_MEAN // Selten verwendete Komponenten aus Windows-Headern ausschließen +// Windows-Headerdateien +#include diff --git a/CpuCheckNative/pch.cpp b/CpuCheckNative/pch.cpp new file mode 100644 index 0000000..1fcbac0 --- /dev/null +++ b/CpuCheckNative/pch.cpp @@ -0,0 +1,5 @@ +// pch.cpp: Quelldatei, die dem vorkompilierten Header entspricht + +#include "pch.h" + +// Bei der Verwendung vorkompilierter Header ist diese Quelldatei für eine erfolgreiche Kompilierung erforderlich. diff --git a/CpuCheckNative/pch.h b/CpuCheckNative/pch.h new file mode 100644 index 0000000..e89772d --- /dev/null +++ b/CpuCheckNative/pch.h @@ -0,0 +1,13 @@ +// pch.h: Dies ist eine vorkompilierte Headerdatei. +// Die unten aufgeführten Dateien werden nur einmal kompiliert, um die Buildleistung für zukünftige Builds zu verbessern. +// Dies wirkt sich auch auf die IntelliSense-Leistung aus, Codevervollständigung und viele Features zum Durchsuchen von Code eingeschlossen. +// Die hier aufgeführten Dateien werden jedoch ALLE neu kompiliert, wenn mindestens eine davon zwischen den Builds aktualisiert wird. +// Fügen Sie hier keine Dateien hinzu, die häufig aktualisiert werden sollen, da sich so der Leistungsvorteil ins Gegenteil verkehrt. + +#ifndef PCH_H +#define PCH_H + +// Fügen Sie hier Header hinzu, die vorkompiliert werden sollen. +#include "framework.h" + +#endif //PCH_H diff --git a/FlybyScript/CanIUpgradeView.Designer.cs b/FlybyScript/CanIUpgradeView.Designer.cs index e5fea03..e77f43e 100644 --- a/FlybyScript/CanIUpgradeView.Designer.cs +++ b/FlybyScript/CanIUpgradeView.Designer.cs @@ -29,18 +29,18 @@ private void InitializeComponent() { this.btnBack = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.linkPCHealthCheckApp = new System.Windows.Forms.LinkLabel(); + this.lblPtHdr = new System.Windows.Forms.Label(); + this.lblPtAns = new System.Windows.Forms.Label(); + this.lblPtHdr2 = new System.Windows.Forms.Label(); + this.lblPtAns3 = new System.Windows.Forms.Label(); + this.linkPtAns3 = new System.Windows.Forms.LinkLabel(); this.statusLabel = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); + this.lblPtAns4 = new System.Windows.Forms.Label(); this.btnWindowsUpdate = new System.Windows.Forms.Button(); - this.linkHardwareSpecs = new System.Windows.Forms.LinkLabel(); - this.label3 = new System.Windows.Forms.Label(); + this.linkPtAns2 = new System.Windows.Forms.LinkLabel(); + this.lblPtAns2 = new System.Windows.Forms.Label(); this.btnPatch = new System.Windows.Forms.Button(); - this.label7 = new System.Windows.Forms.Label(); + this.lblPtAns5 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // btnBack @@ -50,7 +50,7 @@ this.btnBack.FlatAppearance.BorderSize = 0; this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnBack.Font = new System.Drawing.Font("Segoe MDL2 Assets", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnBack.ForeColor = System.Drawing.Color.DarkGray; + this.btnBack.ForeColor = System.Drawing.Color.DimGray; this.btnBack.Location = new System.Drawing.Point(0, 0); this.btnBack.Name = "btnBack"; this.btnBack.Size = new System.Drawing.Size(34, 29); @@ -59,82 +59,80 @@ this.btnBack.UseVisualStyleBackColor = true; this.btnBack.Click += new System.EventHandler(this.btnBack_Click); // - // label1 + // lblPtHdr // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.lblPtHdr.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.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.ForeColor = System.Drawing.Color.Black; - this.label1.Location = new System.Drawing.Point(12, 55); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(534, 17); - this.label1.TabIndex = 233; - this.label1.Text = "An existing Windows 10 device can be upgraded to Windows 11 if it meets the follo" + + this.lblPtHdr.AutoEllipsis = true; + this.lblPtHdr.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblPtHdr.ForeColor = System.Drawing.Color.Black; + this.lblPtHdr.Location = new System.Drawing.Point(12, 55); + this.lblPtHdr.Name = "lblPtHdr"; + this.lblPtHdr.Size = new System.Drawing.Size(534, 17); + this.lblPtHdr.TabIndex = 233; + this.lblPtHdr.Text = "An existing Windows 10 device can be upgraded to Windows 11 if it meets the follo" + "wing criteria:"; // - // label2 + // lblPtAns // - this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.lblPtAns.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.label2.AutoEllipsis = true; - this.label2.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(33, 89); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(513, 36); - this.label2.TabIndex = 234; - this.label2.Text = "1. The device is running a currently supported version of Windows 10. If the devi" + + this.lblPtAns.AutoEllipsis = true; + this.lblPtAns.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblPtAns.Location = new System.Drawing.Point(33, 89); + this.lblPtAns.Name = "lblPtAns"; + this.lblPtAns.Size = new System.Drawing.Size(513, 36); + this.lblPtAns.TabIndex = 234; + this.lblPtAns.Text = "1. The device is running a currently supported version of Windows 10. If the devi" + "ce isn\'t currently running a supported version of Windows 10, upgrade to a suppo" + "rted version of Windows 10."; // - // label4 + // lblPtHdr2 // - this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.lblPtHdr2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.label4.AutoEllipsis = true; - this.label4.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.ForeColor = System.Drawing.Color.Black; - this.label4.Location = new System.Drawing.Point(12, 161); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(534, 17); - this.label4.TabIndex = 236; - this.label4.Text = "To see if a Windows 10 device is eligible to upgrade to Windows 11, follow one of" + + this.lblPtHdr2.AutoEllipsis = true; + this.lblPtHdr2.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblPtHdr2.ForeColor = System.Drawing.Color.Black; + this.lblPtHdr2.Location = new System.Drawing.Point(12, 161); + this.lblPtHdr2.Name = "lblPtHdr2"; + this.lblPtHdr2.Size = new System.Drawing.Size(534, 17); + this.lblPtHdr2.TabIndex = 236; + this.lblPtHdr2.Text = "To see if a Windows 10 device is eligible to upgrade to Windows 11, follow one of" + " these options:"; + this.lblPtHdr2.Click += new System.EventHandler(this.lblPtHdr2_Click); // - // label5 + // lblPtAns3 // - this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.lblPtAns3.AutoEllipsis = true; + this.lblPtAns3.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblPtAns3.Location = new System.Drawing.Point(33, 194); + this.lblPtAns3.Name = "lblPtAns3"; + this.lblPtAns3.Size = new System.Drawing.Size(135, 16); + this.lblPtAns3.TabIndex = 237; + this.lblPtAns3.Text = "1. Download and run the"; + // + // linkPtAns3 + // + this.linkPtAns3.ActiveLinkColor = System.Drawing.Color.RoyalBlue; + this.linkPtAns3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.label5.AutoEllipsis = true; - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.Location = new System.Drawing.Point(33, 194); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(135, 16); - this.label5.TabIndex = 237; - this.label5.Text = "1. Download and run the"; - // - // linkPCHealthCheckApp - // - this.linkPCHealthCheckApp.ActiveLinkColor = System.Drawing.Color.RoyalBlue; - this.linkPCHealthCheckApp.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.linkPCHealthCheckApp.AutoEllipsis = true; - this.linkPCHealthCheckApp.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.linkPCHealthCheckApp.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; - this.linkPCHealthCheckApp.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(103)))), ((int)(((byte)(180))))); - this.linkPCHealthCheckApp.Location = new System.Drawing.Point(165, 194); - this.linkPCHealthCheckApp.Name = "linkPCHealthCheckApp"; - this.linkPCHealthCheckApp.Size = new System.Drawing.Size(394, 16); - this.linkPCHealthCheckApp.TabIndex = 261; - this.linkPCHealthCheckApp.TabStop = true; - this.linkPCHealthCheckApp.Text = "WhyNotWin11 app to confirm your device meets the minimum system requirements"; - this.linkPCHealthCheckApp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkPCHealthCheckApp_LinkClicked); + this.linkPtAns3.AutoEllipsis = true; + this.linkPtAns3.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.linkPtAns3.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; + this.linkPtAns3.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(103)))), ((int)(((byte)(180))))); + this.linkPtAns3.Location = new System.Drawing.Point(167, 194); + this.linkPtAns3.Name = "linkPtAns3"; + this.linkPtAns3.Size = new System.Drawing.Size(394, 16); + this.linkPtAns3.TabIndex = 261; + this.linkPtAns3.TabStop = true; + this.linkPtAns3.Text = "WhyNotWin11 app to confirm your device meets the minimum system requirements"; + this.linkPtAns3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkPCHealthCheckApp_LinkClicked); // // statusLabel // this.statusLabel.AutoEllipsis = true; - this.statusLabel.BackColor = System.Drawing.Color.Gainsboro; + this.statusLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232))))); this.statusLabel.Dock = System.Windows.Forms.DockStyle.Bottom; this.statusLabel.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.statusLabel.Location = new System.Drawing.Point(0, 552); @@ -143,17 +141,17 @@ this.statusLabel.TabIndex = 262; this.statusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // label6 + // lblPtAns4 // - this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.lblPtAns4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.label6.AutoEllipsis = true; - this.label6.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label6.Location = new System.Drawing.Point(33, 220); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(523, 27); - this.label6.TabIndex = 263; - this.label6.Text = "2. Select the following Windows Update shortcut and then select the Check for upd" + + this.lblPtAns4.AutoEllipsis = true; + this.lblPtAns4.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblPtAns4.Location = new System.Drawing.Point(33, 220); + this.lblPtAns4.Name = "lblPtAns4"; + this.lblPtAns4.Size = new System.Drawing.Size(523, 27); + this.lblPtAns4.TabIndex = 263; + this.lblPtAns4.Text = "2. Select the following Windows Update shortcut and then select the Check for upd" + "ates button:"; // // btnWindowsUpdate @@ -176,33 +174,30 @@ this.btnWindowsUpdate.UseVisualStyleBackColor = false; this.btnWindowsUpdate.Click += new System.EventHandler(this.btnWindowsUpdate_Click); // - // linkHardwareSpecs + // linkPtAns2 // - this.linkHardwareSpecs.ActiveLinkColor = System.Drawing.Color.RoyalBlue; - this.linkHardwareSpecs.AutoEllipsis = true; - this.linkHardwareSpecs.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.linkHardwareSpecs.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; - this.linkHardwareSpecs.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(103)))), ((int)(((byte)(180))))); - this.linkHardwareSpecs.Location = new System.Drawing.Point(144, 134); - this.linkHardwareSpecs.Name = "linkHardwareSpecs"; - this.linkHardwareSpecs.Size = new System.Drawing.Size(402, 16); - this.linkHardwareSpecs.TabIndex = 265; - this.linkHardwareSpecs.TabStop = true; - this.linkHardwareSpecs.Text = "the minimum hardware specifications to run Windows 11."; - this.linkHardwareSpecs.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkHardwareSpecs_LinkClicked); + this.linkPtAns2.ActiveLinkColor = System.Drawing.Color.RoyalBlue; + this.linkPtAns2.AutoEllipsis = true; + this.linkPtAns2.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.linkPtAns2.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; + this.linkPtAns2.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(103)))), ((int)(((byte)(180))))); + this.linkPtAns2.Location = new System.Drawing.Point(144, 134); + this.linkPtAns2.Name = "linkPtAns2"; + this.linkPtAns2.Size = new System.Drawing.Size(402, 16); + this.linkPtAns2.TabIndex = 265; + this.linkPtAns2.TabStop = true; + this.linkPtAns2.Text = "the minimum hardware specifications to run Windows 11."; + this.linkPtAns2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkHardwareSpecs_LinkClicked); // - // label3 + // lblPtAns2 // - this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label3.AutoEllipsis = true; - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(34, 134); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(111, 16); - this.label3.TabIndex = 266; - this.label3.Text = "2. The device meets"; + this.lblPtAns2.AutoEllipsis = true; + this.lblPtAns2.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblPtAns2.Location = new System.Drawing.Point(34, 134); + this.lblPtAns2.Name = "lblPtAns2"; + this.lblPtAns2.Size = new System.Drawing.Size(111, 16); + this.lblPtAns2.TabIndex = 266; + this.lblPtAns2.Text = "2. The device meets"; // // btnPatch // @@ -224,17 +219,17 @@ this.btnPatch.UseVisualStyleBackColor = false; this.btnPatch.Click += new System.EventHandler(this.btnPatch_Click); // - // label7 + // lblPtAns5 // - this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.lblPtAns5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.label7.AutoEllipsis = true; - this.label7.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label7.Location = new System.Drawing.Point(33, 288); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(513, 40); - this.label7.TabIndex = 268; - this.label7.Text = "3. Your device does not meet the official requirements for Windows 11? You can ap" + + this.lblPtAns5.AutoEllipsis = true; + this.lblPtAns5.Font = new System.Drawing.Font("Segoe UI Variable Small Semilig", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblPtAns5.Location = new System.Drawing.Point(33, 288); + this.lblPtAns5.Name = "lblPtAns5"; + this.lblPtAns5.Size = new System.Drawing.Size(513, 40); + this.lblPtAns5.TabIndex = 268; + this.lblPtAns5.Text = "3. Your device does not meet the official requirements for Windows 11? You can ap" + "ply a compatibility patch to enable the Inplace Upgrade via Windows Update."; // // CanIUpgradeView @@ -242,18 +237,19 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScroll = true; - this.Controls.Add(this.label7); + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(248)))), ((int)(((byte)(248))))); + this.Controls.Add(this.lblPtAns5); this.Controls.Add(this.btnPatch); - this.Controls.Add(this.label3); - this.Controls.Add(this.linkHardwareSpecs); + this.Controls.Add(this.lblPtAns2); + this.Controls.Add(this.linkPtAns2); this.Controls.Add(this.btnWindowsUpdate); - this.Controls.Add(this.label6); + this.Controls.Add(this.lblPtAns4); this.Controls.Add(this.statusLabel); - this.Controls.Add(this.linkPCHealthCheckApp); - this.Controls.Add(this.label5); - this.Controls.Add(this.label4); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); + this.Controls.Add(this.linkPtAns3); + this.Controls.Add(this.lblPtAns3); + this.Controls.Add(this.lblPtHdr2); + this.Controls.Add(this.lblPtAns); + this.Controls.Add(this.lblPtHdr); this.Controls.Add(this.btnBack); this.Name = "CanIUpgradeView"; this.Size = new System.Drawing.Size(561, 585); @@ -265,17 +261,17 @@ #endregion private System.Windows.Forms.Button btnBack; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.LinkLabel linkPCHealthCheckApp; + private System.Windows.Forms.Label lblPtHdr; + private System.Windows.Forms.Label lblPtAns; + private System.Windows.Forms.Label lblPtHdr2; + private System.Windows.Forms.Label lblPtAns3; + private System.Windows.Forms.LinkLabel linkPtAns3; private System.Windows.Forms.Label statusLabel; - private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label lblPtAns4; private System.Windows.Forms.Button btnWindowsUpdate; - private System.Windows.Forms.LinkLabel linkHardwareSpecs; - private System.Windows.Forms.Label label3; + private System.Windows.Forms.LinkLabel linkPtAns2; + private System.Windows.Forms.Label lblPtAns2; private System.Windows.Forms.Button btnPatch; - private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label lblPtAns5; } } diff --git a/FlybyScript/CanIUpgradeView.cs b/FlybyScript/CanIUpgradeView.cs index 890ea6b..14b8762 100644 --- a/FlybyScript/CanIUpgradeView.cs +++ b/FlybyScript/CanIUpgradeView.cs @@ -15,10 +15,24 @@ namespace Flyby11 { InitializeComponent(); isoHandler = new IsoHandler(UpdateStatusLabel); - + InitializeLocalizedStrings(); SetStyle(); } + private void InitializeLocalizedStrings() + { + lblPtHdr.Text = Locales.Strings.ciuView_lblPtHdr; + lblPtHdr2.Text = Locales.Strings.ciuView_lblPtHdr2; + lblPtAns.Text = Locales.Strings.ciuView_lblPtAns; + lblPtAns2.Text = Locales.Strings.ciuView_lblPtAns2; + lblPtAns3.Text = Locales.Strings.ciuView_lblPtAns3; + lblPtAns4.Text = Locales.Strings.ciuView_lblPtAns4; + lblPtAns5.Text = Locales.Strings.ciuView_lblPtAns5; + linkPtAns2.Text = Locales.Strings.ciuView_linkPtAns2; // PC Health Check app + linkPtAns3.Text = Locales.Strings.ciuView_linkPtAns3; // Hardware requirements + + } + private void SetStyle() { // Segoe MDL2 Assets @@ -233,5 +247,10 @@ namespace Flyby11 return false; } } + + private void lblPtHdr2_Click(object sender, EventArgs e) + { + + } } } \ No newline at end of file diff --git a/FlybyScript/ClippyUI.Designer.cs b/FlybyScript/ClippyUI.Designer.cs new file mode 100644 index 0000000..042d1a5 --- /dev/null +++ b/FlybyScript/ClippyUI.Designer.cs @@ -0,0 +1,113 @@ +namespace Flyby11 +{ + partial class ClippyUI + { + /// + /// 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 Windows Form-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.components = new System.ComponentModel.Container(); + this.assetClippy = new System.Windows.Forms.PictureBox(); + this.lblClosePane = new System.Windows.Forms.Label(); + this.lblHelp = new System.Windows.Forms.Label(); + this.tt = new System.Windows.Forms.ToolTip(this.components); + ((System.ComponentModel.ISupportInitialize)(this.assetClippy)).BeginInit(); + this.SuspendLayout(); + // + // assetClippy + // + this.assetClippy.Dock = System.Windows.Forms.DockStyle.Fill; + this.assetClippy.Location = new System.Drawing.Point(0, 0); + this.assetClippy.Name = "assetClippy"; + this.assetClippy.Size = new System.Drawing.Size(163, 160); + this.assetClippy.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.assetClippy.TabIndex = 0; + this.assetClippy.TabStop = false; + this.assetClippy.MouseDown += new System.Windows.Forms.MouseEventHandler(this.assetClippy_MouseDown); + this.assetClippy.MouseMove += new System.Windows.Forms.MouseEventHandler(this.assetClippy_MouseMove); + // + // lblClosePane + // + this.lblClosePane.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.lblClosePane.AutoEllipsis = true; + this.lblClosePane.AutoSize = true; + this.lblClosePane.Cursor = System.Windows.Forms.Cursors.Hand; + this.lblClosePane.Font = new System.Drawing.Font("Segoe MDL2 Assets", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblClosePane.ForeColor = System.Drawing.Color.DimGray; + this.lblClosePane.Location = new System.Drawing.Point(137, 9); + this.lblClosePane.Name = "lblClosePane"; + this.lblClosePane.Size = new System.Drawing.Size(19, 13); + this.lblClosePane.TabIndex = 4; + this.lblClosePane.Text = "..."; + this.lblClosePane.Click += new System.EventHandler(this.lblClosePane_Click); + // + // lblHelp + // + this.lblHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.lblHelp.AutoEllipsis = true; + this.lblHelp.AutoSize = true; + this.lblHelp.Cursor = System.Windows.Forms.Cursors.Hand; + this.lblHelp.Font = new System.Drawing.Font("Segoe MDL2 Assets", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblHelp.ForeColor = System.Drawing.Color.DeepPink; + this.lblHelp.Location = new System.Drawing.Point(112, 9); + this.lblHelp.Name = "lblHelp"; + this.lblHelp.Size = new System.Drawing.Size(19, 13); + this.lblHelp.TabIndex = 5; + this.lblHelp.Text = "..."; + this.tt.SetToolTip(this.lblHelp, "Need more help?"); + this.lblHelp.Click += new System.EventHandler(this.lblHelp_Click); + // + // tt + // + this.tt.IsBalloon = true; + // + // ClippyUI + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(163, 160); + this.ControlBox = false; + this.Controls.Add(this.lblHelp); + this.Controls.Add(this.lblClosePane); + this.Controls.Add(this.assetClippy); + this.Name = "ClippyUI"; + this.Opacity = 0.9D; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + ((System.ComponentModel.ISupportInitialize)(this.assetClippy)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.PictureBox assetClippy; + private System.Windows.Forms.Label lblClosePane; + private System.Windows.Forms.Label lblHelp; + private System.Windows.Forms.ToolTip tt; + } +} + diff --git a/FlybyScript/ClippyUI.cs b/FlybyScript/ClippyUI.cs new file mode 100644 index 0000000..dceaecf --- /dev/null +++ b/FlybyScript/ClippyUI.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Flyby11 +{ + public partial class ClippyUI : Form + { + private Point mouseDownLocation; + private Logger logger; + private MainForm mainForm; + + public ClippyUI(MainForm mainForm, Logger logger) + { + InitializeComponent(); + + this.mainForm = mainForm; + this.logger = logger; + + // Initialize ClippyUI appearance and position + InitializeFormAppearance(); + } + + private void InitializeFormAppearance() + { + // Segoe MDL2 Assets + lblClosePane.Text = "\uE8BB"; + lblHelp.Text = "\uE897"; + + // Remove the form border + this.FormBorderStyle = FormBorderStyle.None; + + // Take a screenshot of the desktop + Bitmap desktopScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); + using (Graphics g = Graphics.FromImage(desktopScreenshot)) + { + g.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, desktopScreenshot.Size); + } + + // Determine color of the pixel under form + Point formLocation = this.PointToScreen(Point.Empty); + Color desktopColor = desktopScreenshot.GetPixel(formLocation.X + this.Width / 2, formLocation.Y + this.Height / 2); + + // Set PictureBox properties + assetClippy.Size = new Size(150, 150); + + // Make the form transparent + this.BackColor = desktopColor; + this.TransparencyKey = desktopColor; + + // Load default Clippy image + string defaultImagePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "app", "clippy.png"); + if (File.Exists(defaultImagePath)) + { + assetClippy.Image = Image.FromFile(defaultImagePath); + } + else + { + LoadRandomCharacter(); // fallback, no picture found + } + } + + public void SetClippyPosition(Form mainForm) + { + int margin = 10; + + // Get the working area of the screen + Rectangle screenBounds = Screen.FromControl(mainForm).WorkingArea; + + // Calculate the position of the Clippy UI (right below the main form) + int x = Math.Min(mainForm.Location.X + mainForm.Width + margin, screenBounds.Right - this.Width); + int y = Math.Min(mainForm.Location.Y + mainForm.Height - this.Height, screenBounds.Bottom - this.Height); + + this.StartPosition = FormStartPosition.Manual; + this.Location = new Point(x, y); + } + + private void LoadRandomCharacter() + { + string directoryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "app\\assets"); + string[] searchPatterns = { "clippy*.png", "clippy*.gif" }; + + List matchingFiles = new List(); + foreach (string pattern in searchPatterns) + { + string[] files = Directory.GetFiles(directoryPath, pattern); + matchingFiles.AddRange(files); + } + + if (matchingFiles.Count > 0) + { + Random random = new Random(); + int randomIndex = random.Next(0, matchingFiles.Count); + string randomClippyImagePath = matchingFiles[randomIndex]; + assetClippy.Image = Image.FromFile(randomClippyImagePath); + } + else + { + MessageBox.Show("Oops! I can't work if I'm invisible. Please make sure Clippy is in the right place!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void assetClippy_MouseDown(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + mouseDownLocation = e.Location; + } + } + + // EventHandler for the MouseMove event of the Clippy image + private void assetClippy_MouseMove(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + // Update position of the SetupForm based on the movement of the Clippy image + this.Left += e.X - mouseDownLocation.X; + this.Top += e.Y - mouseDownLocation.Y; + + // Update position of the MainForm relative to the new position of the SetupForm + mainForm.Left += e.X - mouseDownLocation.X; + mainForm.Top += e.Y - mouseDownLocation.Y; + } + } + + private async void lblClosePane_Click(object sender, EventArgs e) + { + logger.Log("Looks like you're giving me the boot! No hard feelings—I'll be here if you need me again.", Color.DeepPink); + + await Task.Delay(1000); + + // Hide Clippy + this.Hide(); + } + + private void lblHelp_Click(object sender, EventArgs e) + { + mainForm._faqHandler.AddNextFAQStep(); + } + } +} \ No newline at end of file diff --git a/FlybyScript/ClippyUI.resx b/FlybyScript/ClippyUI.resx new file mode 100644 index 0000000..70f9f5f --- /dev/null +++ b/FlybyScript/ClippyUI.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + \ No newline at end of file diff --git a/FlybyScript/FAQHandler.cs b/FlybyScript/FAQHandler.cs index caa5a2c..89a1921 100644 --- a/FlybyScript/FAQHandler.cs +++ b/FlybyScript/FAQHandler.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.IO; @@ -9,48 +10,100 @@ namespace Flyby11 { public class FAQHandler { + // Reference to the panel that will display the FAQ private readonly Panel _faqPanel; + + // Delegate to update the app's status label (from main form) private readonly Action _updateStatus; + private FlowLayoutPanel _faqContentPanel; + + // List of individual FAQ entry steps (to add one by one) + private readonly List> _faqSteps = new List>(); + + private int _currentFaqStep = 0; + public FAQHandler(Panel faqPanel, Action updateStatus) { _faqPanel = faqPanel; _updateStatus = updateStatus; } + // Initializes the FAQ view with basic content only public void InitializeFAQ() { _faqPanel.AutoScroll = true; _faqPanel.Controls.Clear(); - var faqContentPanel = new FlowLayoutPanel + _faqContentPanel = new FlowLayoutPanel { Dock = DockStyle.Fill, AutoScroll = true, Padding = new Padding(10), FlowDirection = FlowDirection.TopDown, + WrapContents = false }; - AddTitle(faqContentPanel); - AddISOFAQ(faqContentPanel); - AddOtherFAQs(faqContentPanel); + // Add static FAQ content (header, ISO info, etc.) + AddTitle(_faqContentPanel); + AddISOFAQ(_faqContentPanel); - _faqPanel.Controls.Add(faqContentPanel); + _faqPanel.Controls.Add(_faqContentPanel); + + + PrepareOtherFAQSteps(); // Prepare additional entries without adding them yet + AddNextFAQStep(); // Show second FAQ entry , Donate } + // Adds the next FAQ item from the list + public void AddNextFAQStep() + { + if (_currentFaqStep < _faqSteps.Count) + { + _faqSteps[_currentFaqStep](_faqContentPanel); + _currentFaqStep++; + + // Scroll to the newly added element + var last = _faqContentPanel.Controls[_faqContentPanel.Controls.Count - 1]; + _faqContentPanel.ScrollControlIntoView(last); + // Add some space below the last element + var m =last.Margin; + last.Margin = new Padding(m.Left, m.Top, m.Right, 20); + } + else + { + _updateStatus("Well, it looks like I've done all I can here. If you need more help, you might want to reach out to the developer, Belim."); + } + } + + // Fill list with FAQ methods – each step adds one block of content + private void PrepareOtherFAQSteps() + { + _faqSteps.Clear(); + _currentFaqStep = 0; + + _faqSteps.Add(AddFaq2); + _faqSteps.Add(AddFaq3); + _faqSteps.Add(AddFaq4); + _faqSteps.Add(AddFaq5); + _faqSteps.Add(AddFaq6); + _faqSteps.Add(AddFaq7); + } + + // Adds the title section private void AddTitle(FlowLayoutPanel parent) { - AddLabel(parent, "Frequently Asked Questions (FAQ)", new Font("Arial", 10, FontStyle.Bold), DockStyle.Top, ContentAlignment.MiddleCenter, 10); + AddLabel(parent, Locales.Strings.faq_header, new Font("Segoe UI Variable Display", 10.5f, FontStyle.Bold), DockStyle.Top, ContentAlignment.MiddleCenter, 11); } + // Adds the ISO download information (Q1/A1) private void AddISOFAQ(FlowLayoutPanel parent) { - // Q: Where can I get the latest Windows 11 ISO? - AddLabel(parent, "Q: Where can I get the latest Windows 11 ISO?", new Font("Arial", 10, FontStyle.Bold), ContentAlignment.TopLeft, 10); - AddLabel(parent, "A: You can download the latest ISO from the official Microsoft website or use the Fido Downloader.", new Font("Arial", 10), ContentAlignment.TopLeft, 10); + AddLabel(parent, Locales.Strings.faq_q1, new Font("Segoe UI Variable Display", 10.5f, FontStyle.Bold), ContentAlignment.TopLeft, 11); + AddLabel(parent, Locales.Strings.faq_a1, new Font("Segoe UI Variable Display", 11), ContentAlignment.TopLeft, 11); - // Create a FlowLayoutPanel to place the links next to each other + // Links below the answer var linkPanel = new FlowLayoutPanel { AutoSize = true, @@ -58,50 +111,48 @@ namespace Flyby11 WrapContents = true }; - // Microsoft link - AddFAQItem(linkPanel, "Microsoft Site", "https://www.microsoft.com/software-download/windows11"); + AddFAQItem(linkPanel, Locales.Strings.faq_downloadMS, "https://www.microsoft.com/software-download/windows11"); + AddFAQItemWithScript(linkPanel, Locales.Strings.faq_downloadFido, "or", "https://raw.githubusercontent.com/pbatard/Fido/refs/heads/master/Fido.ps1"); - // Fido Downloader link (with text and URL, using AddFAQItemWithScript) - AddFAQItemWithScript(linkPanel, "Download via Fido (Recommended)", "or", "https://raw.githubusercontent.com/pbatard/Fido/refs/heads/master/Fido.ps1"); - - // Add the FlowLayoutPanel to the parent (FAQ panel) parent.Controls.Add(linkPanel); } + + // Simple link-only FAQ entry private void AddFAQItem(FlowLayoutPanel parent, string linkText, string linkUrl) { - // Create and add the link label with the provided text and URL var linkLabel = new LinkLabel { Text = linkText, - Font = new Font("Arial", 10, FontStyle.Underline), + Font = new Font("Segoe UI Variable Display", 10.5f, FontStyle.Underline), LinkColor = Color.Blue, AutoSize = true, Padding = new Padding(10), - TextAlign = ContentAlignment.TopLeft + TextAlign = ContentAlignment.TopLeft, + UseCompatibleTextRendering = true }; - linkLabel.LinkClicked += (sender, e) => System.Diagnostics.Process.Start(linkUrl); + linkLabel.LinkClicked += (sender, e) => Process.Start(linkUrl); parent.Controls.Add(linkLabel); } + // Adds a downloadable script link (e.g., Fido.ps1) private void AddFAQItemWithScript(FlowLayoutPanel parent, string linkText, string description, string scriptUrl) { - // Create and add the description label - AddLabel(parent, description, new Font("Arial",9), ContentAlignment.TopLeft, 10); + AddLabel(parent, description, new Font("Segoe UI Variable Display", 9), ContentAlignment.TopLeft, 11); - // Create and add the link label var linkLabel = new LinkLabel { Text = linkText, - Font = new Font("Arial", 10, FontStyle.Underline), + Font = new Font("Segoe UI Variable Display", 10.5f, FontStyle.Underline), LinkColor = Color.Blue, AutoSize = true, Padding = new Padding(10), - TextAlign = ContentAlignment.TopLeft + TextAlign = ContentAlignment.TopLeft, + UseCompatibleTextRendering = true }; - linkLabel.LinkClicked += async (sender, e) => + linkLabel.Click += (sender, e) => { string tempScriptPath = Path.Combine(Path.GetTempPath(), "Fido.ps1"); @@ -109,10 +160,12 @@ namespace Flyby11 { using (var client = new WebClient()) { - await client.DownloadFileTaskAsync(new Uri(scriptUrl), tempScriptPath); + // Download script to temp folder + client.DownloadFile(new Uri(scriptUrl), tempScriptPath); _updateStatus("Fido downloaded successfully! Now running the script..."); - System.Diagnostics.Process.Start(new ProcessStartInfo + // Run script using elevated PowerShell + Process.Start(new ProcessStartInfo { FileName = "powershell.exe", Arguments = $"-ExecutionPolicy Bypass -File \"{tempScriptPath}\"", @@ -131,6 +184,7 @@ namespace Flyby11 parent.Controls.Add(linkLabel); } + // Adds any generic label to the flow panel private void AddLabel(FlowLayoutPanel parent, string text, Font font, ContentAlignment alignment, int padding = 0) { var label = new Label @@ -139,11 +193,13 @@ namespace Flyby11 Font = font, Padding = new Padding(padding), TextAlign = alignment, - AutoSize = true + AutoSize = true, + UseCompatibleTextRendering = true }; parent.Controls.Add(label); } + // Overload for labels with DockStyle private void AddLabel(FlowLayoutPanel parent, string text, Font font, DockStyle dock, ContentAlignment alignment, int padding = 0) { var label = new Label @@ -153,58 +209,67 @@ namespace Flyby11 Padding = new Padding(padding), Dock = dock, TextAlign = alignment, - AutoSize = true + AutoSize = true, + UseCompatibleTextRendering = true, }; parent.Controls.Add(label); } + // Adds FAQ entry with question + answer + link private void AddFAQItem(FlowLayoutPanel parent, string question, string answer, string linkText, string linkUrl) { - AddLabel(parent, question, new Font("Arial", 10, FontStyle.Bold), ContentAlignment.TopLeft, 10); - AddLabel(parent, answer, new Font("Arial", 10), ContentAlignment.TopLeft, 10); + AddLabel(parent, question, new Font("Segoe UI Variable Display", 10.5f, FontStyle.Bold), ContentAlignment.TopLeft, 11); + AddLabel(parent, answer, new Font("Segoe UI Variable Display", 11), ContentAlignment.TopLeft, 11); var linkLabel = new LinkLabel { Text = linkText, - Font = new Font("Arial", 10, FontStyle.Underline), + Font = new Font("Segoe UI Variable Display", 10.5f, FontStyle.Underline), LinkColor = Color.Blue, AutoSize = true, Padding = new Padding(10), - TextAlign = ContentAlignment.TopLeft + TextAlign = ContentAlignment.TopLeft, + UseCompatibleTextRendering = true, }; - linkLabel.LinkClicked += (sender, e) => System.Diagnostics.Process.Start(linkUrl); + linkLabel.LinkClicked += (sender, e) => Process.Start(linkUrl); parent.Controls.Add(linkLabel); } - private void AddOtherFAQs(FlowLayoutPanel parent) + // -- Individual FAQ entries -- + + private void AddFaq2(FlowLayoutPanel panel) { - - // Q: How can I support the developer? - AddFAQItem(parent, "Q: How can I support the developer?", "A: If you've successfully installed Windows 11 and saved some money, feel free to leave a little something as a thank-you here.", "Click here to donate and show your support.", "https://www.paypal.com/donate?hosted_button_id=MY7HX4QLYR4KG"); + AddFAQItem(panel, Locales.Strings.faq_q2, Locales.Strings.faq_a2, Locales.Strings.faq_a2Link, "https://www.paypal.com/donate?hosted_button_id=MY7HX4QLYR4KG"); + } - // Q: How does the setup process work once the ISO is mounted? - AddLabel(parent, "Q: How does the setup process work once the ISO is mounted?", new Font("Arial", 10, FontStyle.Bold), ContentAlignment.TopLeft, 10); - AddLabel(parent, "A: Once the ISO is mounted, the setup process runs in the background. The Windows installer starts, guiding you through the steps required to install Windows 11 on your machine.", new Font("Arial", 10), ContentAlignment.TopLeft, 10); + private void AddFaq3(FlowLayoutPanel panel) + { + AddLabel(panel, Locales.Strings.faq_q3, new Font("Segoe UI Variable Display", 10.5f, FontStyle.Bold), ContentAlignment.TopLeft, 11); + AddLabel(panel, Locales.Strings.faq_a3, new Font("Segoe UI Variable Display", 11), ContentAlignment.TopLeft, 11); + } - // Q: What if I encounter issues during installation? - AddLabel(parent, "Q: What if I encounter issues during installation?", new Font("Arial", 10, FontStyle.Bold), ContentAlignment.TopLeft, 10); - AddLabel(parent, "A: Please check the error messages and report it on GitHub.", new Font("Arial", 10), ContentAlignment.TopLeft, 10); + private void AddFaq4(FlowLayoutPanel panel) + { + AddLabel(panel, Locales.Strings.faq_q4, new Font("Segoe UI Variable Display", 10.5f, FontStyle.Bold), ContentAlignment.TopLeft, 11); + AddLabel(panel, Locales.Strings.faq_a4, new Font("Segoe UI Variable Display", 11), ContentAlignment.TopLeft, 11); + } - // Q: What is the setup path for Windows 11? - AddLabel(parent, "Q: What is the setup path for Windows 11?", new Font("Arial", 10, FontStyle.Bold), ContentAlignment.TopLeft, 10); - AddLabel(parent, "A: The setup path is typically found under the 'sources' folder on the mounted ISO drive.", new Font("Arial", 10), ContentAlignment.TopLeft, 10); + private void AddFaq5(FlowLayoutPanel panel) + { + AddLabel(panel, Locales.Strings.faq_q5, new Font("Segoe UI Variable Display", 10.5f, FontStyle.Bold), ContentAlignment.TopLeft, 11); + AddLabel(panel, Locales.Strings.faq_a5, new Font("Segoe UI Variable Display", 11), ContentAlignment.TopLeft, 11); + } - // Q: Is it legal to use this method? - AddLabel(parent, "Q: Is it legal to use this method?", new Font("Arial", 10, FontStyle.Bold), ContentAlignment.TopLeft, 10); - AddLabel(parent, "A: Yes, Microsoft has left a backdoor open. This method leverages a feature of the Windows 11 setup process that uses the Windows Server variant of the installation. Unlike the regular Windows 11 setup, this variant skips most hardware compatibility checks.", new Font("Arial", 10), ContentAlignment.TopLeft, 10); + private void AddFaq6(FlowLayoutPanel panel) + { + AddLabel(panel, Locales.Strings.faq_q6, new Font("Segoe UI Variable Display", 10.5f, FontStyle.Bold), ContentAlignment.TopLeft, 11); + AddLabel(panel, Locales.Strings.faq_a6, new Font("Segoe UI Variable Display", 11), ContentAlignment.TopLeft, 11); + } - // Q: What are my alternatives if my PC is not supported? - AddLabel(parent, "Q: What are my alternatives if my PC is not supported?", new Font("Arial", 10, FontStyle.Bold), ContentAlignment.TopLeft, 10); - AddLabel(parent, "A: According to Microsoft, you should throw your PC away. I would suggest installing Linux on it and moving away from Windows.", new Font("Arial", 10), ContentAlignment.TopLeft, 10); - - // Q: Who is the developer? - AddFAQItem(parent, "Q: Who is the developer?", "A: The developer is Belim, also known as Builtbybel, who has contributed a lot of code to the Windows community.", "Click here to learn more about the developer's work.", "https://github.com/BuiltByBel"); + private void AddFaq7(FlowLayoutPanel panel) + { + AddFAQItem(panel, Locales.Strings.faq_q7, Locales.Strings.faq_a7, Locales.Strings.faq_a7Link, "https://github.com/BuiltByBel"); } } } \ No newline at end of file diff --git a/FlybyScript/Flyby11.csproj b/FlybyScript/Flyby11.csproj index 6b8a9aa..554d6cc 100644 --- a/FlybyScript/Flyby11.csproj +++ b/FlybyScript/Flyby11.csproj @@ -58,8 +58,20 @@ CanIUpgradeView.cs + + Form + + + ClippyUI.cs + + + True + True + Strings.resx + + Form @@ -68,23 +80,41 @@ + + True + True + Resources.resx + CanIUpgradeView.cs + + ClippyUI.cs + + + + + + + + + + + MainForm.cs - - ResXFileCodeGenerator - Resources.Designer.cs + + PublicResXFileCodeGenerator Designer + Strings.Designer.cs + + + Designer + PublicResXFileCodeGenerator + Resources.Designer.cs - - True - Resources.resx - True - SettingsSingleFileGenerator @@ -102,5 +132,6 @@ + \ No newline at end of file diff --git a/FlybyScript/IsoHandler.cs b/FlybyScript/IsoHandler.cs index 3a2cd0f..c53eb8d 100644 --- a/FlybyScript/IsoHandler.cs +++ b/FlybyScript/IsoHandler.cs @@ -3,8 +3,12 @@ using System.Diagnostics; using System.Drawing; using System.IO; using System.Net.Http; +using System.Runtime.Remoting.Lifetime; +using System.Text; +using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Forms; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; namespace Flyby11 { @@ -22,19 +26,32 @@ namespace Flyby11 { try { - _updateStatus("Mounting the ISO... Hang tight!"); + // Block Win10 ISOs + string isoFileName = Path.GetFileName(isoPath); + if (Regex.IsMatch(isoFileName, @"(?i)(win10|windows\s*10)")) + { + _updateStatus("Error: Windows 10 ISOs are not supported."); + MessageBox.Show("Windows 10 ISOs are not supported. Please use a Windows 11 ISO.", + "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + _updateStatus(Locales.Strings._debugStatusMounting); //Mounting the ISO... Hang tight! - await ExecutePowerShellCommand($"Mount-DiskImage -ImagePath \"{isoPath}\""); + // Ensure the ISO path is properly quoted + string quotedIsoPath = $"\"{isoPath}\""; + + // Pass the quoted path to ExecutePowerShellCommand + await ExecutePowerShellCommand($"Mount-DiskImage -ImagePath {quotedIsoPath}"); string driveLetter = await GetMountedDriveLetter(); if (string.IsNullOrEmpty(driveLetter)) { - _updateStatus("Failed to mount the ISO. Please try again."); - MessageBox.Show("Failed to mount the ISO.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + _updateStatus(Locales.Strings._debugStatusMountingFailed); //Failed to mount the ISO. Please try again. + MessageBox.Show(Locales.Strings._debugStatusMountingFailed, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } - _updateStatus("ISO mounted successfully! Let's get this Windows 11 ready!"); + _updateStatus(Locales.Strings._debugStatusMountingSuccess); //ISO mounted successfully! Let's get this Windows 11 ready! string setupPath = Path.Combine(driveLetter, "sources", "setupprep.exe"); if (File.Exists(setupPath)) @@ -43,13 +60,17 @@ namespace Flyby11 } else { - _updateStatus($"Setup file not found in {driveLetter}. Aborting."); - MessageBox.Show($"Setup file not found in {driveLetter}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + _updateStatus($"{Locales.Strings._debugStatusSetupFileNotFound} {driveLetter}. Aborting."); // Setup file not found in + MessageBox.Show($"{Locales.Strings._debugStatusSetupFileNotFound} {driveLetter}", + "Error", + MessageBoxButtons.OK, + MessageBoxIcon.Error); + } } catch (Exception ex) { - _updateStatus($"Oops! Something went wrong: {ex.Message}"); + _updateStatus($"{Locales.Strings._debugStatusHandleIsoEx} {ex.Message}"); //Oops! Something went wrong: MessageBox.Show($"Error: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -71,23 +92,52 @@ namespace Flyby11 { using (var process = new Process()) { + // Escape the command to ensure spaces in paths are handled + string escapedCommand = command.Replace("\"", "\\\""); + process.StartInfo.FileName = "powershell.exe"; - process.StartInfo.Arguments = $"-NoProfile -ExecutionPolicy Bypass -Command \"{command}\""; + process.StartInfo.Arguments = $"-NoProfile -ExecutionPolicy Bypass -Command \"{escapedCommand}\""; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.RedirectStandardError = true; process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = true; + // Capture standard output and error output + StringBuilder outputBuilder = new StringBuilder(); + StringBuilder errorBuilder = new StringBuilder(); + + process.OutputDataReceived += (sender, e) => { if (!string.IsNullOrEmpty(e.Data)) outputBuilder.AppendLine(e.Data); }; + process.ErrorDataReceived += (sender, e) => { if (!string.IsNullOrEmpty(e.Data)) errorBuilder.AppendLine(e.Data); }; + process.Start(); + process.BeginOutputReadLine(); + process.BeginErrorReadLine(); + await process.WaitForExitAsync(); + + string output = outputBuilder.ToString(); + string error = errorBuilder.ToString(); + + // Debug output for logs + if (!string.IsNullOrEmpty(output)) + { + _updateStatus($"PowerShell Output: {output}"); + } + + if (!string.IsNullOrEmpty(error)) + { + _updateStatus($"PowerShell Error: {error}"); + MessageBox.Show($"PowerShell Error: {error}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } } + private async Task RunSetupWithAdminRights(string setupPath) { try { - _updateStatus("Starting the setup process with elevated privileges..."); + _updateStatus(Locales.Strings._debugInstallRunElevated); //Starting the setup process with elevated privileges... var startInfo = new ProcessStartInfo { @@ -98,7 +148,7 @@ namespace Flyby11 CreateNoWindow = false }; - _updateStatus("Almost there! We're getting the setup ready..."); + _updateStatus(Locales.Strings._debugStatusRunning); //Almost there! We're getting the setup ready... using (var process = Process.Start(startInfo)) { @@ -108,8 +158,10 @@ namespace Flyby11 } } - _updateStatus("You're ready to install Windows 11 on unsupported hardware! Ignore the 'Windows Server' prompt; you're all set!"); - MessageBox.Show("Windows 11 installation can now proceed. Please follow the instructions in the setup window.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); + //You're ready to install Windows 11 on unsupported hardware! Ignore the 'Windows Server' prompt; you're all set!" + _updateStatus(Locales.Strings._debugInstallReady); + //Windows 11 installation can now proceed. Please follow the instructions in the setup window. + MessageBox.Show(Locales.Strings.msg_InstallReady, "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { diff --git a/FlybyScript/Locales/Strings.ar.resx b/FlybyScript/Locales/Strings.ar.resx new file mode 100644 index 0000000..aeb5a74 --- /dev/null +++ b/FlybyScript/Locales/Strings.ar.resx @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + تم إلغاء التصحيح بواسطة المستخدم. + + + حاول المستخدم اختيار محرك أقراص غير قابل للإزالة. + + + لم يتم اختيار أي محرك أقراص USB للتصحيح. + + + فشل في تطبيق التصحيح: + + + المسار المحدد ليس محرك أقراص قابل للإزالة. يرجى اختيار محرك أقراص USB. + + + اختر محرك أقراص USB الذي يحتوي على ملفات تثبيت Windows 11 الخاصة بك.\nتضيف هذه الميزة تصحيح توافق لتجاوز متطلبات النظام معينة.\nمتوافق مع الأقراص المعدة بواسطة أي أداة، بما في ذلك Rufus. تأكد من أن المحرك جاهز! + + + سيتم تطبيق إعدادات تجاوز التوافق على محرك أقراص USB المحدد. هل تريد المتابعة؟ + + + تم تطبيق التصحيح بنجاح! + + + مساعد ترقية Flyby11 + + + تطبيق تصحيح التوافق على ISO (تثبيت نظيف) + + + هل يمكنني الترقية إلى Windows 11؟ + + + هل نجحت الترقية؟ + + + اسحب وأفلت ملف ISO الخاص بـ Windows 11 لتصحيحه وتثبيته على الأجهزة غير المدعومة (ترقية مكانية). + + + ج: يمكنك تنزيل أحدث ISO من الموقع الرسمي لشركة Microsoft أو استخدام Fido Downloader. + + + ج: إذا قمت بتثبيت Windows 11 بنجاح ووفرت بعض المال، فلا تتردد في ترك شيء صغير كعلامة شكر هنا. + + + انقر هنا للتبرع وإظهار دعمك. + + + ج: بمجرد تحميل ISO، يتم تشغيل عملية الإعداد في الخلفية. يبدأ مثبت Windows، موجهًا إياك خلال الخطوات المطلوبة لتثبيت Windows 11 على جهازك. + + + ج: يرجى التحقق من رسائل الخطأ والإبلاغ عنها على GitHub. + + + ج: نعم، تركت Microsoft بابًا خلفيًا مفتوحًا. تستفيد هذه الطريقة من ميزة في عملية إعداد Windows 11 تستخدم إصدار Windows Server من التثبيت. على عكس إعداد Windows 11 العادي، تتخطى هذه النسخة معظم فحوصات توافق الأجهزة. + + + ج: وفقًا لشركة Microsoft، يجب عليك التخلص من جهاز الكمبيوتر الخاص بك. أوصي بتثبيت Linux عليه والابتعاد عن Windows. + + + ج: المطور هو Belim، المعروف أيضًا باسم Builtbybel، الذي ساهم بالكثير من الشيفرة في مجتمع Windows. + + + انقر هنا لمعرفة المزيد عن عمل المطور. + + + تنزيل عبر Fido (موصى به) + + + موقع Microsoft + + + الأسئلة الشائعة (FAQ) + + + س: أين يمكنني الحصول على أحدث Windows 11 ISO؟ + + + س: كيف يمكنني دعم المطور؟ + + + س: كيف تعمل عملية الإعداد بمجرد تحميل ISO؟ + + + س: ماذا لو واجهت مشاكل أثناء التثبيت؟ + + + س: هل من القانوني استخدام هذه الطريقة؟ + + + س: ما هي البدائل إذا لم يكن جهازي مدعومًا؟ + + + س: من هو المطور؟ + + + 1. الجهاز يعمل بإصدار مدعوم حاليًا من Windows 10. إذا لم يكن الجهاز يعمل بإصدار مدعوم حاليًا من Windows 10، قم بالترقية إلى إصدار مدعوم من Windows 10. + + + 2. الجهاز يلبي + + + 1. قم بتنزيل وتشغيل + + + 2. اختر اختصار تحديث Windows التالي ثم اختر زر التحقق من التحديثات: + + + 3. جهازك لا يلبي المتطلبات الرسمية لـ Windows 11؟ يمكنك تطبيق تصحيح التوافق لتمكين الترقية المكانية عبر تحديث Windows. + + + يمكن ترقية جهاز Windows 10 الحالي إلى Windows 11 إذا كان يلبي المعايير التالية: + + + للتحقق مما إذا كان جهاز Windows 10 مؤهلاً للترقية إلى Windows 11، اتبع إحدى هذه الخيارات: + + + المواصفات الدنيا للأجهزة لتشغيل Windows 11. + + + تطبيق WhyNotWin11 لتأكيد أن جهازك يلبي الحد الأدنى من متطلبات النظام + + + يمكن الآن متابعة تثبيت Windows 11. يرجى اتباع التعليمات في نافذة الإعداد. + تثبيت + + + أنت جاهز لتثبيت Windows 11 على الأجهزة غير المدعومة! تجاهل رسالة 'Windows Server'؛ أنت جاهز! + تثبيت + + + بدء عملية الإعداد بامتيازات مرتفعة... + تثبيت + + + عذرًا! حدث خطأ ما: + تحميل + + + يتم تحميل ISO... انتظر قليلاً! + تحميل + + + فشل تحميل ISO. يرجى المحاولة مرة أخرى. + تحميل + + + تم تحميل ISO بنجاح! دعنا نجعل هذا Windows 11 جاهزًا! + تحميل + + + قريبًا! نحن نستعد للإعداد... + تثبيت + + + لم يتم العثور على ملف الإعداد في + تحميل + + + اختر من الكمبيوتر + + diff --git a/FlybyScript/Locales/Strings.cs-CZ.resx b/FlybyScript/Locales/Strings.cs-CZ.resx new file mode 100644 index 0000000..a9cbc58 --- /dev/null +++ b/FlybyScript/Locales/Strings.cs-CZ.resx @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Bypass patch zrušen uživatelem. + + + Uživatel nevybral výměné zařízení. + + + Nebyl vybrán USB disk pro záplatování. + + + Chyba při aplikování "bypass" záplaty: + + + Zvolená cesta není vyměnitelný disk. Prosím zvolte USB disk. + + + Vyberte USB disk obsahující instalační soubory Windows 11. \nTato funkce přidává kompatibilní záplatu, která obejde určité systémové požadavky. \nKompatibilní s disky připravenými jakýmkoli nástrojem, včetně Rufus. Ujistěte se, že je disk připraven! + + + Tímto se na vybraný USB disk použijí nastavení pro obejití kompatibility ("bypass"). Pokračovat? + + + Záplata pro obejití ("bypass") byla úspěšně aplikována! + + + Asistent pro upgrade Flyby11 + + + Použít záplatu pro kompatibility na ISO (čistá instalace) + + + Mohu upgradovat na Windows 11? + + + Fungoval upgrade? + + + Přetáhněte Windows 11 ISO, abyste jej opravili a nainstalovali na nepodporovaný hardware (místní upgrade). + + + O: Můžete si stáhnout nejnovější ISO z oficiálních stránek Microsoftu nebo použít Fido Downloader. + + + O: Pokud jste úspěšně nainstalovali Windows 11 a ušetřili nějaké peníze, neváhejte zde zanechat malý příspěvek jako poděkování. + + + Klikněte zde, abyste přispěli a vyjádřili svou podporu. + + + O: Jakmile je ISO připojeno, proces instalace běží na pozadí. Instalátor Windows se spustí a provede vás kroky potřebnými k instalaci Windows 11 na váš počítač. + + + O: Zkontrolujte prosím chybové zprávy a nahlaste je na GitHubu. + + + O: Ano, Microsoft nechal otevřená zadní vrátka. Tato metoda využívá funkci instalačního procesu Windows 11, která používá variantu instalace Windows Server. Na rozdíl od běžné instalace Windows 11 tato varianta přeskočí většinu kontrol kompatibility hardwaru. + + + O: Podle Microsoftu byste měli svůj počítač vyhodit. Doporučil bych na něj nainstalovat Linux a přejít od Windows. + + + O: Vývojářem je Belim, známý také jako Builtbybel, který přispěl velkým množstvím kódu do komunity Windows. + + + Klikněte zde, abyste se dozvěděli více o práci vývojáře. + + + Stáhnout přes Fido (doporučeno) + + + Web Microsoft + + + Často kladené dotazy (FAQ) + + + Q: Kde mohu získat nejnovější ISO Windows 11? + + + Q: Jak mohu podpořit vývojáře? + + + Q: Jak funguje proces instalace, jakmile je ISO připojeno? + + + Q: Co když narazím na problémy během instalace? + + + Q: Je legální použít tuto metodu? + + + Q: Jaké mám alternativy, pokud můj počítač není podporován? + + + Q: Kdo je vývojář? + + + 1. Zařízení používá aktuálně podporovanou verzi Windows 10. Pokud zařízení nepoužívá podporovanou verzi Windows 10, upgradujte na podporovanou verzi Windows 10. + + + 2. Zařízení splňuje... + + + 1. Stáhněte a spusťte... + + + 2. Vyberte následující zástupce Windows Update a poté vyberte tlačítko Zkontrolovat aktualizace: + + + 3. Vaše zařízení nesplňuje oficiální požadavky pro Windows 11? Můžete použít kompatibilní patch, který umožní Inplace Upgrade prostřednictvím Windows Update. + + + Stávající zařízení s Windows 10 lze upgradovat na Windows 11, pokud splňuje následující kritéria: + + + Chcete-li zjistit, zda je zařízení s Windows 10 způsobilé k upgradu na Windows 11, postupujte podle jedné z těchto možností: + + + minimální hardwarové požadavky pro spuštění Windows 11. + + + Aplikace WhyNotWin11 pro potvrzení, že vaše zařízení splňuje minimální systémové požadavky. + + + Instalace Windows 11 může nyní pokračovat. Postupujte prosím podle pokynů v okně nastavení. + Install + + + Jste připraveni nainstalovat Windows 11 na nepodporovaný hardware! Ignorujte výzvu 'Windows Server'; jste připraveni! + Install + + + Zahájení procesu instalace s vyššími oprávněními... + Install + + + Jejda! Něco se pokazilo: + Mounting + + + Připojování ISO... Vydržte! + Mounting + + + Nepodařilo se připojit ISO. Zkuste to prosím znovu. + Mounting + + + ISO úspěšně připojeno! Pojďme připravit tento Windows 11! + Mounting + + + Skoro hotovo! Připravujeme instalaci... + Install + + + Instalační soubor nebyl nalezen v... + Mounting + + + Vyberte z počítače. + + \ No newline at end of file diff --git a/FlybyScript/Locales/Strings.it.resx b/FlybyScript/Locales/Strings.it.resx index 93067b5..d86101f 100644 --- a/FlybyScript/Locales/Strings.it.resx +++ b/FlybyScript/Locales/Strings.it.resx @@ -208,7 +208,7 @@ D: è legale usare questo metodo? - D: quali sono le alternative se l'ahrdware del PC non è supportato? + D: quali sono le alternative se l'hardware del PC non è supportato? D: chi è lo sviluppatore? @@ -242,37 +242,41 @@ L'installazione di Windows 11 può ora procedere. Segui le istruzioni nella finestra di configurazione. - Install + Installa Sei pronto per installare Windows 11 con hardware non supportato! Ignora il prompt "Windows Server"; tutto è pronto! - Install + Installa Avvio processo configurazione con privilegi elevati ... - Install + Installa Oops! Qualcosa è andato storto: - Mounting + Montaggio Montaggio file... - Mounting + Montaggio Impossibile montare il file ISO. Riprova. - Mounting + Montaggio File ISO montato correttamente! Procediamo con l'installazione di Windows 11! - Mounting + Montaggio Ci siamo quasi! Preparazione installazione ... + Installazione File configurazione non trovato in - Mounting + Montaggio + + + Seleziona dal computer \ No newline at end of file diff --git a/FlybyScript/Locales/Strings.pl.resx b/FlybyScript/Locales/Strings.pl.resx new file mode 100644 index 0000000..8af1516 --- /dev/null +++ b/FlybyScript/Locales/Strings.pl.resx @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Łatka pomijająca została anulowana przez użytkownika. + + + Użytkownik próbował wybrać niewysuwalny nośnik. + + + Brak wybranego nośnika USB do aplikowania łatki. + + + Aplikacja pomijającej łatki zakończyła się niepowodzeniem: + + + Wybrana ścieżka nie jest wysuwalnym nośnikiem. Wybierz nośnik USB. + + + Wybierz nośnik USB zawierający instalator Windowsa 11.\nTa funkcja dodaje kompatybilną łatką do pominięcia pewnych wymagań systemowych.\nKompatybilny z nośnikami przygotowanymi przez dowolne narzędzie, w tym Rufusa. Upewnij się, że ten nośnik jest gotowy! + + + To zaaplikuje ustawienia pomijające wymagania na tym wybranym nośniku USB. Czy chcesz kontynuować? + + + Łatka pomijająca wymagania systemowe została pomyślnie zaaplikowana! + + + Flyby11 Asystent Uaktualnienia + + + Zaaplikuj łatkę kompatybilności do obrazu ISO (czysta instalacja) + + + Czy mogę zaktualizować do Windowsa 11? + + + Czy te uaktualnienie zadziałało? + + + Przeciągnij i upuść obraz ISO Windowsa 11, żeby go załatać i zainstalować na niewspieranym sprzęcie (aktualizacja na miejscu). + + + O: Możesz pobrać najnowszy obraz ISO z oficjalnej strony Microsoft lub użyć pobieracza Fido. + + + O: Jeśli udało ci się zainstalować system Windows 11 i zaoszczędzić trochę pieniędzy, możesz zostawić tutaj małe podziękowanie. + + + Kliknij tutaj, aby wesprzeć mnie i okazać Twoje wsparcie. + + + O: Po zamontowaniu obrazu ISO proces instalacji przebiega w tle. Zostanie uruchomiony instalator systemu Windows, który poprowadzi użytkownika przez kolejne kroki wymagane do zainstalowania systemu Windows 11 na komputerze. + + + O: Proszę sprawdzić wiadomości błędów i zgłosić je na GitHubie. + + + O: Tak, Microsoft pozostawił otwartą furtkę. Ta metoda wykorzystuje funkcję procesu instalacji systemu Windows 11, która wykorzystuje wariant instalacji systemu Windows Server. W przeciwieństwie do zwykłej instalacji systemu Windows 11, ten wariant pomija większość kontroli zgodności sprzętu. + + + O: Według Microsoftu, powinieneś/-naś wyrzucić swój komputer. Poleciłbym instalację Linuxa na nim i oddalić się od Windowsa. + + + O: Deweloperem jest Belim, znany również jako Builtbybel, który wniósł wiele kodu do społeczności Windows. + + + Kliknij tutaj, aby dowiedzieć się więcej o pracy dewelopera. + + + Pobierz przez Fido (rekomendowane) + + + Strona Microsoftu + + + Najczęściej zadawane pytanie (FAQ) + + + P: Gdzie mogę pobrać najnowszy obraz ISO Windowsa 11? + + + P: Jak mogę wesprzeć dewelopera? + + + P: Jak przebiega proces instalacji po zainstalowaniu pliku ISO? + + + P: Co jeśli napotkam problemy podczas instalacji? + + + P: Czy korzystanie z tej metody jest legalne? + + + P: Jakie mam alternatywy, jeśli mój komputer nie jest wspierany? + + + P: Kto jest deweloperem? + + + 1. Na urządzeniu działa aktualnie obsługiwana wersja systemu Windows 10. Jeśli na urządzeniu nie działa obecnie obsługiwana wersja systemu Windows 10, należy uaktualnić system do obsługiwanej wersji systemu Windows 10. + + + 2. Urządzenie spełnia wymagania + + + 1. Pobierz i uruchom + + + 2. Wybierz następujący skrót Windows Update, a następnie wybierz przycisk Sprawdź aktualizacje: + + + 3. Twoje urządzenie nie spełnia oficjalnych wymagań systemu Windows 11? Możesz zastosować poprawkę zgodności, aby włączyć aktualizację w miejscu za pośrednictwem Windows Update. + + + Istniejące urządzenie z systemem Windows 10 może zostać uaktualnione do systemu Windows 11, jeśli spełnia następujące kryteria: + + + Aby sprawdzić, czy urządzenie z systemem Windows 10 kwalifikuje się do uaktualnienia do systemu Windows 11, wykonaj jedną z poniższych opcji: + + + minimalne specyfikacje sprzętowe umożliwiające uruchomienie systemu Windows 11. + + + Aplikacja WhyNotWin11, aby potwierdzić, że urządzenie spełnia minimalne wymagania systemowe + + + Teraz można kontynuować instalację systemu Windows 11. Postępuj zgodnie z instrukcjami wyświetlanymi w oknie instalacji. + Install + + + Możesz zainstalować system Windows 11 na nieobsługiwanym sprzęcie! Zignoruj monit „Windows Server”; wszystko gotowe! + Install + + + Rozpoczęcie procesu instalacji z podwyższonymi uprawnieniami... + Install + + + Ups! Coś poszło nie tak: + Mounting + + + Montowanie obrazu ISO... Trzymaj się mocno! + Mounting + + + Montowanie obrazu ISO zakończyło się niepowodzeniem. Spróbuj ponownie. + Mounting + + + Obraz ISO został zamontowany pomyślnie! Przygotujmy Windowsa 11! + Mounting + + + Już prawie! Przygotowujemy konfigurację, aby była gotowa... + Install + + + Nie znaleziono pliku konfiguracyjnego w + Mounting + + + Wybierz z komputera + + \ No newline at end of file diff --git a/FlybyScript/Locales/Strings.sv-SE.resx b/FlybyScript/Locales/Strings.sv-SE.resx new file mode 100644 index 0000000..6f07e00 --- /dev/null +++ b/FlybyScript/Locales/Strings.sv-SE.resx @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Förbikoppling avbruten av användaren. + + + Användaren försökte välja en icke flyttbar enhet. + + + Ingen USB-enhet har valts för modifiering. + + + Det gick inte att utföra modifieringen av förbikopplingen: + + + Den valda sökvägen är inte en flyttbar enhet. Välj en USB-enhet. + + + Välj USB-enheten som innehåller dina Windows 11-installationsfiler.\nDen här funktionen lägger till en kompatibilitetsändring för att kringgå vissa systemkrav.\nKompatibel med enheter förberedda av alla verktyg, inklusive Rufus. Se till att enheten är klar! + + + Detta kommer att verkställa ändringar för förbikoppling av kompatibilitet på den valda USB-enheten. Fortsätta? + + + Förbikoppling klar! + + + Flyby11 uppgraderingsassistent + + + Applicera kompatibilitetskorrigering på ISO-filen (ren installation) + + + Kan jag uppgradera till Windows 11? + + + Fungerade uppgraderingen? + + + Dra och släpp Windows 11 ISO-filen för att förbikoppla och installera den på hårdvara som inte stöds (uppgradering på plats). + + + A: Du kan ladda ner den senaste ISO-filen från den officiella Microsoft-webbplatsen eller använda Fido Downloader. + + + A: Om du lyckas installera Windows 11 och sparat lite pengar, lämna gärna något som tack för hjälpen här. + + + Klicka här för att donera och visa ditt stöd. + + + A: När ISO-filen är monterad körs installationsprocessen i bakgrunden. Windows-installationsprogrammet startar och guidar dig genom stegen som krävs för att installera Windows 11 på din dator. + + + A: Kontrollera felmeddelandena och rapportera det på GitHub. + + + A: Ja, Microsoft har lämnat en bakdörr öppen. Den här metoden utnyttjar en funktion i installationsprocessen för Windows 11 som använder Windows Server-varianten av installationen. Till skillnad från den vanliga Windows 11-installationen hoppar denna variant över de flesta kontroller av hårdvarukompatibilitet. + + + A: Enligt Microsoft bör du slänga din dator. Jag skulle föreslå att du installerar Linux på den och överger Windows. + + + A: Utvecklaren är Belim även känd som Builtbybel som har bidragit med mycket kod till Windows-communityt. + + + Klicka här för att lära dig mer om utvecklarens arbete. + + + Ladda ner via Fido (rekommenderas) + + + Microsofts webbplats + + + Vanliga frågor (FAQ) + + + Q: Var kan jag få tag i den senaste ISO-filen med Windows 11? + + + Q: Hur kan jag stöda utvecklaren? + + + Q: Hur fungerar installationsprocessen när ISO-filen är monterad? + + + Q: Vad händer om jag stöter på problem under installationen? + + + Q: Är det lagligt att använda denna metoden? + + + Q: Vilka är mina alternativ om min dator inte stöds? + + + Q: Vem är utvecklaren? + + + 1. Enheten kör en version av Windows 10 som stöds för närvarande. Om enheten för närvarande inte kör en version av Windows 10 som stöds, uppgradera till en version av Windows 10 som stöds. + + + 2. Enheten uppfyller + + + 1. Ladda ner och kör + + + 2. Välj följande genväg för Windows Update och välj sedan knappen sök efter uppdateringar: + + + 3. Din enhet uppfyller inte de officiella kraven för Windows 11? Du kan använda en kompatibilitetskorrigering för att aktivera uppgradering på plats via Windows Update. + + + En befintlig Windows 10-enhet kan uppgraderas till Windows 11 om den uppfyller följande kriterier: + + + För att kontrollera om en Windows 10-enhet är lämplig att uppgradera till Windows 11, följ ett av dessa alternativ: + + + de minsta hårdvaruspecifikationerna för att köra Windows 11. + + + WhyNotWin11-appen för att bekräfta att din enhet uppfyller de lägsta systemkraven + + + Installationen av Windows 11 kan nu fortsätta. Följ instruktionerna i installationsfönstret. + Install + + + Du är redo att installera Windows 11 på hårdvaran som inte stöds! Ignorera fönstret om 'Windows Server'; du är klar! + Install + + + Startar installationsprocessen med förhöjda privilegier... + Install + + + Hoppsan! Något gick fel: + Mounting + + + Monterar ISO-filen... Snart klart! + Mounting + + + Det gick inte att montera ISO-filen. Försök igen. + Mounting + + + ISO-filen monterad! Låt oss göra Windows 11 klar! + Mounting + + + Nästan där! Vi förbereder installationen... + Install + + + Installationsfilen hittades inte i + Mounting + + + Välj från datorn + + diff --git a/FlybyScript/Locales/Strings.zh-CN.resx b/FlybyScript/Locales/Strings.zh-CN.resx new file mode 100644 index 0000000..0f6b5ee --- /dev/null +++ b/FlybyScript/Locales/Strings.zh-CN.resx @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 用户取消安装绕过补丁 + + + 用户尝试选择了一个不可弹出的设备。 + + + 未选择 USB 设备来安装绕过补丁。 + + + 安装绕过补丁失败: + + + 已选位置不是一个可弹出的设备。请选择一个正确的 USB 设备。 + + + 请选择包含 Windows 11 安装文件的 USB 设备。\n该功能用于添加兼容性补丁来绕过某些强制要求。\n兼容由任何工具(包括 Rufus)准备的设备。请确保设备已准备好! + + + 即将在 USB 设备中安装兼容性绕过补丁。继续? + + + 绕过补丁已成功安装! + + + Flyby11 升级助手 + + + 为 ISO 应用兼容性补丁(全新安装) + + + 我的设备支持升级到 Windows 11 吗? + + + 升级对您来说有用吗? + + + 拖入 Windows 11 ISO 文件来安装补丁,以支持安装进不支持的硬件(直接升级)。 + + + 答:您可从微软官方网站或 Fido 下载器下载最新版 ISO + + + 答:如果您因本程序成功安装了 Windows 11,并让您省了点钱。可以随意在这里留下点小小的感谢! + + + 点击这里捐赠并表达您的支持。 + + + 答:一旦 ISO 文件被挂载,安装过程将在后台运行。Windows 安装程序会启动,并引导您完成安装 Windows 11 所需的各项步骤。 + + + 答:请检查错误信息,并将其报告到 GitHub 上。 + + + 答:是的,微软确实留下了一个后门。此方法利用了 Windows 11 安装过程中的一个功能,该功能使用了 Windows Server 版本的安装程序。与常规的 Windows 11 安装程序不同,这个版本会跳过大多数硬件兼容性检查。 + + + 答:根据微软的说法,你应该扔掉你的电脑。但我建议你在电脑上安装 Linux,远离 Windows。 + + + 答:开发者是 Belim,也被称为 Builtbybel,他为 Windows 社区贡献了大量代码。 + + + 点击此处了解更多关于该开发者工作的信息。 + + + 通过 Fido 下载(推荐) + + + 微软官网 + + + 常见问题解答 + + + 问:我在哪里可以下载最新的 Windows 11 ISO 文件? + + + 问:如何支持开发者? + + + 问:挂载 ISO 文件后,安装过程是如何进行的? + + + 问:如果在安装过程中遇到问题怎么办? + + + 问:使用这种方式是否合法? + + + 问:如果我的电脑不受支持,有哪些替代方案? + + + 问:开发者是谁? + + + 1. 设备正在运行受支持版本的 Windows 10。若设备当前未运行受支持的 Windows 10 版本,则请升级到受支持的 Windows 10 版本。 + + + 2. 该设备符合 + + + 1. 下载并运行 + + + 2. 单击下方 Windows 更新按钮,然后单击检查更新按钮: + + + 3. 您的设备不支持 Windows 11 官方安装流程?您可安装兼容补丁来启用 Windows 更新中的内置升级 + + + 若满足以下条件,当前运行 Windows 10 的设备可直接升级到 Windows11: + + + 要查看 Windows 10 设备是否符合升级到 Windows 11 的条件,请按照以下其中一个选项来检查: + + + 运行 Windows 11 的最低硬件规格要求。 + + + WhyNotWin11 应用来确认您的设备是否符合最低硬件规格要求 + + + 现在可以继续 Windows 11 的安装。请按照安装窗口中的说明进行操作。 + Install + + + 您已准备好在不受支持的设备中安装 Windows 11!请忽略 'Windows Server' 提示;一切已准备就绪。 + Install + + + 正在以管理员权限启动安装程序… + Install + + + 啊噢!发生错误: + Mounting + + + 正在挂载 ISO… 请稍后! + Mounting + + + 无法挂载 ISO。请重试。 + Mounting + + + 已成功挂载 ISO!让我们准备好安装 Windows 11 吧! + Mounting + + + 马上就完成了!我们正在完成安装中… + Install + + + 未在此处找到安装文件: + Mounting + + + 从计算机中选择 + + \ No newline at end of file diff --git a/FlybyScript/Logger.cs b/FlybyScript/Logger.cs new file mode 100644 index 0000000..82e3d58 --- /dev/null +++ b/FlybyScript/Logger.cs @@ -0,0 +1,45 @@ +using System; +using System.Drawing; +using System.Linq; +using System.Windows.Forms; + +namespace Flyby11 +{ + public class Logger + { + private MainForm mainForm; + + public Logger(MainForm mainForm) + { + this.mainForm = mainForm ?? throw new ArgumentNullException(nameof(mainForm)); + } + + // Log method for a single string + public void Log(string message, Color color, float fontSize = 10.5f) + { + if (mainForm.InvokeRequired) + { + mainForm.Invoke(new Action(() => Log(message, color, fontSize))); + return; + } + + + AppendMessageToConversation(message, color, fontSize); // Append message to conversation + } + + private void AppendMessageToConversation(string message, Color color, float fontSize) + { + Label statusLabel = mainForm.Controls.Find("statusLabel", true).FirstOrDefault() as Label; + + if (statusLabel != null) + { + statusLabel.Text = ""; + statusLabel.Text += "\r\n" + message; + statusLabel.ForeColor = color; + statusLabel.Font = new Font(statusLabel.Font.FontFamily, fontSize); + statusLabel.TextAlign = ContentAlignment.MiddleCenter; + } + } + + } +} diff --git a/FlybyScript/MainForm.Designer.cs b/FlybyScript/MainForm.Designer.cs index 0b088a8..8e74130 100644 --- a/FlybyScript/MainForm.Designer.cs +++ b/FlybyScript/MainForm.Designer.cs @@ -29,11 +29,10 @@ private void InitializeComponent() { this.panelDragDrop = new System.Windows.Forms.Panel(); - this.linkLabel1 = new System.Windows.Forms.LinkLabel(); - this.linkCompPatch = new System.Windows.Forms.LinkLabel(); + this.dropdownOptions = new System.Windows.Forms.ComboBox(); + this.btnExperience = new System.Windows.Forms.Button(); this.statusLabel = new System.Windows.Forms.Label(); this.panelFAQ = new System.Windows.Forms.Panel(); - this.linkAppDev = new System.Windows.Forms.LinkLabel(); this.panelContainer = new System.Windows.Forms.Panel(); this.panelMain = new System.Windows.Forms.Panel(); this.panelDragDrop.SuspendLayout(); @@ -45,10 +44,11 @@ // this.panelDragDrop.AllowDrop = true; this.panelDragDrop.Anchor = System.Windows.Forms.AnchorStyles.None; - this.panelDragDrop.Controls.Add(this.linkLabel1); - this.panelDragDrop.Controls.Add(this.linkCompPatch); + this.panelDragDrop.BackColor = System.Drawing.Color.Transparent; + this.panelDragDrop.Controls.Add(this.dropdownOptions); + this.panelDragDrop.Controls.Add(this.btnExperience); this.panelDragDrop.Controls.Add(this.statusLabel); - this.panelDragDrop.Location = new System.Drawing.Point(47, 184); + this.panelDragDrop.Location = new System.Drawing.Point(57, 178); this.panelDragDrop.Name = "panelDragDrop"; this.panelDragDrop.Size = new System.Drawing.Size(436, 256); this.panelDragDrop.TabIndex = 0; @@ -56,41 +56,38 @@ this.panelDragDrop.DragEnter += new System.Windows.Forms.DragEventHandler(this.panelDragDrop_DragEnter); this.panelDragDrop.Paint += new System.Windows.Forms.PaintEventHandler(this.panelDragDrop_Paint); // - // linkLabel1 + // dropdownOptions // - this.linkLabel1.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.linkLabel1.AutoEllipsis = true; - this.linkLabel1.AutoSize = true; - this.linkLabel1.BackColor = System.Drawing.Color.Transparent; - this.linkLabel1.Cursor = System.Windows.Forms.Cursors.Hand; - this.linkLabel1.Font = new System.Drawing.Font("Segoe UI Variable Small", 8.25F); - this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; - this.linkLabel1.LinkColor = System.Drawing.Color.Gray; - this.linkLabel1.Location = new System.Drawing.Point(141, 230); - this.linkLabel1.Name = "linkLabel1"; - this.linkLabel1.Size = new System.Drawing.Size(157, 15); - this.linkLabel1.TabIndex = 1; - this.linkLabel1.TabStop = true; - this.linkLabel1.Text = "Can I upgrade to Windows 11?"; - this.linkLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + this.dropdownOptions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.dropdownOptions.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.dropdownOptions.Font = new System.Drawing.Font("Segoe UI Variable Display", 11.5F); + this.dropdownOptions.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(26)))), ((int)(((byte)(26))))); + this.dropdownOptions.FormattingEnabled = true; + this.dropdownOptions.Location = new System.Drawing.Point(51, 205); + this.dropdownOptions.Name = "dropdownOptions"; + this.dropdownOptions.Size = new System.Drawing.Size(348, 28); + this.dropdownOptions.TabIndex = 507; + this.dropdownOptions.SelectedIndexChanged += new System.EventHandler(this.dropdownOptions_SelectedIndexChanged); // - // linkCompPatch + // btnExperience // - this.linkCompPatch.ActiveLinkColor = System.Drawing.Color.BlueViolet; - this.linkCompPatch.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.linkCompPatch.AutoSize = true; - this.linkCompPatch.BackColor = System.Drawing.Color.Transparent; - this.linkCompPatch.Font = new System.Drawing.Font("Segoe UI Variable Small", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.linkCompPatch.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; - this.linkCompPatch.LinkColor = System.Drawing.Color.DimGray; - this.linkCompPatch.Location = new System.Drawing.Point(95, 208); - this.linkCompPatch.Name = "linkCompPatch"; - this.linkCompPatch.Size = new System.Drawing.Size(244, 15); - this.linkCompPatch.TabIndex = 211; - this.linkCompPatch.TabStop = true; - this.linkCompPatch.Text = "Apply Compatibility Patch to ISO (Clean Install)"; - this.linkCompPatch.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkCompPatch_LinkClicked); + this.btnExperience.AutoEllipsis = true; + this.btnExperience.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(239)))), ((int)(((byte)(237))))); + this.btnExperience.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnExperience.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(141)))), ((int)(((byte)(141)))), ((int)(((byte)(141))))); + this.btnExperience.FlatAppearance.BorderSize = 0; + this.btnExperience.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Gainsboro; + this.btnExperience.Font = new System.Drawing.Font("Segoe UI Variable Display Semib", 12F, System.Drawing.FontStyle.Bold); + this.btnExperience.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(26)))), ((int)(((byte)(26))))); + this.btnExperience.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnExperience.Location = new System.Drawing.Point(21, 195); + this.btnExperience.Name = "btnExperience"; + this.btnExperience.Padding = new System.Windows.Forms.Padding(30, 0, 0, 0); + this.btnExperience.Size = new System.Drawing.Size(387, 49); + this.btnExperience.TabIndex = 506; + this.btnExperience.TabStop = false; + this.btnExperience.UseCompatibleTextRendering = true; + this.btnExperience.UseVisualStyleBackColor = false; // // statusLabel // @@ -98,55 +95,44 @@ this.statusLabel.AutoEllipsis = true; this.statusLabel.BackColor = System.Drawing.Color.Transparent; this.statusLabel.Font = new System.Drawing.Font("Segoe UI Variable Text Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.statusLabel.Location = new System.Drawing.Point(39, 44); + this.statusLabel.Location = new System.Drawing.Point(39, 35); this.statusLabel.Name = "statusLabel"; - this.statusLabel.Size = new System.Drawing.Size(352, 139); + this.statusLabel.Size = new System.Drawing.Size(352, 142); this.statusLabel.TabIndex = 0; this.statusLabel.Text = "Move ISO here"; this.statusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.statusLabel.UseCompatibleTextRendering = true; // // panelFAQ // this.panelFAQ.AutoScroll = true; - this.panelFAQ.BackColor = System.Drawing.Color.Gainsboro; + this.panelFAQ.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232))))); this.panelFAQ.Dock = System.Windows.Forms.DockStyle.Right; - this.panelFAQ.Location = new System.Drawing.Point(561, 0); + this.panelFAQ.Location = new System.Drawing.Point(589, 0); this.panelFAQ.Name = "panelFAQ"; - this.panelFAQ.Size = new System.Drawing.Size(359, 585); + this.panelFAQ.Size = new System.Drawing.Size(331, 585); this.panelFAQ.TabIndex = 207; // - // linkAppDev - // - this.linkAppDev.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.linkAppDev.AutoSize = true; - this.linkAppDev.BackColor = System.Drawing.Color.Gainsboro; - this.linkAppDev.Font = new System.Drawing.Font("Segoe UI Variable Small", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.linkAppDev.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; - this.linkAppDev.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(115)))), ((int)(((byte)(193))))); - this.linkAppDev.Location = new System.Drawing.Point(821, -1); - this.linkAppDev.Name = "linkAppDev"; - this.linkAppDev.Size = new System.Drawing.Size(99, 15); - this.linkAppDev.TabIndex = 208; - this.linkAppDev.TabStop = true; - this.linkAppDev.Text = "We live on GitHub"; - this.linkAppDev.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkAppDev_LinkClicked); - // // panelContainer // + this.panelContainer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232))))); this.panelContainer.Controls.Add(this.panelMain); this.panelContainer.Dock = System.Windows.Forms.DockStyle.Fill; this.panelContainer.Location = new System.Drawing.Point(0, 0); this.panelContainer.Name = "panelContainer"; - this.panelContainer.Size = new System.Drawing.Size(561, 585); + this.panelContainer.Size = new System.Drawing.Size(589, 585); this.panelContainer.TabIndex = 209; // // panelMain // + this.panelMain.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.panelMain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(243)))), ((int)(((byte)(243))))); this.panelMain.Controls.Add(this.panelDragDrop); - this.panelMain.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelMain.Location = new System.Drawing.Point(0, 0); + this.panelMain.Location = new System.Drawing.Point(5, 3); this.panelMain.Name = "panelMain"; - this.panelMain.Size = new System.Drawing.Size(561, 585); + this.panelMain.Size = new System.Drawing.Size(580, 572); this.panelMain.TabIndex = 1; // // MainForm @@ -156,7 +142,6 @@ this.AutoScroll = true; this.BackColor = System.Drawing.Color.WhiteSmoke; this.ClientSize = new System.Drawing.Size(920, 585); - this.Controls.Add(this.linkAppDev); this.Controls.Add(this.panelContainer); this.Controls.Add(this.panelFAQ); this.Name = "MainForm"; @@ -164,11 +149,9 @@ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Flyby11 Upgrading Assistant"; this.panelDragDrop.ResumeLayout(false); - this.panelDragDrop.PerformLayout(); this.panelContainer.ResumeLayout(false); this.panelMain.ResumeLayout(false); this.ResumeLayout(false); - this.PerformLayout(); } @@ -177,11 +160,10 @@ private System.Windows.Forms.Panel panelDragDrop; private System.Windows.Forms.Label statusLabel; private System.Windows.Forms.Panel panelFAQ; - private System.Windows.Forms.LinkLabel linkAppDev; - private System.Windows.Forms.LinkLabel linkCompPatch; private System.Windows.Forms.Panel panelContainer; private System.Windows.Forms.Panel panelMain; - private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.Button btnExperience; + private System.Windows.Forms.ComboBox dropdownOptions; } } diff --git a/FlybyScript/MainForm.cs b/FlybyScript/MainForm.cs index 7c89d1f..7a4b3b7 100644 --- a/FlybyScript/MainForm.cs +++ b/FlybyScript/MainForm.cs @@ -1,7 +1,13 @@ -using System; +using Flyby11.Properties; +using System; +using System.Data; using System.Diagnostics; using System.Drawing; +using System.Globalization; using System.IO; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; using System.Windows.Forms; using Views; @@ -10,45 +16,234 @@ namespace Flyby11 public partial class MainForm : Form { private readonly IsoHandler _isoHandler; - private readonly FAQHandler _faqHandler; + private Logger logger; + private ClippyUI clippyUI; + + public FAQHandler _faqHandler { get; private set; } + + [DllImport("CpuCheckNative.dll", CallingConvention = CallingConvention.Cdecl)] + public static extern bool HasPopcnt(); public MainForm() { InitializeComponent(); + logger = new Logger(this); + // Uncomment lower line and add lang code to run localization test + // Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CN"); _isoHandler = new IsoHandler(UpdateStatusLabel); _faqHandler = new FAQHandler(panelFAQ, UpdateStatusLabel); _faqHandler.InitializeFAQ(); - UpdateStatusLabel("Drag and drop the Windows 11 ISO to patch it and install on unsupported hardware (Inplace Upgrade)."); + InitializeLocalizedStrings(); + InitializeClippyUI(); + + // Drag and drop the Windows 11 ISO to patch it and install on unsupported hardware (Inplace Upgrade). + UpdateStatusLabel(Locales.Strings.ctl_statusLabel); + + // Perform system compatibility check and show the appropriate message + bool? isCompatible = CheckSystemCompatibility(); + + if (isCompatible.HasValue) + { + ShowCompatibilityMessage(isCompatible.Value); + } + else + { + + MessageBox.Show( + "A preliminary check of the likelihood for a successful upgrade can be performed if you download the 'CpuCheckNative.dll' from the GitHub repository and place it in the app directory.\n" + + "Once the DLL is in place, the detailed compatibility check will be enabled, allowing us to evaluate CPU features like SSE4.2 and POPCNT. ", + "Flyby11 - Clippy has something to say!", + MessageBoxButtons.OK, + MessageBoxIcon.Information + ); + + } + } + + private bool? CheckSystemCompatibility() + { + try + { + // Attempt to check for POPCNT support + return HasPopcnt(); + } + catch (DllNotFoundException) + { + // DLL is missing, return null for compatibility + // UpdateStatusLabel("Required DLL 'CpuCheckNative.dll' not found. Skipping detailed compatibility check."); + return null; // Indicating that compatibility could not be checked + } + catch (Exception ex) + { + // Log false for compatibility + UpdateStatusLabel($"An error occurred while checking system compatibility: {ex.Message}"); + return false; // Defaulting to incompatible if another error occurs + } + } + + private void ShowCompatibilityMessage(bool isCompatible) + { + if (isCompatible) + { + string message = "You should be able to upgrade your system to Windows 11, as long as there are no incompatible device drivers or other issues.\n" + + "Everything looks good for the upgrade, so you're ready to move forward!"; + ShowMessage("Upgrade Ready", message); + } + else + { + string message = "Unfortunately, your system doesn't support a key requirement for upgrading to Windows 11.\n" + + "The missing feature is POPCNT, which is necessary for the upgrade. Please check your system's hardware to ensure it meets the requirements."; + ShowMessage("Upgrade Blocked", message); + } + } + + + + private void ShowMessage(string title, string message) + { + MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + private void InitializeLocalizedStrings() + { + // Set localized strings for the UI elements + Text = Locales.Strings.ctl_FormTitle; + + dropdownOptions.Items.Add("More options..."); + dropdownOptions.Items.Add(Locales.Strings.ctl_linkSelectComputer); + dropdownOptions.Items.Add(Locales.Strings.ctl_inkCompPatch); + dropdownOptions.Items.Add(Locales.Strings.ctl_linkCiuv); + dropdownOptions.Items.Add("(Vote) " + Locales.Strings.ctl_linkVote); // "Did the upgrade work?" + dropdownOptions.Items.Add("(App) Trim down Windows 11 with TidyOS"); // "TidyOS Repository" + dropdownOptions.SelectedIndex = 0; + } + + private void InitializeClippyUI() + { + clippyUI = new ClippyUI(this, logger); + clippyUI.SetClippyPosition(this); + clippyUI.Show(); } private void panelDragDrop_Paint(object sender, PaintEventArgs e) { - var borderColor = Color.DodgerBlue; - var borderThickness = 6; + var borderThickness = 8; + var cornerRadius = 24; + var glowThickness = 2; // Thin glow layer + var control = (Control)sender; + var rect = new Rectangle( + borderThickness / 2, + borderThickness / 2, + control.Width - borderThickness, + control.Height - borderThickness + ); - // Draw a dotted border - var dashPattern = new float[] { 4, 2 }; // Dots and gaps - using (var pen = new Pen(borderColor, borderThickness)) + e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; + e.Graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; + + // subtle shadow + using (var shadowBrush = new SolidBrush(Color.FromArgb(30, 0, 0, 0))) { - pen.DashPattern = dashPattern; - pen.Alignment = System.Drawing.Drawing2D.PenAlignment.Center; - - var rect = new Rectangle( - borderThickness / 2, - borderThickness / 2, - panelDragDrop.Width - borderThickness, - panelDragDrop.Height - borderThickness - ); - - e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; - e.Graphics.DrawRectangle(pen, rect); + var shadowRect = new Rectangle(6, 6, control.Width - 12, control.Height - 12); + using (var shadowPath = new System.Drawing.Drawing2D.GraphicsPath()) + { + shadowPath.AddArc(shadowRect.X, shadowRect.Y, cornerRadius, cornerRadius, 180, 90); + shadowPath.AddArc(shadowRect.Right - cornerRadius, shadowRect.Y, cornerRadius, cornerRadius, 270, 90); + shadowPath.AddArc(shadowRect.Right - cornerRadius, shadowRect.Bottom - cornerRadius, cornerRadius, cornerRadius, 0, 90); + shadowPath.AddArc(shadowRect.X, shadowRect.Bottom - cornerRadius, cornerRadius, cornerRadius, 90, 90); + shadowPath.CloseFigure(); + e.Graphics.FillPath(shadowBrush, shadowPath); + } } - using (var shadowBrush = new SolidBrush(Color.FromArgb(30, 0, 0, 0))) // Transparent shadow + //frosted glass background (simulated with semi-transparent gradient) + using (var frostedBrush = new System.Drawing.Drawing2D.LinearGradientBrush( + new Rectangle(0, 0, control.Width, control.Height), + Color.FromArgb(220, 240, 245, 255), // Very light blue (mica-like) + Color.FromArgb(220, 235, 230, 255), // Very light lavender + System.Drawing.Drawing2D.LinearGradientMode.Vertical)) { - var shadowRect = new Rectangle(6, 6, panelDragDrop.Width, panelDragDrop.Height); - e.Graphics.FillRectangle(shadowBrush, shadowRect); + using (var frostedPath = new System.Drawing.Drawing2D.GraphicsPath()) + { + frostedPath.AddArc(rect.X, rect.Y, cornerRadius, cornerRadius, 180, 90); + frostedPath.AddArc(rect.Right - cornerRadius, rect.Y, cornerRadius, cornerRadius, 270, 90); + frostedPath.AddArc(rect.Right - cornerRadius, rect.Bottom - cornerRadius, cornerRadius, cornerRadius, 0, 90); + frostedPath.AddArc(rect.X, rect.Bottom - cornerRadius, cornerRadius, cornerRadius, 90, 90); + frostedPath.CloseFigure(); + e.Graphics.FillPath(frostedBrush, frostedPath); + } + } + + // Glowing border with outer layer, subtle glow + using (var glowBrush = new System.Drawing.Drawing2D.LinearGradientBrush( + rect, + Color.FromArgb(100, 150, 200, 255), // Soft blue glow + Color.FromArgb(100, 200, 150, 255), // Soft lavender glow + System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal)) + using (var glowPen = new Pen(glowBrush, borderThickness + glowThickness)) + { + using (var glowPath = new System.Drawing.Drawing2D.GraphicsPath()) + { + glowPath.AddArc(rect.X, rect.Y, cornerRadius, cornerRadius, 180, 90); + glowPath.AddArc(rect.Right - cornerRadius, rect.Y, cornerRadius, cornerRadius, 270, 90); + glowPath.AddArc(rect.Right - cornerRadius, rect.Bottom - cornerRadius, cornerRadius, cornerRadius, 0, 90); + glowPath.AddArc(rect.X, rect.Bottom - cornerRadius, cornerRadius, cornerRadius, 90, 90); + glowPath.CloseFigure(); + e.Graphics.DrawPath(glowPen, glowPath); + } + } + + // Main border (inner layer, solid but soft) + using (var borderBrush = new System.Drawing.Drawing2D.LinearGradientBrush( + rect, + Color.FromArgb(255, 160, 196, 255), // Soft Azure Blue + Color.FromArgb(255, 199, 135, 255), // Vibrant Lavender + System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal)) + using (var borderPen = new Pen(borderBrush, borderThickness)) + { + using (var borderPath = new System.Drawing.Drawing2D.GraphicsPath()) + { + borderPath.AddArc(rect.X, rect.Y, cornerRadius, cornerRadius, 180, 90); + borderPath.AddArc(rect.Right - cornerRadius, rect.Y, cornerRadius, cornerRadius, 270, 90); + borderPath.AddArc(rect.Right - cornerRadius, rect.Bottom - cornerRadius, cornerRadius, cornerRadius, 0, 90); + borderPath.AddArc(rect.X, rect.Bottom - cornerRadius, cornerRadius, cornerRadius, 90, 90); + borderPath.CloseFigure(); + e.Graphics.DrawPath(borderPen, borderPath); + } + } + } + + private async Task HandleIsoInput(object sender, EventArgs e) + { + string isoPath = null; + + if (e is DragEventArgs dragEvent && dragEvent.Data.GetDataPresent(DataFormats.FileDrop)) + { + string[] files = (string[])dragEvent.Data.GetData(DataFormats.FileDrop); + if (files.Length == 1 && Path.GetExtension(files[0]).Equals(".iso", StringComparison.OrdinalIgnoreCase)) + { + isoPath = files[0]; + } + } + + // Always show dialog if no ISO found yet (e.g. from dropdownOptions) + if (isoPath == null) + { + using (OpenFileDialog openFileDialog = new OpenFileDialog()) + { + openFileDialog.Filter = "ISO Files (*.iso)|*.iso"; + openFileDialog.Title = "Select an ISO File"; + if (openFileDialog.ShowDialog() == DialogResult.OK) + { + isoPath = openFileDialog.FileName; + } + } + } + + if (!string.IsNullOrEmpty(isoPath) && File.Exists(isoPath)) + { + await _isoHandler.HandleIso(isoPath); } } @@ -58,47 +253,72 @@ namespace Flyby11 if (e.Data.GetDataPresent(DataFormats.FileDrop)) { string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); - if (files.Length == 1 && Path.GetExtension(files[0]).Equals(".iso", StringComparison.OrdinalIgnoreCase)) - { - e.Effect = DragDropEffects.Copy; - } - else - { - e.Effect = DragDropEffects.None; - } + e.Effect = (files.Length == 1 && Path.GetExtension(files[0]).Equals(".iso", StringComparison.OrdinalIgnoreCase)) + ? DragDropEffects.Copy + : DragDropEffects.None; } } private async void panelDragDrop_DragDrop(object sender, DragEventArgs e) { - // Get the dropped file path - string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); - if (files.Length == 1) - { - string isoPath = files[0]; // Full path to the ISO file - await _isoHandler.HandleIso(isoPath); // Mount the ISO and start the setup process - } + await HandleIsoInput(sender, e); } // Update the status label private void UpdateStatusLabel(string message) { statusLabel.Text = message; - statusLabel.Refresh(); // Ensure the label updates in real-time + statusLabel.Refresh(); } - private void linkAppDev_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + private async void dropdownOptions_SelectedIndexChanged(object sender, EventArgs e) { - Process.Start("https://github.com/builtbybel/Flyby11"); + { + // Ignore the default "More options..." item + if (dropdownOptions.SelectedIndex <= 0) + return; + + switch (dropdownOptions.SelectedIndex) + { + case 1: // Select Computer + await HandleIsoInput(sender, null); + break; + + case 2: // Compatibility Patch + HandleCompatibilityPatch(); + break; + + case 3: // Can I Upgrade View + HandleCanIUpgradeView(); + break; + + case 4: + // Open the GitHub discussion for feedback + Process.Start("https://github.com/builtbybel/Flyby11/discussions/72"); + break; + + case 5: + // OPen TidyOS Repository + Process.Start("https://github.com/builtbybel/TidyOS/"); + break; + } + // Reset selection back to default prompt after action + dropdownOptions.SelectedIndex = 0; + } } - private void linkCompPatch_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + /// + /// Handles the event for the compatibility patch. + /// + private void HandleCompatibilityPatch() { using (var folderDialog = new FolderBrowserDialog()) { - folderDialog.Description = "Select the USB drive containing your Windows 11 installation files. " + - "This feature adds a compatibility patch to bypass certain system requirements. " + - "Compatible with drives prepared by any tool, including Rufus. Ensure the drive is ready!"; + /* Select the USB drive containing your Windows 11 installation files. " + + "This feature adds a compatibility patch to bypass certain system requirements. " + + "Compatible with drives prepared by any tool, including Rufus. Ensure the drive is ready! */ + + folderDialog.Description = Locales.Strings.compPatch_msgSelectDrive.Replace(@"\n", Environment.NewLine); if (folderDialog.ShowDialog() == DialogResult.OK) { @@ -107,44 +327,50 @@ namespace Flyby11 if (driveInfo.DriveType == DriveType.Removable && driveInfo.IsReady) { - if (MessageBox.Show("This will apply compatibility bypass settings on the selected USB drive. Continue?", + if (MessageBox.Show(Locales.Strings.compPatch_msgSelectDriveConfirm, //This will apply compatibility bypass settings on the selected USB drive.Continue ? "Apply Bypass Patch", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) { try { _isoHandler.CreateUnattendXml(selectedPath); - MessageBox.Show("Bypass patch applied successfully!", "Apply Bypass Patch", MessageBoxButtons.OK, MessageBoxIcon.Information); - UpdateStatusLabel("Bypass patch applied successfully!"); + // Bypass patch applied successfully! + MessageBox.Show(Locales.Strings.compPatch_msgSuccess, "Apply Bypass Patch", MessageBoxButtons.OK, MessageBoxIcon.Information); + UpdateStatusLabel(Locales.Strings.compPatch_msgSuccess); } catch (Exception ex) { - UpdateStatusLabel($"Failed to apply bypass patch: {ex.Message}"); + // Failed to apply bypass patch: + UpdateStatusLabel($"{Locales.Strings.compPatch_msgFailedEx} {ex.Message}"); } } else { - UpdateStatusLabel("Bypass patch canceled by user."); + UpdateStatusLabel(Locales.Strings.compPatch_debugCancel); // Bypass patch canceled by user. } } else { - MessageBox.Show("The selected path is not a removable drive. Please select a USB drive.", "Invalid Selection", MessageBoxButtons.OK, MessageBoxIcon.Error); - UpdateStatusLabel("User attempted to select a non-removable drive."); + // The selected path is not a removable drive. Please select a USB drive. + MessageBox.Show(Locales.Strings.compPatch_msgNotRemovableDrive, "Invalid Selection", MessageBoxButtons.OK, MessageBoxIcon.Error); + + // User attempted to select a non-removable drive. + UpdateStatusLabel(Locales.Strings.compPatch_debugNotRemovableDrive); } } else { - UpdateStatusLabel("No USB drive selected for patching."); + UpdateStatusLabel(Locales.Strings.compPatch_debugNoUSBDrive); // No USB drive selected for patching. } } } - private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + /// + /// Opens the "Can I Upgrade" view. + /// + private void HandleCanIUpgradeView() { CanIUpgradeView canIUpgradeView = new CanIUpgradeView(); SwitchView.SetView(canIUpgradeView, panelContainer); } - - } } \ No newline at end of file diff --git a/FlybyScript/Properties/AssemblyInfo.cs b/FlybyScript/Properties/AssemblyInfo.cs index 51125cc..e1f0b04 100644 --- a/FlybyScript/Properties/AssemblyInfo.cs +++ b/FlybyScript/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("A Belim app creation")] [assembly: AssemblyProduct("Flyby11")] -[assembly: AssemblyCopyright("Copyright © 2024 A Belim app creation")] +[assembly: AssemblyCopyright("Copyright © 2025 A Belim app creation")] [assembly: AssemblyTrademark("Builtbybel")] [assembly: AssemblyCulture("")] @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Buildnummer // Revision // -[assembly: AssemblyVersion("1.2.100.0")] -[assembly: AssemblyFileVersion("1.2.100.0")] +[assembly: AssemblyVersion("2.2.350")] +[assembly: AssemblyFileVersion("2.2.350")] diff --git a/FlybyScript/Properties/Resources.Designer.cs b/FlybyScript/Properties/Resources.Designer.cs index f1f944d..4d05965 100644 --- a/FlybyScript/Properties/Resources.Designer.cs +++ b/FlybyScript/Properties/Resources.Designer.cs @@ -22,7 +22,7 @@ namespace Flyby11.Properties { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { + public class Resources { private static global::System.Resources.ResourceManager resourceMan; @@ -36,7 +36,7 @@ namespace Flyby11.Properties { /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { + public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Flyby11.Properties.Resources", typeof(Resources).Assembly); @@ -51,7 +51,7 @@ namespace Flyby11.Properties { /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { + public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } diff --git a/FlybyScript/Properties/Resources.resx b/FlybyScript/Properties/Resources.resx index af7dbeb..1af7de1 100644 --- a/FlybyScript/Properties/Resources.resx +++ b/FlybyScript/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.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