public static void show(Panel parent, string hint, string acceptButton, inputResultHandler handler) { InputDialog dialog = new InputDialog(); dialog.onGotInputResult += handler; dialog.tbInput.SetValue(MaterialDesignThemes.Wpf.TextFieldAssist.HintProperty, hint); new Dialog(parent, dialog, false, false, false, null, new DialogButton("Cancel", DialogButton.Alignment.Right, DialogButton.Style.Flat, delegate () { return DialogButton.ReturnEvent.Close; }), new DialogButton(acceptButton, DialogButton.Alignment.Right, DialogButton.Style.Normal, delegate () { dialog.triggerGotInputResult(dialog.tbInput.Text); return DialogButton.ReturnEvent.Close; })); }
public static void show(Panel parent, string hint, string acceptButton, inputResultHandler handler) { InputDialog dialog = new InputDialog(); dialog.onGotInputResult += handler; dialog.tbInput.SetValue(MaterialDesignThemes.Wpf.TextFieldAssist.HintProperty, hint); new Dialog(parent, dialog, false, false, false, null, new DialogButton("Cancel", DialogButton.Alignment.Right, DialogButton.Style.Flat, delegate() { return(DialogButton.ReturnEvent.Close); }), new DialogButton(acceptButton, DialogButton.Alignment.Right, DialogButton.Style.Normal, delegate() { dialog.triggerGotInputResult(dialog.tbInput.Text); return(DialogButton.ReturnEvent.Close); })); }