Rewrite deprecated Environment.OSVersion

This commit is contained in:
JustArchi
2018-03-10 14:47:20 +01:00
parent 4555baefcd
commit 3830684358

View File

@@ -28,18 +28,12 @@ using ArchiSteamFarm.Localization;
namespace ArchiSteamFarm {
internal static class OS {
internal static void Init(bool service) {
switch (Environment.OSVersion.Platform) {
case PlatformID.Win32NT:
case PlatformID.Win32S:
case PlatformID.Win32Windows:
case PlatformID.WinCE:
DisableQuickEditMode();
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
DisableQuickEditMode();
if (service) {
KeepWindowsSystemActive();
}
break;
if (service) {
KeepWindowsSystemActive();
}
}
}