public void SetExecVars(MNPage page) { if (page != null && Executor != null) { Executor.ClearVariables(); foreach (SMControl ctrl in page.Objects) { if (ctrl.UniqueName.Length > 0) { Executor.SetVariable(ctrl.UniqueName, ctrl); } } Executor.SetVariable("executor", Executor); Executor.SetVariable("view", ViewController); Executor.SetVariable("document", page.Document); Executor.SetVariable("page", page); } }