コード例 #1
0
ファイル: DialogBox.xaml.cs プロジェクト: madfrog54321/Timer
        private void triggerGotDialogResult(DialogResult result)
        {
            dialogResultHandler handler = onGotDialogResult;

            if (handler != null)
            {
                handler(result);
            }
        }
コード例 #2
0
ファイル: DialogBox.xaml.cs プロジェクト: madfrog54321/Timer
        public static void showInfoBox(Panel parent, string message, string title, string button, dialogResultHandler handler)
        {
            DialogBox dialog = new DialogBox();
            dialog.onGotDialogResult += handler;

            dialog.tbMessage.Text = message;
            dialog.tbTitle.Text = title;

            new Dialog(parent, dialog, false, false, true, null,
                new DialogButton(button, DialogButton.Alignment.Right, DialogButton.Style.Flat, delegate () {

                    dialog.triggerGotDialogResult(DialogResult.MainOption);

                    return DialogButton.ReturnEvent.Close;
                }));
        }
コード例 #3
0
ファイル: DialogBox.xaml.cs プロジェクト: madfrog54321/Timer
        public static void showInfoBox(Panel parent, string message, string title, string button, dialogResultHandler handler)
        {
            DialogBox dialog = new DialogBox();

            dialog.onGotDialogResult += handler;

            dialog.tbMessage.Text = message;
            dialog.tbTitle.Text   = title;

            new Dialog(parent, dialog, false, false, true, null,
                       new DialogButton(button, DialogButton.Alignment.Right, DialogButton.Style.Flat, delegate() {
                dialog.triggerGotDialogResult(DialogResult.MainOption);

                return(DialogButton.ReturnEvent.Close);
            }));
        }