Exemplo n.º 1
0
 public static object MessageBox(Environment e, object[] args)
 {
     try {
         if (e.GetObject(args[0].ToString()) != null)
             return System.Windows.Forms.MessageBox.Show(e.GetObject(args[0].ToString()).ToString(), "Notepad X");
         else
             return System.Windows.Forms.MessageBox.Show(args[0] as string, "Notepad X");
     } catch (Exception ex) {
         System.Windows.Forms.MessageBox.Show(ex.ToString());
         return null;
     }
 }
Exemplo n.º 2
0
 public object Invoke(Environment e, object[] args)
 {
     foreach (object o in argnames)
     {
         // FIXME
         e.Set(o.ToString(), e.GetObject(o.ToString()));
     }
     return e.Run(Pieces.ToArray());
     // TODO: remove args from env
 }
Exemplo n.º 3
0
 public override object Execute(Environment e, object[] args)
 {
     if (e.GetObject(fn) == null)
         throw new Exception("Function '" + fn + "' not defined!");
     return (e.GetObject(fn) as Function)(e, this.args);
 }