コード例 #1
0
        public bool?ShowModal(params object[] parameters)
        {
            var vm     = new GenerateConfigDialogViewModel((string)parameters?.FirstOrDefault());
            var dialog = new GenerateConfigDialog();

            dialog.Owner       = App.Current.MainWindow;
            dialog.DataContext = vm;
            var result = dialog.ShowDialog();

            if (result == true)
            {
                Result = vm.Settings;
            }
            return(result);
        }
コード例 #2
0
        public bool?ShowModal()
        {
            var vm     = new GenerateConfigDialogViewModel();
            var dialog = new GenerateConfigDialog();

            dialog.Owner       = App.Current.MainWindow;
            dialog.DataContext = vm;
            var result = dialog.ShowDialog();

            if (result == true)
            {
                Result = vm.Settings;
            }
            return(result);
        }