Esempio n. 1
0
        public bool Show(string content, string caption, bool ShowCancel = false)
        {
            Caption          = caption;
            Content          = content;
            ShowOkButton     = true;
            ShowCancelButton = ShowCancel;
            OkIsCancel       = !ShowCancelButton;
            var dialog = new MessageBoxView(this).ShowDialog();

            if (dialog.HasValue)
            {
                return(dialog.Value);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
        public bool Show(Window owner, string caption, string content, bool showCancel = false)
        {
            Caption          = caption;
            Content          = content;
            ShowOkButton     = true;
            ShowCancelButton = showCancel;
            OkIsCancel       = !ShowCancelButton;
            var dialog = new MessageBoxView(this)
            {
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
                Owner = owner
            }.ShowDialog();

            if (dialog.HasValue)
            {
                return(dialog.Value);
            }

            return(false);
        }