├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md └── src └── WhyNotWinAI ├── Helpers ├── DataHelper.cs ├── Logger.cs └── ViewHelper.cs ├── SystemBase.cs ├── Views ├── checksPageView.Designer.cs ├── checksPageView.cs └── checksPageView.resx └── frontend.html /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-detectable=true 2 | *.html linguist-detectable=true 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # ASP.NET Scaffolding 66 | ScaffoldingReadMe.txt 67 | 68 | # StyleCop 69 | StyleCopReport.xml 70 | 71 | # Files built by Visual Studio 72 | *_i.c 73 | *_p.c 74 | *_h.h 75 | *.ilk 76 | *.meta 77 | *.obj 78 | *.iobj 79 | *.pch 80 | *.pdb 81 | *.ipdb 82 | *.pgc 83 | *.pgd 84 | *.rsp 85 | *.sbr 86 | *.tlb 87 | *.tli 88 | *.tlh 89 | *.tmp 90 | *.tmp_proj 91 | *_wpftmp.csproj 92 | *.log 93 | *.tlog 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 298 | *.vbp 299 | 300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 301 | *.dsw 302 | *.dsp 303 | 304 | # Visual Studio 6 technical files 305 | *.ncb 306 | *.aps 307 | 308 | # Visual Studio LightSwitch build output 309 | **/*.HTMLClient/GeneratedArtifacts 310 | **/*.DesktopClient/GeneratedArtifacts 311 | **/*.DesktopClient/ModelManifest.xml 312 | **/*.Server/GeneratedArtifacts 313 | **/*.Server/ModelManifest.xml 314 | _Pvt_Extensions 315 | 316 | # Paket dependency manager 317 | .paket/paket.exe 318 | paket-files/ 319 | 320 | # FAKE - F# Make 321 | .fake/ 322 | 323 | # CodeRush personal settings 324 | .cr/personal 325 | 326 | # Python Tools for Visual Studio (PTVS) 327 | __pycache__/ 328 | *.pyc 329 | 330 | # Cake - Uncomment if you are using it 331 | # tools/** 332 | # !tools/packages.config 333 | 334 | # Tabs Studio 335 | *.tss 336 | 337 | # Telerik's JustMock configuration file 338 | *.jmconfig 339 | 340 | # BizTalk build output 341 | *.btp.cs 342 | *.btm.cs 343 | *.odx.cs 344 | *.xsd.cs 345 | 346 | # OpenCover UI analysis results 347 | OpenCover/ 348 | 349 | # Azure Stream Analytics local run output 350 | ASALocalRun/ 351 | 352 | # MSBuild Binary and Structured Log 353 | *.binlog 354 | 355 | # NVidia Nsight GPU debugger configuration file 356 | *.nvuser 357 | 358 | # MFractors (Xamarin productivity tool) working folder 359 | .mfractor/ 360 | 361 | # Local History for Visual Studio 362 | .localhistory/ 363 | 364 | # Visual Studio History (VSHistory) files 365 | .vshistory/ 366 | 367 | # BeatPulse healthcheck temp database 368 | healthchecksdb 369 | 370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 371 | MigrationBackup/ 372 | 373 | # Ionide (cross platform F# VS Code tools) working folder 374 | .ionide/ 375 | 376 | # Fody - auto-generated XML schema 377 | FodyWeavers.xsd 378 | 379 | # VS Code files for those working on multiple tools 380 | .vscode/* 381 | !.vscode/settings.json 382 | !.vscode/tasks.json 383 | !.vscode/launch.json 384 | !.vscode/extensions.json 385 | *.code-workspace 386 | 387 | # Local History for Visual Studio Code 388 | .history/ 389 | 390 | # Windows Installer files from build outputs 391 | *.cab 392 | *.msi 393 | *.msix 394 | *.msm 395 | *.msp 396 | 397 | # JetBrains Rider 398 | *.sln.iml 399 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Builtbybel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WhyNotWinAI 2 | This app checks whether your hardware is compatible with the latest Windows builds (such as the announced Windows 11 version 24H2, and the new Windows Germanium, also known as the Hudson Valley user experience platform) and the continuously expanding AI features. CPU support relies on the current lists provided by Microsoft for Windows 11 and will be expanded accordingly as new specifications become available. 3 | 4 | Additionally, this app can perform a thorough system analysis and also detect and disable internal AI features in various Windows areas. 5 | 6 | ![Screenshot 2024-02-10 192632](https://github.com/builtbybel/WhyNotWinAI/assets/57478606/9ffd826b-0e71-43ac-9735-9a1f5ee5741a) 7 | -------------------------------------------------------------------------------- /src/WhyNotWinAI/Helpers/DataHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace DataHelper 4 | { 5 | internal class Data 6 | { 7 | public static string DataRootDir = Application.StartupPath + 8 | @"\app\"; 9 | } 10 | 11 | public static class Uri 12 | { 13 | public const string URL_BUILTBYBEL = "https://www.builtbybel.com"; 14 | public const string URL_ASSEMBLY = "https://raw.githubusercontent.com/builtbybel/WhyNotWinAI/main/src/WhyNotWinAI/Properties/AssemblyInfo.cs"; 15 | public const string URL_GITREPO = "https://github.com/builtbybel/WhyNotWinAI"; 16 | public const string URL_ICONATTRIBUTION = "https://www.flaticon.com/free-icon/toaster_7175212"; 17 | public const string URL_GITLATEST = URL_GITREPO + "/releases/latest"; 18 | } 19 | } -------------------------------------------------------------------------------- /src/WhyNotWinAI/Helpers/Logger.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Web.WebView2.WinForms; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Drawing; 5 | 6 | namespace WhyNotWinAI 7 | { 8 | public class Logger 9 | { 10 | private WebView2 webView; 11 | 12 | public Logger(WebView2 webView) 13 | { 14 | this.webView = webView; 15 | } 16 | 17 | // Log method for a list of strings 18 | public void Log(List messages, Color color) 19 | { 20 | if (webView.InvokeRequired) 21 | { 22 | webView.Invoke(new Action(() => Log(messages, color))); 23 | return; 24 | } 25 | 26 | foreach (var message in messages) 27 | { 28 | LogToWebView(message, color); 29 | } 30 | } 31 | 32 | // Log method for a single string 33 | public void Log(string message, Color color) 34 | { 35 | if (webView.InvokeRequired) 36 | { 37 | webView.Invoke(new Action(() => Log(message, color))); 38 | return; 39 | } 40 | 41 | LogToWebView(message, color); 42 | } 43 | 44 | 45 | // Log method with custom style 46 | public void LogWithCustomStyle(string message, Color foregroundColor, Color backgroundColor, int fontSize) 47 | { 48 | if (webView.InvokeRequired) 49 | { 50 | webView.Invoke(new Action(() => LogWithCustomStyle(message, foregroundColor, backgroundColor, fontSize))); 51 | return; 52 | } 53 | 54 | // Format message with custom style 55 | string formattedMessage = $"
{message}
"; 56 | 57 | // Log formatted message 58 | LogToWebView(formattedMessage, Color.Black); 59 | } 60 | 61 | // Helper method to add log entry to WebView2 62 | private void LogToWebView(string message, Color color) 63 | { 64 | // Replace "\n" with HTML line breaks 65 | message = message.Replace("\n", "
"); 66 | 67 | // Wrap each message in a
with specified color 68 | string formattedMessage = $"
{message}
"; 69 | 70 | // Post the message to WebView2 71 | webView.CoreWebView2.PostWebMessageAsString(formattedMessage); 72 | 73 | // Scroll down after adding new content 74 | webView.ExecuteScriptAsync("window.scrollTo(0, document.body.scrollHeight);"); 75 | } 76 | 77 | // Helper method to convert Color to hexadecimal 78 | private string ColorToHex(Color color) 79 | { 80 | return $"#{color.R:X2}{color.G:X2}{color.B:X2}"; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/WhyNotWinAI/Helpers/ViewHelper.cs: -------------------------------------------------------------------------------- 1 | using WhyNotWinAI; 2 | using System.Linq; 3 | using System.Windows.Forms; 4 | 5 | namespace ViewHelper 6 | { 7 | public static class SwitchView 8 | { 9 | public static MainForm mainForm; 10 | public static Control INavPage; 11 | 12 | public static void SetView(Control View) 13 | { 14 | var control = View as Control; 15 | 16 | control.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom); 17 | control.Dock = DockStyle.Fill; 18 | INavPage.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom); 19 | INavPage.Dock = DockStyle.Fill; 20 | 21 | mainForm.pnlForm.Controls.Clear(); 22 | mainForm.pnlForm.Controls.Add(View); 23 | } 24 | 25 | // Handle the back navigation 26 | public static void SetMainFormAsView() 27 | { 28 | var mainForm = Application.OpenForms.OfType().Single(); 29 | mainForm.pnlForm.Controls.Clear(); 30 | if (INavPage != null) mainForm.pnlForm.Controls.Add(INavPage); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/WhyNotWinAI/SystemBase.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | using System.Threading.Tasks; 3 | 4 | namespace WhyNotWinAI 5 | { 6 | public abstract class SystemCheck 7 | { 8 | public abstract Task<(string message, Color color)> RunCheck(Logger logger); 9 | } 10 | } -------------------------------------------------------------------------------- /src/WhyNotWinAI/Views/checksPageView.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace WhyNotWinAI 2 | { 3 | partial class checksPageView 4 | { 5 | /// 6 | /// Erforderliche Designervariable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Verwendete Ressourcen bereinigen. 12 | /// 13 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Vom Komponenten-Designer generierter Code 24 | 25 | /// 26 | /// Erforderliche Methode für die Designerunterstützung. 27 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); 33 | this.textHeaderApp = new System.Windows.Forms.ToolStripTextBox(); 34 | this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); 35 | this.contextMenu.SuspendLayout(); 36 | this.SuspendLayout(); 37 | // 38 | // contextMenu 39 | // 40 | this.contextMenu.BackColor = System.Drawing.Color.WhiteSmoke; 41 | this.contextMenu.Font = new System.Drawing.Font("Segoe UI Variable Text Semiligh", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 42 | this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 43 | this.textHeaderApp, 44 | this.toolStripMenuItem1}); 45 | this.contextMenu.Name = "menuMain"; 46 | this.contextMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; 47 | this.contextMenu.Size = new System.Drawing.Size(222, 48); 48 | // 49 | // textHeaderApp 50 | // 51 | this.textHeaderApp.BackColor = System.Drawing.Color.WhiteSmoke; 52 | this.textHeaderApp.BorderStyle = System.Windows.Forms.BorderStyle.None; 53 | this.textHeaderApp.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 54 | this.textHeaderApp.ForeColor = System.Drawing.Color.Gray; 55 | this.textHeaderApp.Margin = new System.Windows.Forms.Padding(1, 1, 1, 3); 56 | this.textHeaderApp.Name = "textHeaderApp"; 57 | this.textHeaderApp.Size = new System.Drawing.Size(100, 16); 58 | this.textHeaderApp.Text = "Settings"; 59 | // 60 | // toolStripMenuItem1 61 | // 62 | this.toolStripMenuItem1.Font = new System.Drawing.Font("Segoe UI Variable Display Semib", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 63 | this.toolStripMenuItem1.Name = "toolStripMenuItem1"; 64 | this.toolStripMenuItem1.Size = new System.Drawing.Size(221, 24); 65 | this.toolStripMenuItem1.Text = "Check for updates..."; 66 | this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click); 67 | // 68 | // EarthPageView 69 | // 70 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 71 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 72 | this.AutoScroll = true; 73 | this.Name = "EarthPageView"; 74 | this.Size = new System.Drawing.Size(929, 607); 75 | this.contextMenu.ResumeLayout(false); 76 | this.contextMenu.PerformLayout(); 77 | this.ResumeLayout(false); 78 | 79 | } 80 | 81 | #endregion 82 | private System.Windows.Forms.ContextMenuStrip contextMenu; 83 | private System.Windows.Forms.ToolStripTextBox textHeaderApp; 84 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/WhyNotWinAI/Views/checksPageView.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Web.WebView2.Core; 2 | using Microsoft.Web.WebView2.WinForms; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Diagnostics; 6 | using System.Drawing; 7 | using System.IO; 8 | using System.Text; 9 | using System.Windows.Forms; 10 | 11 | namespace WhyNotWinAI 12 | { 13 | public partial class checksPageView : UserControl 14 | { 15 | private Logger logger; 16 | private WebView2 webView; 17 | private bool isChecksRunning = false; 18 | 19 | public checksPageView() 20 | { 21 | InitializeComponent(); 22 | InitializeWebView(); 23 | logger = new Logger(webView); 24 | } 25 | 26 | private async void InitializeWebView() 27 | { 28 | webView = new WebView2 29 | { 30 | Dock = DockStyle.None, 31 | Width = this.Width, 32 | Height = this.Height, 33 | Parent = this, 34 | Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 35 | }; 36 | 37 | webView.CoreWebView2InitializationCompleted += webView2_CoreWebView2InitializationCompleted; 38 | 39 | await webView.EnsureCoreWebView2Async(null); 40 | 41 | string pathToHtmlFile = Application.StartupPath + "\\frontend.html"; 42 | if (File.Exists(pathToHtmlFile)) 43 | { 44 | string htmlContent = File.ReadAllText(pathToHtmlFile); 45 | webView.NavigateToString(htmlContent); 46 | } 47 | 48 | await webView.EnsureCoreWebView2Async(); 49 | webView.WebMessageReceived += (s, e) => 50 | { 51 | string message = e.TryGetWebMessageAsString(); 52 | if (message == "runChecks") 53 | { 54 | RunChecks(); 55 | } 56 | else if (message == "toggleChecks") 57 | { 58 | ToggleChecks(); 59 | } 60 | }; 61 | webView.CoreWebView2.NewWindowRequested += CoreWebView2_NewWindowRequested; 62 | } 63 | 64 | private async void RunChecks() 65 | { 66 | var checks = new List 67 | { 68 | new InfoPoint(logger), 69 | new WindowsVersionCheck(), 70 | new ArchitectureCheck(), 71 | new MemoryCheck(), 72 | new StorageTypeCheck(), 73 | new FirmwareCheck(), 74 | new TPMCheck(), 75 | new GraphicsCheck(), 76 | new DisplayCheck(), 77 | new InetCheck(), 78 | new BatteryHealthCheck() 79 | }; 80 | 81 | // Only add ProcessorCheck to the list of checks if the toggle is on 82 | if (isChecksRunning) 83 | { 84 | checks.Add(new ProcessorCheck()); 85 | checks.Add(new CUDACheck()); 86 | } 87 | 88 | int totalChecks = checks.Count; 89 | int successfulChecks = 0; 90 | int neutralChecks = 0; 91 | int failedChecks = 0; 92 | StringBuilder rockets = new StringBuilder(); 93 | StringBuilder bananas = new StringBuilder(); 94 | StringBuilder tomatos = new StringBuilder(); 95 | 96 | foreach (var check in checks) 97 | { 98 | (string checkMessage, Color color) = await check.RunCheck(logger); 99 | 100 | if (color == Color.Green) 101 | { 102 | successfulChecks++; 103 | rockets.Append("🚀"); 104 | } 105 | else if (color == Color.Tomato) 106 | { 107 | neutralChecks++; 108 | bananas.Append("🍌"); 109 | } 110 | else if (color == Color.Red) 111 | { 112 | failedChecks++; 113 | tomatos.Append("🍅"); 114 | } 115 | 116 | logger.Log(checkMessage, color); 117 | } 118 | 119 | string finalMessage = ""; 120 | if (successfulChecks == totalChecks) 121 | { 122 | finalMessage = "All systems go! You're ready to conquer the digital universe!"; 123 | } 124 | else if (successfulChecks >= totalChecks / 2) 125 | { 126 | finalMessage = "You're almost there! Keep pushing, victory is within reach!"; 127 | } 128 | else if (failedChecks > successfulChecks) 129 | { 130 | finalMessage = "Challenges are just opportunities in disguise. Embrace the journey!"; 131 | } 132 | else 133 | { 134 | finalMessage = "Stay resilient! Every setback is a setup for a comeback!"; 135 | } 136 | 137 | finalMessage += $"

Checks completed.
{rockets} {successfulChecks} successful, {bananas} {neutralChecks} neutral, {tomatos} {failedChecks} failed
"; 138 | webView.CoreWebView2.PostWebMessageAsString(finalMessage); 139 | } 140 | 141 | private void ToggleChecks() 142 | { 143 | isChecksRunning = !isChecksRunning; 144 | } 145 | 146 | private void CoreWebView2_NewWindowRequested(object sender, CoreWebView2NewWindowRequestedEventArgs e) 147 | { 148 | Process.Start(new ProcessStartInfo 149 | { 150 | FileName = e.Uri, 151 | UseShellExecute = true 152 | }); 153 | e.Handled = true; 154 | } 155 | 156 | private void webView2_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e) 157 | { 158 | if (e.IsSuccess) 159 | { 160 | } 161 | else 162 | { 163 | MessageBox.Show("WebView2 initialization failed."); 164 | } 165 | } 166 | 167 | private void linkURLIcon_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 168 | { 169 | Process.Start(DataHelper.Uri.URL_ICONATTRIBUTION); 170 | } 171 | 172 | private void btnHamburger_Click(object sender, EventArgs e) 173 | { 174 | this.contextMenu.Show(Cursor.Position.X, Cursor.Position.Y); 175 | } 176 | 177 | private void toolStripMenuItem1_Click(object sender, EventArgs e) 178 | { 179 | string websiteUrl = "https://github.com/builtbybel/WhyNotWinAI/releases"; 180 | webView.CoreWebView2.Navigate(websiteUrl); 181 | } 182 | } 183 | } -------------------------------------------------------------------------------- /src/WhyNotWinAI/Views/checksPageView.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | -------------------------------------------------------------------------------- /src/WhyNotWinAI/frontend.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | GenGermanium 7 | 281 | 282 | 283 |
284 | 285 | 286 | 287 |

288 |

WhyNotWinAI

289 |

Check if your system can handle the new AI-powered features.

290 |

291 | 292 | Follow on GitHub 293 | 294 |

295 |
296 | 297 |
298 | 302 |
303 | 304 | 305 |
306 |
307 |
Let's dive into the potential of your PC running next-gen Windows AI (Germanium) Platform...
308 |
309 | 310 |
311 |
312 |

Exciting News Alert! 🚀 Microsoft has confirmed that the upcoming Windows OS release expected this fall will be branded Windows 11, version 24H2! More Infos

313 |
314 | 315 | Run compatibility check 316 |
317 |
318 | 319 | Some integrated AI features can be disabled with this option, such as the Copilot button in the taskbar and in the Edge browser. To identify installed AI on your computer, activate the top toggle 'Use AI-Driven checks' for a thorough analysis. 320 |
321 |
322 |
323 | 324 |
325 | 326 | 329 |
330 | 331 | 368 | 369 | 370 | --------------------------------------------------------------------------------