protected virtual void RunScript(string expr) { if (!string.IsNullOrEmpty(expr)) { Scripting.Exec(expr, scope); } }
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); }