public void OnRunButtonClicked(object sender, EventArgs e)
        {
            var editor       = (Editor)Interpreter.FindByName("InterpreterTextEditor");
            var output       = (Label)Interpreter.FindByName("InterpreterOutputLabel");
            var error        = (Label)Interpreter.FindByName("InterpreterErrorLabel");
            var librarystack = (StackLayout)Interpreter.FindByName("InterpreterLibrariesStack");

            string source = CodeRunner.ProgramBuilder(editor.Text, Libraries: UI.GetImportsFromLibraries(librarystack));

            CodeRunner.ProcessRemoteCode(output, error, (int)Languages.Python3, source, string.Empty, string.Empty);
        }
Exemplo n.º 2
0
        public void OnRunButtonClicked(object sender, EventArgs e)
        {
            var editor       = (Editor)Interpreter.FindByName("InterpreterTextEditor");
            var output       = (Label)Interpreter.FindByName("InterpreterOutputLabel");
            var error        = (Label)Interpreter.FindByName("InterpreterErrorLabel");
            var maincode     = (Editor)Interpreter.FindByName("InterpreterMainEditor");
            var librarystack = (StackLayout)Interpreter.FindByName("InterpreterLibrariesStack");

            List <string> imports = UI.GetImportsFromLibraries(librarystack);

            imports.Add("class Rextester {");
            string source = CodeRunner.ProgramBuilder(maincode.Text, Libraries: imports, editor.Text, "public static void main(String[] args){", "}}");

            CodeRunner.ProcessRemoteCode(output, error, (int)Languages.Java, source, string.Empty, string.Empty);
        }