public static void Main(string [] args) { Interpreter.Console = new TextConsole(); Utils.Write(caption+"\n"+prompt); Interpreter interp = new Interpreter(); string defs = args.Length > 0 ? args[0] : interp.DefaultIncludeFile(); interp.ReadIncludeFile(defs); while (interp.ProcessLine(Utils.ReadLine())) Utils.Write(interp.BlockLevel > 0 ? block_prompt : prompt); }
public static void Main(string[] args) { GuiConsoleForm form = new GuiConsoleForm(caption,prompt,new StringHandler(ProcessLine)); GuiConsole console = new GuiConsole(form); Interpreter.Console = console; console.Write(caption+"\n"+prompt); interp = new Interpreter(); string defs = args.Length > 0 ? args[0] : interp.DefaultIncludeFile(); interp.ReadIncludeFile(defs); interp.SetValue("form",form); interp.SetValue("text",form.TextBox); Application.Run(form); }