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

36
Gui/App.cs Normal file
View File

@@ -0,0 +1,36 @@
using Cosmos.System.Graphics;
using CMLeonOS;
using System;
using System.Drawing;
namespace CMLeonOS.Gui
{
internal class AppMetadata
{
public AppMetadata(string name, Func<Process> createProcess, Bitmap icon, Color themeColor)
{
Name = name;
CreateProcess = createProcess;
Icon = icon;
ThemeColor = themeColor;
}
internal void Start(Process parent)
{
ProcessManager.AddProcess(parent, CreateProcess()).Start();
}
internal void Start()
{
ProcessManager.AddProcess(CreateProcess()).Start();
}
internal string Name { get; private set; }
internal Func<Process> CreateProcess { get; private set; }
internal Bitmap Icon { get; private set; }
internal Color ThemeColor { get; private set; }
}
}