Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     o2Mate.Expression expr = new o2Mate.Expression();
     o2Mate.Scope      s    = new o2Mate.Scope();
     s.Add("i", "1", "", true);
     o2Mate.IData data = expr.Evaluate("i+1", s);
     MessageBox.Show(data.ValueString);
 }
Esempio n. 2
0
        private void button5_Click(object sender, EventArgs e)
        {
            Converters.VBScriptConverter vbscript = new Converters.VBScriptConverter();
            o2Mate.Scope scope = new o2Mate.Scope();
            o2Mate.Expression.Convert(vbscript, "$a + $b", scope, true);
            MessageBox.Show(vbscript.CurrentFunction.CacheSource);
            o2Mate.Expression.Convert(vbscript, "$$a + $$b", scope, true);
            MessageBox.Show(vbscript.CurrentFunction.CacheSource);

            Converters.PowerShellConverter powershell = new Converters.PowerShellConverter();
            o2Mate.Expression.Convert(powershell, "$a + $b", scope, true);
            MessageBox.Show(powershell.CurrentFunction.CacheSource);
            o2Mate.Expression.Convert(powershell, "$$a + $$b", scope, true);
            MessageBox.Show(powershell.CurrentFunction.CacheSource);
        }