public MainViewModel(IMainModelSerializer mainModelSerializer, IFileSystem fileSystem) { this.documentationFormats = new MultiSelectableCollection <DocumentationFormat>( Enum.GetValues(typeof(DocumentationFormat)).Cast <DocumentationFormat>()); this.documentationFormats.First().IsSelected = true; this.documentationFormats.SelectionChanged += this.DocumentationFormatsOnCollectionChanged; this.testResultsFormats = Enum.GetValues(typeof(TestResultsFormat)).Cast <TestResultsFormat>().ToArray(); this.selectedTestResultsFormat = TestResultsFormat.NUnit; this.browseForFeatureFolderCommand = new RelayCommand(this.DoBrowseForFeature); this.browseForOutputFolderCommand = new RelayCommand(this.DoBrowseForOutputFolder); this.browseForTestResultsFileCommand = new RelayCommand(this.DoBrowseForTestResultsFile); this.generateCommand = new RelayCommand(this.DoGenerate, this.CanGenerate); this.generatePowerShellCommandCommand = new RelayCommand(this.DoGeneratePowerShellCommand, this.CanGenerate); this.generateCLICommandCommand = new RelayCommand(this.DoGenerateCLICommand, this.CanGenerate); this.openOutputDirectory = new RelayCommand(this.DoOpenOutputDirectory, this.CanOpenOutputDirectory); this.PropertyChanged += this.MainWindowViewModelPropertyChanged; this.neutralCultures = CultureInfo.GetCultures(CultureTypes.NeutralCultures); this.selectedLanguage = CultureInfo.GetCultureInfo("en"); this.mainModelSerializer = mainModelSerializer; this.fileSystem = fileSystem; }
public MainWindowViewModel(IMainModelSerializer mainModelSerializer) { documentationFormats = new MultiSelectableCollection <DocumentationFormat>(Enum.GetValues(typeof(DocumentationFormat)).Cast <DocumentationFormat>()); documentationFormats.First().IsSelected = true; documentationFormats.SelectionChanged += DocumentationFormatsOnCollectionChanged; testResultsFormats = new SelectableCollection <TestResultsFormat>(Enum.GetValues(typeof(TestResultsFormat)).Cast <TestResultsFormat>()); testResultsFormats.First().IsSelected = true; testResultsFormats.SelectionChanged += TestResultsFormatsOnCollectionChanged; browseForFeatureFolderCommand = new RelayCommand(DoBrowseForFeature); browseForOutputFolderCommand = new RelayCommand(DoBrowseForOutputFolder); browseForTestResultsFileCommand = new RelayCommand(DoBrowseForTestResultsFile); generateCommand = new RelayCommand(DoGenerate, CanGenerate); openOutputDirectory = new RelayCommand(DoOpenOutputDirectory, CanOpenOutputDirectory); this.PropertyChanged += MainWindowViewModel_PropertyChanged; neutralCultures = CultureInfo.GetCultures(CultureTypes.NeutralCultures); selectedLanguage = CultureInfo.GetCultureInfo("en"); this.mainModelSerializer = mainModelSerializer; }
public MainWindowViewModel(IMainModelSerializer mainModelSerializer, IFileSystem fileSystem) { this.documentationFormats = new MultiSelectableCollection<DocumentationFormat>(Enum.GetValues(typeof(DocumentationFormat)).Cast<DocumentationFormat>()); this.documentationFormats.First().IsSelected = true; this.documentationFormats.SelectionChanged += this.DocumentationFormatsOnCollectionChanged; this.testResultsFormats = new SelectableCollection<TestResultsFormat>(Enum.GetValues(typeof(TestResultsFormat)).Cast<TestResultsFormat>()); this.testResultsFormats.First().IsSelected = true; this.testResultsFormats.SelectionChanged += this.TestResultsFormatsOnCollectionChanged; this.browseForFeatureFolderCommand = new RelayCommand(this.DoBrowseForFeature); this.browseForOutputFolderCommand = new RelayCommand(this.DoBrowseForOutputFolder); this.browseForTestResultsFileCommand = new RelayCommand(this.DoBrowseForTestResultsFile); this.generateCommand = new RelayCommand(this.DoGenerate, this.CanGenerate); this.openOutputDirectory = new RelayCommand(this.DoOpenOutputDirectory, this.CanOpenOutputDirectory); this.PropertyChanged += this.MainWindowViewModel_PropertyChanged; this.neutralCultures = CultureInfo.GetCultures(CultureTypes.NeutralCultures); this.selectedLanguage = CultureInfo.GetCultureInfo("en"); this.mainModelSerializer = mainModelSerializer; this.fileSystem = fileSystem; }