public MessageDialogUrl(string[] labelButtons, string primaryLabel, string secondaryLabel, string secondaryUrl, MessageType messageType) { InicializeComponent(); TransientFor = MainClass.MainWindow; Buttons = buttons; PrimaryText = primaryLabel; linkBtn.Label = secondaryLabel; linkBtn.LinkUrl = secondaryUrl; MessageType = messageType; Widget[] oldButtons = ActionArea.Children; foreach (Widget w in oldButtons) { ActionArea.Remove(w); } int i = 1; foreach (string s in labelButtons) { AddButton(s, -i); i++; } }
public MessageDialog(string[] labelButtons, string primaryLabel, string secondaryLabel, MessageType messageType, Gtk.Window parent) { InicializeComponent(); if (parent != null) { TransientFor = parent; } else { TransientFor = MainClass.MainWindow; } Buttons = buttons; PrimaryText = primaryLabel; SecondaryText = secondaryLabel; MessageType = messageType; Widget[] oldButtons = ActionArea.Children; foreach (Widget w in oldButtons) { ActionArea.Remove(w); } int i = 1; foreach (string s in labelButtons) { AddButton(s, -i); i++; } }
public GtkErrorDialog(Window parent) { this.Build(); this.Title = BrandingService.ApplicationName; TransientFor = parent; descriptionLabel.ModifyBg(StateType.Normal, new Gdk.Color(255, 0, 0)); tagNoWrap = new TextTag("nowrap"); tagNoWrap.WrapMode = WrapMode.None; detailsTextView.Buffer.TagTable.Add(tagNoWrap); tagWrap = new TextTag("wrap"); tagWrap.WrapMode = WrapMode.Word; detailsTextView.Buffer.TagTable.Add(tagWrap); expander.Visible = false; ActionArea.Homogeneous = true; ActionArea.Remove(okButton); }