Exemple #1
0
        internal static void confirm(string title, string text, Action onOk, string okText = "OK", string cancelText = "Cancel")
        {
            ConfirmDialog dialog = null;

            dialog = new ConfirmDialog(title, text,
                                       () => {
                dialog.destroy();
                onOk();
            },
                                       () => dialog.destroy(),
                                       okText, cancelText);
        }
Exemple #2
0
        // dictionary.cfg
        // #TOOLBAR_UI_OK = "OK"
        // #TOOLBAR_UI_CANCEL = "Cancel"
        //
        // eg : Localizer.Format("#ID")
        internal static void confirm(string title, string text, Action onOk, string okText = "OK", string cancelText = "Cancel")
        {
            ConfirmDialog dialog = null;

            if (okText == "OK")
            {
                okText = Localizer.Format("#TOOLBAR_UI_OK");
            }
            if (cancelText == "Cancel")
            {
                cancelText = Localizer.Format("#TOOLBAR_UI_CANCEL");
            }

            dialog = new ConfirmDialog(title, text,
                                       () => {
                dialog.destroy();
                onOk();
            },
                                       () => dialog.destroy(),
                                       okText, cancelText);
        }