コード例 #1
0
ファイル: csigui.cs プロジェクト: oleg-shilo/cs-script
 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);
 }   
コード例 #2
0
ファイル: csigui.cs プロジェクト: zhouzu/cs-script
    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);
    }
コード例 #3
0
    // 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);
    }
コード例 #4
0
    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);
    }
コード例 #5
0
ファイル: csigui.cs プロジェクト: zhouzu/cs-script
 public GuiConsole(GuiConsoleForm f)
 {
     form = f;
 }
コード例 #6
0
 public ConsoleTextBox(GuiConsoleForm parent_)
 {
     parent   = parent_;
     KeyDown += XKeyDown;
 }
コード例 #7
0
ファイル: console.cs プロジェクト: orb1t/cs-repl
 public ConsoleTextBox(GuiConsoleForm parent_)
 {
     parent = parent_;
 }
コード例 #8
0
ファイル: console.cs プロジェクト: oleg-shilo/cs-script
 public ConsoleTextBox(GuiConsoleForm parent_) {
     parent = parent_;
 }        
コード例 #9
0
ファイル: csrgui.cs プロジェクト: stevedonovan/cs-repl
 public GuiConsole(GuiConsoleForm f)
 {
     form = f;
 }