From e5440275c2e3a9f61361b0bceff533c1ee4ae0f3 Mon Sep 17 00:00:00 2001 From: "SONGE9B3\\song_pd_win11" Date: Mon, 9 Jan 2023 10:47:32 +0800 Subject: [PATCH] tmp --- STranslate/Util/Util.cs | 15 +++++++++++++++ STranslate/ViewModel/MainVM.cs | 1 + 2 files changed, 16 insertions(+) diff --git a/STranslate/Util/Util.cs b/STranslate/Util/Util.cs index 0b8b8d6..94a08c1 100644 --- a/STranslate/Util/Util.cs +++ b/STranslate/Util/Util.cs @@ -236,5 +236,20 @@ namespace STranslate.Util return strA_Z; } #endregion + + public static bool Get_OSVersion() + { + try + { + OperatingSystem os = Environment.OSVersion; + Version ver = os.Version; + + return true; + } + catch (Exception e) + { + return false; + } + } } } diff --git a/STranslate/ViewModel/MainVM.cs b/STranslate/ViewModel/MainVM.cs index 98b3a5c..8617ca8 100644 --- a/STranslate/ViewModel/MainVM.cs +++ b/STranslate/ViewModel/MainVM.cs @@ -22,6 +22,7 @@ namespace STranslate.ViewModel { _Mainwin = (MainWindow)win; OpenMainWin(); + Util.Util.Get_OSVersion(); if (!ReadConfig()) {