public SoundboardViewModel(Soundboard soundboard, IMessageBoxService msgBoxServ, IFileFolderDialogService fileFolderServ) { _messageBoxService = msgBoxServ; _fileDolderDialogService = fileFolderServ; _soundboard = soundboard; _fileFormatInspector = new FileFormatInspector(RecognizableFormats.GetAllFormats()); Initialize(); }
public SoundboardViewModel() { _messageBoxService = AppServices.MessageBoxService; _fileDolderDialogService = AppServices.FileFolderDialogService; _soundboard = SoundboardViewModelSimpleFactory.Factory.GetConfiguredModel(); _fileFormatInspector = new FileFormatInspector(RecognizableFormats.GetAllFormats()); Initialize(); }
public static IFileFolderDialogService GetFileFolderDialogService() { string lowered = AppConfiguration.Configurations["UIFramework"].ToLowerInvariant(); switch (lowered) { case "wpf": return(new WpfAppFileFolderDialog() { Filter = FileFolderHelper.GetWindowsExplorerFilters(RecognizableFormats.GetAllFormats().Distinct(new DistinctFileFormatComparer()).ToArray()) }); default: throw new InvalidOperationException("Not recognized type of UIFramework"); } }