mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-03-03 11:37:01 +00:00
更改些东西
This commit is contained in:
@@ -1 +1 @@
|
||||
2026-02-25 18:46:09
|
||||
2026-02-26 13:29:38
|
||||
@@ -1 +1 @@
|
||||
0724502
|
||||
2e8ef4e
|
||||
11
Kernel.cs
11
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)
|
||||
|
||||
@@ -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<User> 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}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user