generated from lcpluginmaker/PluginTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.cs
49 lines (40 loc) · 1.5 KB
/
plugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using ILeoConsole;
using ILeoConsole.Plugin;
using ILeoConsole.Core;
namespace LeoConsole_FileManager
{
public class ConsoleData : IData
{
public static User _User;
public User User { get { return _User; } set { _User = value; } }
public static string _SavePath;
public string SavePath { get { return _SavePath; } set { _SavePath = value; } }
public static string _DownloadPath;
public string DownloadPath { get { return _DownloadPath; } set { _DownloadPath = value; } }
public static string _Version;
public string Version { get { return _Version; } set { _Version = value; } }
public static string _CurrentWorkingPath;
public string CurrentWorkingPath { get { return _CurrentWorkingPath; } set { _CurrentWorkingPath = value; } }
}
public class FileManagerPlugin : IPlugin
{
public string Name { get { return "file-manager"; } }
public string Explanation { get { return "TUI file manager"; } }
private IData _data;
public IData data { get { return _data; } set { _data = value; } }
private List<ICommand> _Commands;
public List<ICommand> Commands { get { return _Commands; } set { _Commands = value; } }
public void PluginInit()
{
_data = new ConsoleData();
_Commands = new List<ICommand>();
}
public void RegisterCommands()
{
_Commands.Add(new FileManager());
}
public void PluginMain() { }
public void PluginShutdown() { }
}
}
// vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab