public static void Show(string title, string message, MetroMessageTheme theme, IWin32Window owner) { MetroTextBoxMessage msg = new MetroTextBoxMessage(); msg.titleText.Text = title; msg.messageText.Text = message; switch (theme) { case MetroMessageTheme.Dark: msg.SetThemeDark(); break; case MetroMessageTheme.Light: msg.SetThemeLight(); break; } msg.ShowDialog(owner); }
public static DialogResult Show(String title, out String inputValue, MetroMessageTheme theme) { MetroInputForm inputBox = null; DialogResult results = DialogResult.None; using (inputBox = new MetroInputForm(title)) { switch (theme) { case MetroMessageTheme.Dark: inputBox.SetThemeDark(); break; case MetroMessageTheme.Light: inputBox.SetThemeLight(); break; } results = inputBox.ShowDialog(); inputValue = inputBox.inputBox.Text; } return(results); }