private void RunConsole() { using(ShellPromt promt = new ShellPromt()) { commands.Add(new CommandTimer(timer)); commands.Add(new CommandStop(timer)); commands.Add(new CommandCallPopup(timer)); commands.Add(new CommandStart(timer)); commands.Add(new CommandSelectWord(dictions)); commands.Add(new CommandInsertWord(dictions)); commands.Add(new CommandDeleteWord(dictions)); commands.Add(new CommandSetPriority(dictions)); commands.Add(new CommandEnableWord(dictions)); commands.Add(new CommandDisableWord(dictions)); commands.Add(new CommandHelp(commands)); commands.Add(new CommandQuitShell(promt)); commands.Add(new CommandResetRandomSequence(selector)); commands.Add(new CommandChangeDistribution(selector)); commands.Add(new CommandPopupDalay(popup)); commands.Add(new CommandUsingDictions(dictions)); commands.Add(new CommandDisableDictions(dictions)); promt.UserInput += new EventHandler<EventConsoleArgs>(promt_UserInput); promt.Run(); promt.UserInput -= promt_UserInput; commands.Clear(); } }
public CommandQuitShell(ShellPromt shell) : base(".quit","close command promt") { this.Shell = shell; }