public void Initialize(IPadWindow container) { if (IdeApp.Preferences.CustomOutputPadFont != null) customFont = IdeApp.Preferences.CustomOutputPadFont; else customFont = Pango.FontDescription.FromString("Courier New"); view = new ReplView (); view.PromptMultiLineString = "+ "; view.ConsoleInput += OnViewConsoleInput; view.SetFont (customFont); view.ShadowType = Gtk.ShadowType.None; //view.AddMenuCommand("Start Interactive Session", StartInteractiveSessionHandler); //view.AddMenuCommand("Connect to Interactive Session", ConnectToInteractiveSessionHandler); view.ShowAll (); IdeApp.Preferences.CustomOutputPadFontChanged += HandleCustomOutputPadFontChanged; ReplPad.Instance = this; }
private ReplView AddRepl(string title = "REPL") { var repl = new ReplView (); repl.PromptString = "csharp> "; repl.PromptMultiLineString = "+ "; repl.ConsoleInput += OnViewConsoleInput; repl.SetFont (customFont); repl.ShadowType = Gtk.ShadowType.None; var tabLabel = new MDComponents.TabLabel (new Label (title), emptyImage); notebook.AppendPage (repl, tabLabel); if (notebook.NPages < 2) notebook.ShowTabs = false; else notebook.ShowTabs = true; tabLabel.CloseClicked += (object sender, EventArgs e) => { Stop (repl); }; notebook.ShowAll (); return repl; }