예제 #1
0
        public SoundboardViewModel(Soundboard soundboard, IMessageBoxService msgBoxServ, IFileFolderDialogService fileFolderServ)
        {
            _messageBoxService       = msgBoxServ;
            _fileDolderDialogService = fileFolderServ;
            _soundboard          = soundboard;
            _fileFormatInspector = new FileFormatInspector(RecognizableFormats.GetAllFormats());

            Initialize();
        }
예제 #2
0
        public SoundboardViewModel()
        {
            _messageBoxService       = AppServices.MessageBoxService;
            _fileDolderDialogService = AppServices.FileFolderDialogService;
            _soundboard          = SoundboardViewModelSimpleFactory.Factory.GetConfiguredModel();
            _fileFormatInspector = new FileFormatInspector(RecognizableFormats.GetAllFormats());

            Initialize();
        }
예제 #3
0
        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");
            }
        }