コード例 #1
0
        public void CloseDialogWithResult(IDialogWindow dialog, DialogResults <T> results)
        {
            NewStat      = results.MyStat;
            DialogResult = results.decisions;

            if (dialog != null)
            {
                dialog.DialogResult = true;
            }
        }
コード例 #2
0
        public DialogResults <T> OpenDialog <T>(DialogViewModelBase <T> viewModel)
        {
            IDialogWindow window = new DialogWindow();

            window.DataContext = viewModel;
            window.ShowDialog();

            DialogResults <T> dialogResults = new DialogResults <T>
            {
                decisions = viewModel.DialogResult,
                Equipment = viewModel.Equipment,
                MyStat    = viewModel.NewStat
            };

            return(dialogResults);
        }