mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-03-03 15:30:27 +00:00
拆分代码9
This commit is contained in:
18
shell/Commands/User/HostnameCommand.cs
Normal file
18
shell/Commands/User/HostnameCommand.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace CMLeonOS.Commands.User
|
||||
{
|
||||
public static class HostnameCommand
|
||||
{
|
||||
public static void ProcessHostnameCommand(string args, CMLeonOS.UserSystem userSystem, Action<string> showError)
|
||||
{
|
||||
if (string.IsNullOrEmpty(args))
|
||||
{
|
||||
showError("Usage: hostname <new_hostname>");
|
||||
return;
|
||||
}
|
||||
|
||||
userSystem.ProcessHostnameCommand(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user