From 0c3ca5fc7c8bc8071f346657f12ec727358046b2 Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Thu, 5 Feb 2026 21:35:35 +0800 Subject: [PATCH] =?UTF-8?q?version+Shell=E7=9A=84=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLeonOS.csproj | 2 +- shell/Commands/Info/Version.cs | 1 + shell/Shell.cs | 11 +++++++++-- utils/Version.cs | 5 +++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CMLeonOS.csproj b/CMLeonOS.csproj index 1f48f88..be5e211 100644 --- a/CMLeonOS.csproj +++ b/CMLeonOS.csproj @@ -26,7 +26,7 @@ False true None - 1 + 2 800x600x32 diff --git a/shell/Commands/Info/Version.cs b/shell/Commands/Info/Version.cs index bc82149..dcdfd79 100644 --- a/shell/Commands/Info/Version.cs +++ b/shell/Commands/Info/Version.cs @@ -10,6 +10,7 @@ namespace CMLeonOS.Commands Console.WriteLine($"Major: {Version.Major}"); Console.WriteLine($"Minor: {Version.Minor}"); Console.WriteLine($"Patch: {Version.Patch}"); + Console.WriteLine($"Type: {Version.VersionType}"); Console.WriteLine($"Full Version: {Version.FullVersion}"); } } diff --git a/shell/Shell.cs b/shell/Shell.cs index 1b3b7df..e60d166 100644 --- a/shell/Shell.cs +++ b/shell/Shell.cs @@ -23,7 +23,7 @@ namespace CMLeonOS { public class Shell { - private string prompt = "/"; + private string prompt = "#"; private List commandHistory = new List(); private FileSystem fileSystem; private UserSystem userSystem; @@ -90,8 +90,15 @@ namespace CMLeonOS // 显示当前文件夹路径作为提示符(彩色) string currentPath = fileSystem.CurrentDirectory; ConsoleColor originalColor = Console.ForegroundColor; + // Console.ForegroundColor = ConsoleColor.Cyan; + // Console.Write($"{currentPath} | {prompt}"); + Console.ForegroundColor = ConsoleColor.Magenta; + Console.Write($"{currentPath}"); + Console.ForegroundColor = ConsoleColor.White; + Console.Write($" | "); Console.ForegroundColor = ConsoleColor.Cyan; - Console.Write($"{currentPath} | /"); + Console.Write($"{prompt}"); + Console.ForegroundColor = originalColor; var input = Console.ReadLine(); diff --git a/utils/Version.cs b/utils/Version.cs index c522b7c..0d14e3c 100644 --- a/utils/Version.cs +++ b/utils/Version.cs @@ -7,10 +7,11 @@ namespace CMLeonOS public static string Major = "1"; public static string Minor = "0"; public static string Patch = "0"; + public static string VersionType = "PreRelease"; public static string FullVersion { - get { return $"{Major}.{Minor}.{Patch}"; } + get { return $"{Major}.{Minor}.{Patch}-{VersionType}"; } } public static string ShortVersion @@ -20,7 +21,7 @@ namespace CMLeonOS public static string DisplayVersion { - get { return $"CMLeonOS v{ShortVersion}"; } + get { return $"CMLeonOS v{ShortVersion} ({VersionType})"; } } } }