init
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
|
||||
namespace WarnWindows11
|
||||
{
|
||||
public class OSWarning
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
var windows11 = false;
|
||||
using (var process = new Process())
|
||||
{
|
||||
process.StartInfo.FileName = "systeminfo.exe";
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
process.StartInfo.RedirectStandardOutput = true;
|
||||
process.Start();
|
||||
|
||||
// Synchronously read the standard output of the spawned process.
|
||||
var reader = process.StandardOutput;
|
||||
string output = reader.ReadToEnd();
|
||||
var lines = output.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (line.ToUpper().Contains("MICROSOFT WINDOWS 11")) { windows11 = true; }
|
||||
}
|
||||
|
||||
process.WaitForExit();
|
||||
}
|
||||
if (windows11) { _ = MessageBox.Show(Properties.Resources.WARNING_WINDOWS11); }
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace DBConfiguration
|
||||
{
|
||||
public class MigrationStatus
|
||||
{
|
||||
public enum StatusTypes
|
||||
{
|
||||
Status,
|
||||
MigrationStatus,
|
||||
SourceDb
|
||||
};
|
||||
|
||||
public StatusTypes StatusType { get; set; }
|
||||
public string StatusText { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user