Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Belim committed Jul 7, 2021
1 parent 5095414 commit 0e7e880
Show file tree
Hide file tree
Showing 11 changed files with 419 additions and 324 deletions.
25 changes: 25 additions & 0 deletions src/RSV/Assessment/Display.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;

namespace ReadySunValley.Assessment
{
public static class Display
{
[DllImport("gdi32.dll")]
private static extern int GetDeviceCaps(IntPtr hdc, int nIndex);

public static string MonitorSize()
{
string size = string.Empty;

Graphics graphics = Graphics.FromHwnd(IntPtr.Zero);
IntPtr desktop = graphics.GetHdc();
int monitorHeight = GetDeviceCaps(desktop, 6);
int monitorWidth = GetDeviceCaps(desktop, 4);
size = $"{Math.Sqrt(Math.Pow(monitorHeight, 2) + Math.Pow(monitorWidth, 2)) / 25,4:#,##0.00}";

return size;
}
}
}
14 changes: 14 additions & 0 deletions src/RSV/EmbeddedResource.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/RSV/EmbeddedResource.resx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@
<data name="intelsupport" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\intelsupport.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="qualcommsupport" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\qualcommsupport.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="undo_bypass" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\undo_bypass.reg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
Expand Down
14 changes: 8 additions & 6 deletions src/RSV/Helpers/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ public class Titles
public class Body
{
public static readonly string AppInfo = "ReadySunValley" + "\nVersion " + Program.GetCurrentVersionTostring() +
"\n\nChecks if your device is ready for Windows 11/Sun Valley update.\r\n\n" +
"This project was forked initially from " + Helpers.Strings.Uri.CreditsRepo + "\r\n\n" +
"You can also reach out to me on\n" +
"\n\nReplacement for Microsoft PC Health Check app (currently down!)\r\n\n" +
"This project was forked initially from " + Strings.Uri.CreditsRepo +
"\r\n\nYou can also reach out to me on\n" +
"\ttwitter.com/builtbybel\r\n\n" +
"(C) 2021, Builtbybel";

public static readonly string Bypass = "If you are attempting to install Windows 11 and receive a message stating," +
"\"This PC can't run Windows 11\" it is likely that you do not have a TPM 2.0 requirement, Secure Boot or 4GB of RAM." +
"\n\nThe good news is that Microsoft includes a new \"LabConfig\" registry key that allows you to configure settings to bypass the TPM 2.0, the 4GB memory," +
"\n\nThe good news is that Microsoft includes a new \"LabConfig\" registry key that allows you to configure settings to bypass the TPM 2.0, the 4GB memory, " +
"and Secure Boot requirements.\n\nPlease note, that by disabling the TPM 2.0 requirement, you are effectively reducing the security in Windows 11." +
"\n\nDo you want to bypass these restrictions?";

Expand All @@ -45,13 +45,13 @@ public class Hover
public static readonly string WDDMBad = "Your Windows Display Driver Model version does not meet the minimum requirements for Windows 11.";
public static readonly string TPMInfo = "Your TPM version is too low. If you’re running an older version of TPM (1.2 typically), then you may be able to update it to TPM 2.0 with a firmware update.";
public static readonly string TPMBad = "If no TPM is present, you’ll probably find it’s been disabled in the UEFI.";
public static readonly string SecureBootBad = "Secure boot is disabled, or functionality is missing. This doesn't necessarily mean that your system doesn't support it. Check your motherboard, system manual, or bios for more information.";
public static readonly string SecureBootBad = "Secure Boot functionality is missing. You can bypass the Secure boot requirements with ReadySunValley. Use the repair link in the right panel.";
public static readonly string InetBad = "Windows 11 Home edition requires internet connectivity and a Microsoft account to complete device setup on first use. Switching a device out of Windows 11 Home in S mode also requires internet connectivity.";
}

public static class Uri
{
public const string GitRepo = "https://github.com/builtbybel/ReadySunValley/releases";
public const string GitRepo = "https://github.com/builtbybel/ReadySunValley";
public const string GitUpdateRepo = "https://github.com/builtbybel/readysunvalley/releases/tag/";
public const string GitVersionCheck = "https://raw.githubusercontent.com/builtbybel/readysunvalley/master/appversion.txt";
public const string GitVersionHint = "https://raw.githubusercontent.com/builtbybel/ReadySunValley/main/changes.txt";
Expand All @@ -64,6 +64,8 @@ public static class Uri
public const string VotePage = "https://www.builtbybel.com/blog/19-apps/41-check-with-the-readysunvalley-app-if-your-device-works-with-windows11-sun-valley-update";

public const string ShareTwitter = "https://twitter.com/intent/tweet?text=Ready%20for%20%23Windows11/Sun%20Valley%20update?%20Here%20are%20my%20results%20%23ReadySunValley%20%23app";

public const string MSSystemRequirements = "https://aka.ms/WindowsSysReq";
}
}
}
38 changes: 30 additions & 8 deletions src/RSV/MainWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0e7e880

Please sign in to comment.