mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-04 00:56:19 +02:00
25 lines
696 B
C#
25 lines
696 B
C#
using RemSox.Kernel.Processes;
|
|
using RemSox.Kernel.Processing;
|
|
|
|
namespace RemSox.Kernel.UI.CLI.Commands;
|
|
|
|
public class StartGuiCommand : ICommand
|
|
{
|
|
public string Name => "start-gui";
|
|
public string Description => "Starts the Graphical User Interface (Desktop Process)";
|
|
|
|
public Task ExecuteAsync(string? arguments, Action<string> printLine)
|
|
{
|
|
printLine("Starting Desktop Process...");
|
|
|
|
if (ProcessManager.IsProcessRunning<DesktopProcess>())
|
|
{
|
|
printLine("Desktop Process is already running.");
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
_ = ProcessManager.SpawnProcess<DesktopProcess>();
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|