/// <summary> /// 帮助信息 /// </summary> private void help() { Console.WriteLine("帮助信息:"); Console.WriteLine("恋羽作品:http://www.loveyu.org"); version(); Console.WriteLine("config\t查看当前运行信息"); Console.WriteLine("user\t用户操作命令,别名:u"); ControlUser.help(); Console.WriteLine("msg\t查看消息队列长度,别名:m"); Console.WriteLine("file\t查看文件传输服务队列信息,别名:f"); Console.WriteLine("terminal\t查看运行的终端,并进行相应操作,别名:ter,t\n\t支持参数: reset(重置连接表)"); Console.WriteLine("exit\t结束程序运行,别名:q,quit"); Console.WriteLine("startup\t生成没有窗口的运行脚本,复制到启动目录实现开机启动,别名:s"); Console.WriteLine("clear\t清屏,清空控制台,别名:cls,c"); Console.WriteLine("version\t查看版本信息,别名:v"); Console.WriteLine("help\t帮助信息,别名:h,--help,/?,\\?,?"); Console.WriteLine(); }
/// <summary> /// 控制台主操作 /// </summary> public void Terminal() { string[] cmds; ControlUser.CheckUserEmpty(); while (status) { Console.Write("Remote>"); cmds = Console.ReadLine().Trim().Split(' '); switch (cmds[0].Trim().ToLower()) { case "": continue; case "u": case "user": ControlUser.UserAction(cmds); break; case "config": Console.WriteLine("\n" + new Function().config()); break; case "q": case "quit": case "exit": Stop(); break; case "m": case "msg": Console.WriteLine("\n" + new Function().msg()); break; case "f": case "file": Console.WriteLine("\n" + new Function().file()); break; case "ter": case "t": case "terminal": TerminalControl(cmds); break; case "cls": case "c": case "clear": Console.Clear(); break; case "s": case "startup": CreateStartupFile(); break; case "v": case "version": version(); break; case "h": case "help": case "--help": case "/?": case "?": case "\\?": help(); break; default: Console.WriteLine("Usage: config | user | msg | file | terminal | exit | startup | clear | version | help\n"); break; } } }