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); }
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); }
// execute the selection line. If substitute is true, replace selection with $VV public void ExecuteSelectionLine(bool substitute) { int lineNo = GetLineFromCharIndex(SelectionStart); string line = Lines[lineNo]; if (substitute && SelectionLength > 0) { int lineStartIndex = GetFirstCharIndexFromLine(lineNo); line = line.Substring(0, SelectionStart - lineStartIndex) + "$VV" + line.Substring(SelectionStart + SelectionLength - lineStartIndex); RunCsi.interp.SetValue("VV", float.Parse(SelectedText)); Console.WriteLine(".>. " + line); } parent.quiet = true; RunCsi.interp.ProcessLine(GuiConsoleForm.CleanLine(line)); // parent.DelayedExecute(line); }
public static Interpreter XMain(string[] args) { GuiConsoleForm form = new GuiConsoleForm(caption, prompt, new StringHandler(ProcessLine)); GuiConsole console = new GuiConsole(form); console.Write(caption + "\n" + prompt); string defs = args.Length > 0 ? args[0] : "csigui.csi"; Interpreter.Console = console; interp = new Interpreter(); interp.ReadIncludeFile(defs); interp.SetValue("form", form); interp.SetValue("text", form.TextBox); form.Show(); return(interp); // Application.Run(form); }
public GuiConsole(GuiConsoleForm f) { form = f; }
public ConsoleTextBox(GuiConsoleForm parent_) { parent = parent_; KeyDown += XKeyDown; }
public ConsoleTextBox(GuiConsoleForm parent_) { parent = parent_; }