GUI桌面环境

This commit is contained in:
2026-03-01 17:03:49 +08:00
parent 545f40cf95
commit f0a9223520
162 changed files with 9170 additions and 135 deletions

View File

@@ -9,6 +9,7 @@ namespace CMLeonOS
public enum BootMenuAction
{
NormalBoot,
GuiBoot,
Reboot,
Shutdown
}
@@ -44,8 +45,9 @@ namespace CMLeonOS
Console.WriteLine();
PrintOption("Normal Boot", selIdx == 0);
PrintOption("Reboot", selIdx == 1);
PrintOption("Shutdown", selIdx == 2);
PrintOption("GUI Boot", selIdx == 1);
PrintOption("Reboot", selIdx == 2);
PrintOption("Shutdown", selIdx == 3);
}
private static BootMenuAction Confirm(int selIdx)
@@ -64,9 +66,11 @@ namespace CMLeonOS
case 0:
return BootMenuAction.NormalBoot;
case 1:
return BootMenuAction.GuiBoot;
case 2:
Sys.Power.Reboot();
return BootMenuAction.Reboot;
case 2:
case 3:
Sys.Power.Shutdown();
return BootMenuAction.Shutdown;
default:
@@ -129,10 +133,10 @@ namespace CMLeonOS
if (selIdx < 0)
{
selIdx = 2;
selIdx = 3;
}
if (selIdx > 2)
if (selIdx > 3)
{
selIdx = 0;
}