mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-03-03 15:30:27 +00:00
GUI桌面环境
This commit is contained in:
36
Gui/App.cs
Normal file
36
Gui/App.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user