Beispiel #1
0
        public static ConfirmActionResult ShowDialog(string message, Window parent)
        {
            var dialog = new ConfirmActionDialog(message);

            dialog.Top  = parent.Top + ((parent.Height - dialog.Height) / 2);
            dialog.Left = parent.Left + ((parent.Width - dialog.Width) / 2);
            dialog.ShowDialog();
            return(new ConfirmActionResult {
                Ok = dialog._ok, ShowAgain = dialog._showAgain
            });
        }
Beispiel #2
0
        private void MenuItemNewBlock_OnClick(object sender, RoutedEventArgs e)
        {
            var result = ConfirmActionDialog.ShowDialog("New block was selected. Do you wish to procceed?", this);

            MessageBox.Show($"Ok: {result.Ok}, ShowAgain {result.ShowAgain}");
        }