SetValue() public méthode

public SetValue ( string name, object val ) : void
name string
val object
Résultat void
Exemple #1
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);
 }   
Exemple #2
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);
    }
Exemple #3
0
 private void InitializeInterpreter()
 {
     Interpreter.SetValue("GUI", new Func <string, BaseUI>(ui => UIManager.GetOrCreate(AssemblyCollection.GetType(ui))));
     Interpreter.SetValue("STG", new Action <string>(stage => StageManager.Switch(AssemblyCollection.GetType(stage))));
     Interpreter.SetValue("PST", new Func <string, PresenterBase>(controller => PresenterManager.Get(controller)));
     Interpreter.SetValue("CMD", new Action <string, object>((c, o) => EventManager.Publish(CommandEventArgs.EventId, new CommandEventArgs(c, o))));
 }
Exemple #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);
    }