Example #1
0
        private void triggerGotInputResult(string result)
        {
            inputResultHandler handler = onGotInputResult;

            if (handler != null)
            {
                handler(result);
            }
        }
Example #2
0
        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;
                }));
        }
Example #3
0
        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);
            }));
        }