Example #1
0
 protected virtual void RunScript(string expr)
 {
     if (!string.IsNullOrEmpty(expr))
     {
         Scripting.Exec(expr, scope);
     }
 }
Example #2
0
        public void SetProperty(string property, object value)
        {
            if (comObject == null)
            {
                throw new Exception("Error, please call Initalize first!");
            }

            Dictionary <string, object> state = new Dictionary <string, object>();

            state["ComObject"] = comObject;
            state["ComArg"]    = value;

            string cmd = "ComObject." + property + " = ComArg";

            Scripting.Exec(cmd, state);
        }