mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-03-03 15:30:27 +00:00
拆分代码5
This commit is contained in:
@@ -437,40 +437,12 @@ namespace CMLeonOS
|
||||
|
||||
public void EditFile(string fileName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
ShowError("Please specify a file name");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var editor = new Editor(fileName, fileSystem);
|
||||
editor.Run();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowError($"Error starting editor: {ex.Message}");
|
||||
}
|
||||
Commands.Editor.EditCommand.EditFile(fileName, fileSystem, ShowError);
|
||||
}
|
||||
|
||||
public void NanoFile(string fileName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
ShowError("Please specify a file name");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var nano = new Nano(fileName, true, fileSystem, userSystem, this);
|
||||
nano.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowError($"Error starting nano: {ex.Message}");
|
||||
}
|
||||
Commands.Editor.NanoCommand.NanoFile(fileName, fileSystem, userSystem, this, ShowError);
|
||||
}
|
||||
|
||||
public void DiffFiles(string args)
|
||||
|
||||
Reference in New Issue
Block a user