public override bool IsSelectionEnabled(MetadataType metadataType) { bool result = false; if (!UserSelection.HasItemsAddedByUser) { result = true; } else { var vm = new QuestionDialogViewModel(metadataType); var questionDialog = new QuestionDialogWindow(vm); questionDialog.Owner = WizardShell.Current; questionDialog.ShowDialog(); if (vm.Result == DialogResult.Accept) { UserSelection.ResetUserSelection(); result = true; } else { result = false; } } if (result == true) { StepsViewModels.Values.ToList().ForEach(vm => vm.ResetTemplatesCount()); } return(result); }
public override bool IsSelectionEnabled(MetadataType metadataType) { bool result = false; if (!UserSelection.HasItemsAddedByUser) { result = true; } else { var vm = new QuestionDialogViewModel(metadataType); var questionDialog = new QuestionDialogWindow(vm); questionDialog.ShowDialog(); if (vm.Result == DialogResult.Accept) { UserSelection.ResetUserSelection(); result = true; } else { result = false; } } if (result == true) { AddPages.ResetUserSelection(); AddFeatures.ResetTemplatesCount(); } return(result); }