mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-03-03 03:27:01 +00:00
37 lines
884 B
C#
37 lines
884 B
C#
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; }
|
|
}
|
|
}
|