Exemplo n.º 1
0
        public REPL_Gui buildGui(Control targetControl)
        {
            try
            {
                TopPanel = targetControl.clear().add_Panel();

                Code_Panel = TopPanel.insert_Left("Code");

                Output_Panel = TopPanel.add_GroupBox("Invoke and Result")
                                       .add_GroupBox("Output").add_Panel();
                Execute_Button = Output_Panel.parent().insert_Above(60).add_Button("Execute").fill();
                Execute_Button.insert_Below(20).add_Link("stop execution", () => this.stopCurrentExecution());
                Output_View_RichTextBox = Output_Panel.add_RichTextBox();
                Output_View_Object = Output_Panel.add_Panel();
                //set actions

                Execute_Button.onClick(
                    () =>
                        {
                            try
                            {
                                ExecutionThread = O2Thread.mtaThread(() => On_ExecuteCode.invoke());
                            }
                            catch (Exception ex)
                            {
                                ex.log();
                            }
                        });
            }
            catch (Exception ex)
            {
                ex.log("[REPL_Gui] in buildGui");
            }
            return this;
        }