From e8e45ef7ae57f6aa3a65744924fd7ef5bbebd0df Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Thu, 26 Feb 2026 13:33:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BA=9B=E4=B8=9C=E8=A5=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BuildTime.txt | 2 +- GitCommit.txt | 2 +- Kernel.cs | 11 +++++++++-- System/UserSystem.cs | 10 ++++++---- shell/Commands/Info/About.cs | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/BuildTime.txt b/BuildTime.txt index da3f48c..b668564 100644 --- a/BuildTime.txt +++ b/BuildTime.txt @@ -1 +1 @@ -2026-02-25 18:46:09 \ No newline at end of file +2026-02-26 13:29:38 \ No newline at end of file diff --git a/GitCommit.txt b/GitCommit.txt index f93051e..370f5a6 100644 --- a/GitCommit.txt +++ b/GitCommit.txt @@ -1 +1 @@ -0724502 \ No newline at end of file +2e8ef4e \ No newline at end of file diff --git a/Kernel.cs b/Kernel.cs index 305bf5e..c49f379 100644 --- a/Kernel.cs +++ b/Kernel.cs @@ -440,7 +440,7 @@ namespace CMLeonOS } Console.WriteLine("Executing startup script..."); - Console.WriteLine("--------------------------------"); + // Console.WriteLine("--------------------------------"); // 逐行执行命令 foreach (string line in lines) @@ -456,7 +456,7 @@ namespace CMLeonOS shell.ExecuteCommand(line); } - Console.WriteLine("--------------------------------"); + // Console.WriteLine("--------------------------------"); _logger.Success("Kernel", "Startup script execution completed"); } else @@ -475,6 +475,12 @@ namespace CMLeonOS private void ExecuteStartupTest() { + Console.WriteLine("------------------------------------------------------"); + Console.WriteLine($"Welcome to {Version.DisplayVersion}"); + Console.WriteLine("* Documentation: https://cmleonos.jjmm.ink/"); + Console.WriteLine("* Fourm: https://lbbs.ecuil.com/#/category/10"); + Console.WriteLine(""); + Console.BackgroundColor = ConsoleColor.Red; Console.Write(" "); Console.BackgroundColor = ConsoleColor.Yellow; @@ -509,6 +515,7 @@ namespace CMLeonOS Console.Write(" "); Console.WriteLine(""); Console.ResetColor(); + Console.WriteLine("------------------------------------------------------"); } private string FormatBytes(long bytes) diff --git a/System/UserSystem.cs b/System/UserSystem.cs index 4a09492..197d5a1 100644 --- a/System/UserSystem.cs +++ b/System/UserSystem.cs @@ -5,6 +5,7 @@ using System.Runtime.InteropServices; using System.Text; using System.Threading; using Sys = Cosmos.System; +using CMLeonOS.Logger; namespace CMLeonOS { @@ -23,6 +24,7 @@ namespace CMLeonOS private List users; public bool fixmode = Kernel.FixMode; private User currentLoggedInUser; + private static CMLeonOS.Logger.Logger _logger = CMLeonOS.Logger.Logger.Instance; public User CurrentLoggedInUser { @@ -519,7 +521,7 @@ namespace CMLeonOS { try { - Console.WriteLine($"Creating user folder for {username}..."); + _logger.Info("UserSystem", $"Creating user folder for {username}..."); // 在user文件夹下创建用户文件夹 string userFolderPath = Path.Combine(@"0:\user", username); @@ -528,16 +530,16 @@ namespace CMLeonOS if (!Directory.Exists(userFolderPath)) { Directory.CreateDirectory(userFolderPath); - Console.WriteLine($"Created user folder for {username}."); + _logger.Info("UserSystem", $"Created user folder for {username}."); } else { - Console.WriteLine($"User folder for {username} already exists."); + _logger.Info("UserSystem", $"User folder for {username} already exists."); } } catch (Exception ex) { - ShowError($"Error creating user folder: {ex.Message}"); + _logger.Error("UserSystem", $"Error creating user folder for {username}: {ex.Message}"); } } diff --git a/shell/Commands/Info/About.cs b/shell/Commands/Info/About.cs index 415404a..93e7d2d 100644 --- a/shell/Commands/Info/About.cs +++ b/shell/Commands/Info/About.cs @@ -7,7 +7,7 @@ namespace CMLeonOS.Commands public static void ProcessAbout() { Console.WriteLine("CMLeonOS Project"); - Console.WriteLine("By LeonOS 2 Developement Team"); + Console.WriteLine("By LeonOS 2 Developer Team"); } } }