ReadIncludeFile() 공개 메소드

public ReadIncludeFile ( string file ) : void
file string
리턴 void
예제 #1
0
파일: csi.cs 프로젝트: oleg-shilo/cs-script
 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);
 }
예제 #2
0
파일: csr.cs 프로젝트: orb1t/cs-repl
 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);
 }
예제 #3
0
 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);
 }   
예제 #4
0
    public static void XMain(string [] args)
    {
        Interpreter.Console = new TextConsole();
        Utils.Write(caption + "\n" + prompt);
        Interpreter interp = new Interpreter();
        string      defs   = args.Length > 0 ? args[0] : "csi.csi";

        interp.ReadIncludeFile(defs);
        while (interp.ProcessLine(Utils.ReadLine()))
        {
            Utils.Write(prompt);
        }
    }
예제 #5
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);
    }
예제 #6
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);
    }
예제 #7
0
 // vs 0.5 It's possible to load scripts from within the interpreter.
 public static void Include(string file)
 {
     interpreter.ReadIncludeFile(file);
 }