public static ascx_Simple_Script_Editor set_Command(this ascx_Simple_Script_Editor scriptEditor, string commandText)
 {
     return((ascx_Simple_Script_Editor)scriptEditor.invokeOnThread(
                () =>
     {
         scriptEditor.commandsToExecute.set_Text(commandText);
         return scriptEditor;
     }));
 }
Esempio n. 2
0
 public static ascx_Simple_Script_Editor set_Command(this ascx_Simple_Script_Editor scriptEditor, string commandText)
 {
     return((ascx_Simple_Script_Editor)scriptEditor.invokeOnThread(
                () =>
     {
         scriptEditor.Code = commandText;
         return scriptEditor;
     }));
 }
 public static ascx_Simple_Script_Editor onCompileExecuteOnce(this ascx_Simple_Script_Editor scriptEditor)
 {
     return((ascx_Simple_Script_Editor)scriptEditor.invokeOnThread(
                () =>
     {
         scriptEditor.onCompilationOk =
             () =>
         {
             scriptEditor.execute();
             scriptEditor.onCompilationOk = null;
         };
         return scriptEditor;
     }));
 }
        public static ascx_Simple_Script_Editor execute(this ascx_Simple_Script_Editor scriptEditor, params string[] codesToExecute)
        {
            var codeToExecute = "";

            foreach (var code in codesToExecute)
            {
                codeToExecute += code.line();
            }
            return((ascx_Simple_Script_Editor)scriptEditor.invokeOnThread(
                       () =>
            {
                scriptEditor.commandsToExecute.set_Text(codeToExecute);
                scriptEditor.onCompileExecuteOnce();
                return scriptEditor;
            }));
        }