public CommonAboutDialog() { this.Title = GettextCatalog.GetString ("About MonoDevelop"); this.TransientFor = (Gtk.Window) WorkbenchSingleton.Workbench; aboutPictureScrollBox = new ScrollBox (); this.VBox.PackStart (aboutPictureScrollBox, false, false, 0); Notebook nb = new Notebook (); nb.SetSizeRequest (400, 280); VersionInformationTabPage vinfo = new VersionInformationTabPage (); nb.AppendPage (new AboutMonoDevelopTabPage (), new Label (GettextCatalog.GetString ("About MonoDevelop"))); nb.AppendPage (vinfo, new Label (GettextCatalog.GetString ("Version Info"))); this.VBox.PackStart (nb, true, true, 0); this.AddButton (Gtk.Stock.Close, (int) ResponseType.Close); this.ShowAll (); }
private void InitializeComponent() { if (Common.IsWindows) { this.Title = "Options"; this.AddButton(Stock.Ok, Gtk.ResponseType.Ok); this.AddButton(Stock.Cancel, Gtk.ResponseType.Cancel); } else { this.Title = Stock.Lookup(Stock.Preferences).Label.Replace("_", ""); this.AddButton(Stock.Cancel, Gtk.ResponseType.Cancel); this.AddButton(Stock.Ok, Gtk.ResponseType.Ok); } this.Modal = true; this.WindowPosition = Gtk.WindowPosition.CenterOnParent; this.Resizable = false; this.SetDefaultSize(518, 399); this.Response += new ResponseHandler(frmOptions_Response); this.IconName = Stock.Preferences; optionTabs = new Notebook(); optionTabs.ShowTabs = true; optionTabs.BorderWidth = 5; optionTabs.TabPos = PositionType.Top; optionTabs.SetSizeRequest(515, 300); GenerateTabs(); this.VBox.PackStart(optionTabs, true, true, 0); this.VBox.ShowAll(); LoadSettings(); }
private void CreateGui( string programName, Dedication dedication) { // Create the title and version labels. var programLabel = new Label { Markup = "<b><span size='100'>" + programName + "</span></b>" }; var versionLabel = new Label { Markup = "<b><span size='80'>" + dedication.Version + "</span></b>" }; var authorLabel = new Label { Markup = "<b><span size='80'>" + dedication.Author + "</span></b>" }; // Set up the dedication text. string html = string.Join("\n", dedication.Lines); string text = html + "- " + dedication.Dedicator; // Create an HTML display widget with the text. var dedicationView = new TextView { Buffer = { Text = text }, WrapMode = WrapMode.Word, PixelsBelowLines = 10, RightMargin = 8, LeftMargin = 4, Justification = Justification.Fill, Sensitive = false, }; var dedicatorTag = new TextTag("dedicator"); dedicatorTag.Style = Pango.Style.Italic; dedicatorTag.Justification = Justification.Right; dedicationView.Buffer.TagTable.Add(dedicatorTag); TextIter dedicatorIterBegin = dedicationView.Buffer.GetIterAtOffset(html.Length); TextIter dedicatorIterEnd = dedicationView.Buffer.GetIterAtOffset( text.Length); dedicationView.Buffer.ApplyTag( dedicatorTag, dedicatorIterBegin, dedicatorIterEnd); // Wrap it in a scroll window with some additional spacing. var dedicationScroll = new ScrolledWindow { BorderWidth = 4 }; dedicationScroll.Add(dedicationView); // Create the notebook we'll be using for the larger text tabs. var notebook = new Notebook(); notebook.SetSizeRequest(512, 256); notebook.BorderWidth = 4; notebook.AppendPage(dedicationScroll, new Label("Dedication")); // Arrange everything in the vertical box. VBox.PackStart(programLabel, false, false, 4); VBox.PackStart(versionLabel, false, false, 4); VBox.PackStart(authorLabel, false, false, 4); VBox.PackStart(notebook, true, true, 4); // Set up the buttons. Modal = true; AddButton("Close", ResponseType.Close); }