Ejemplo n.º 1
0
        public ScriptConsoleClient()
        {
            Title = Loc.GetString("Robust C# Interactive (CLIENT)");
            ScriptInstanceShared.InitDummy();

            _globals = new ScriptGlobalsImpl(this);

            IoCManager.InjectDependencies(this);

            OutputPanel.AddText(Loc.GetString(@"Robust C# interactive console (CLIENT)."));
            OutputPanel.AddText(">");
        }
Ejemplo n.º 2
0
        public ScriptConsole()
        {
            _globals = new ScriptGlobals(this);

            IoCManager.InjectDependencies(this);

            Title = Loc.GetString("Robust C# Interactive");

            Contents.AddChild(new VBoxContainer
            {
                Children =
                {
                    new PanelContainer
                    {
                        PanelOverride = new StyleBoxFlat
                        {
                            BackgroundColor           = Color.FromHex("#1E1E1E"),
                            ContentMarginLeftOverride = 4
                        },
                        Children =
                        {
                            (_outputPanel         = new OutputPanel
                            {
                                SizeFlagsVertical = SizeFlags.FillExpand,
                            })
                        },
                        SizeFlagsVertical = SizeFlags.FillExpand
                    },
                    (_inputBar = new HistoryLineEdit{
                        PlaceHolder = Loc.GetString("Your C# code here.")
                    })
                }
            });

            _inputBar.OnTextEntered += InputBarOnOnTextEntered;
            CustomMinimumSize        = (550, 300);

            _outputPanel.AddText(Loc.GetString(@"Robust C# interactive console."));
            _outputPanel.AddText(">");
        }