public MusicPropertiesController(IShellService shellService, IMusicFileContext musicFileContext, ISelectionService selectionService, Lazy<MusicPropertiesViewModel> musicPropertiesViewModel)
 {
     this.shellService = shellService;
     this.musicFileContext = musicFileContext;
     this.selectionService = selectionService;
     this.musicPropertiesViewModel = musicPropertiesViewModel;
     this.musicFilesToSaveAfterPlaying = new HashSet<MusicFile>();
 }
Beispiel #2
0
 public MusicPropertiesController(IShellService shellService, IMusicFileContext musicFileContext, ISelectionService selectionService, Lazy <MusicPropertiesViewModel> musicPropertiesViewModel)
 {
     this.shellService             = shellService;
     this.musicFileContext         = musicFileContext;
     this.selectionService         = selectionService;
     this.musicPropertiesViewModel = musicPropertiesViewModel;
     changeTrackerService          = new ChangeTrackerService();
     musicFilesToSaveAfterPlaying  = new HashSet <MusicFile>();
 }
 public TranscodingController(IMessageService messageService, IShellService shellService, IMusicFileContext musicFileContext, ISelectionService selectionService,
                              TranscodingService transcodingService, Lazy <ITranscoder> transcoder, Lazy <TranscodingListViewModel> transcodingListViewModel)
 {
     this.messageService              = messageService;
     this.shellService                = shellService;
     this.musicFileContext            = musicFileContext;
     this.selectionService            = selectionService;
     this.transcodingService          = transcodingService;
     this.transcoder                  = transcoder;
     this.transcodingListViewModel    = transcodingListViewModel;
     this.cancellationTokenSources    = new Dictionary <TranscodeItem, CancellationTokenSource>();
     this.convertToMp3AllCommand      = new DelegateCommand(ConvertToMp3All, CanConvertToMp3All);
     this.convertToMp3SelectedCommand = new DelegateCommand(ConvertToMp3Selected, CanConvertToMp3Selected);
     this.cancelAllCommand            = new DelegateCommand(CancelAll, CanCancelAll);
     this.cancelSelectedCommand       = new DelegateCommand(CancelSelected, CanCancelSelected);
     this.throttler          = new SemaphoreSlim(Environment.ProcessorCount); // Do not dispose the throttler; it is used after Shutdown to cancel the open tasks
     this.transcodingManager = new TranscodingManager();
 }
 public TranscodingController(IMessageService messageService, IShellService shellService, IMusicFileContext musicFileContext, ISelectionService selectionService, 
     TranscodingService transcodingService, Lazy<ITranscoder> transcoder, Lazy<TranscodingListViewModel> transcodingListViewModel)
 {
     this.messageService = messageService;
     this.shellService = shellService;
     this.musicFileContext = musicFileContext;
     this.selectionService = selectionService;
     this.transcodingService = transcodingService;
     this.transcoder = transcoder;
     this.transcodingListViewModel = transcodingListViewModel;
     this.cancellationTokenSources = new Dictionary<TranscodeItem, CancellationTokenSource>();
     this.convertToMp3AllCommand = new DelegateCommand(ConvertToMp3All, CanConvertToMp3All);
     this.convertToMp3SelectedCommand = new DelegateCommand(ConvertToMp3Selected, CanConvertToMp3Selected);
     this.cancelAllCommand = new DelegateCommand(CancelAll, CanCancelAll);
     this.cancelSelectedCommand = new DelegateCommand(CancelSelected, CanCancelSelected);
     this.throttler = new SemaphoreSlim(Environment.ProcessorCount);  // Do not dispose the throttler; it is used after Shutdown to cancel the open tasks
     this.transcodingManager = new TranscodingManager();
 }
 public PlaylistController(IFileDialogService fileDialogService, IShellService shellService, IEnvironmentService environmentService, 
     IMusicFileContext musicFileContext, IPlayerService playerService, IMusicPropertiesService musicPropertiesService, Lazy<PlaylistViewModel> playlistViewModel)
 {
     this.fileDialogService = fileDialogService;
     this.playlistViewModel = playlistViewModel;
     this.shellService = shellService;
     this.environmentService = environmentService;
     this.musicFileContext = musicFileContext;
     this.playerService = playerService;
     this.musicPropertiesService = musicPropertiesService;
     this.playSelectedCommand = new DelegateCommand(PlaySelected, CanPlaySelected);
     this.removeSelectedCommand = new DelegateCommand(RemoveSelected, CanRemoveSelected);
     this.showMusicPropertiesCommand = new DelegateCommand(ShowMusicProperties);
     this.openListCommand = new DelegateCommand(OpenList);
     this.saveListCommand = new DelegateCommand(SaveList);
     this.clearListCommand = new DelegateCommand(ClearList);
     this.openPlaylistFileType = new FileType(Resources.Playlist, SupportedFileTypes.PlaylistFileExtensions);
     this.savePlaylistFileType = new FileType(Resources.Playlist, SupportedFileTypes.PlaylistFileExtensions.First());
 }
 public PlaylistController(IFileDialogService fileDialogService, IShellService shellService, IEnvironmentService environmentService,
                           IMusicFileContext musicFileContext, IPlayerService playerService, IMusicPropertiesService musicPropertiesService, Lazy <PlaylistViewModel> playlistViewModel)
 {
     this.fileDialogService      = fileDialogService;
     this.playlistViewModel      = playlistViewModel;
     this.shellService           = shellService;
     this.environmentService     = environmentService;
     this.musicFileContext       = musicFileContext;
     this.playerService          = playerService;
     this.musicPropertiesService = musicPropertiesService;
     playSelectedCommand         = new DelegateCommand(PlaySelected, CanPlaySelected);
     removeSelectedCommand       = new DelegateCommand(RemoveSelected, CanRemoveSelected);
     showMusicPropertiesCommand  = new DelegateCommand(ShowMusicProperties);
     openListCommand             = new DelegateCommand(OpenList);
     saveListCommand             = new DelegateCommand(SaveList);
     clearListCommand            = new DelegateCommand(ClearList);
     openPlaylistFileType        = new FileType(Resources.Playlist, SupportedFileTypes.PlaylistFileExtensions);
     savePlaylistFileType        = new FileType(Resources.Playlist, SupportedFileTypes.PlaylistFileExtensions.First());
 }
 public TranscodingController(IMessageService messageService, IShellService shellService, IMusicFileContext musicFileContext, ISelectionService selectionService,
                              TranscodingService transcodingService, Lazy <ITranscoder> transcoder, Lazy <TranscodingListViewModel> transcodingListViewModel)
 {
     this.messageService           = messageService;
     this.shellService             = shellService;
     this.musicFileContext         = musicFileContext;
     this.selectionService         = selectionService;
     this.transcodingService       = transcodingService;
     this.transcoder               = transcoder;
     this.transcodingListViewModel = transcodingListViewModel;
     cancellationTokenSources      = new Dictionary <TranscodeItem, CancellationTokenSource>();
     convertToMp3AllCommand        = new DelegateCommand(ConvertToMp3All, CanConvertToMp3All);
     convertToMp3SelectedCommand   = new DelegateCommand(ConvertToMp3Selected, CanConvertToMp3Selected);
     cancelAllCommand              = new DelegateCommand(CancelAll, CanCancelAll);
     cancelSelectedCommand         = new DelegateCommand(CancelSelected, CanCancelSelected);
     throttler          = new SemaphoreSlim(Environment.ProcessorCount); // Do not dispose the throttler; it is used after Shutdown to cancel the open tasks
     transcodingManager = new TranscodingManager();
     throttledMusicFilesCollectionChangedAction = new ThrottledAction(ThrottledMusicFilesCollectionChanged, ThrottledActionMode.InvokeOnlyIfIdleForDelayTime, TimeSpan.FromMilliseconds(10));
 }
 public ManagerController(IShellService shellService, IEnvironmentService environmentService, IMusicFileContext musicFileContext, 
     SelectionService selectionService, ManagerStatusService managerStatusService, IFileSystemWatcherService fileSystemWatcherService, 
     Lazy<ManagerViewModel> managerViewModel)
 {
     this.shellService = shellService;
     this.environmentService = environmentService;
     this.musicFileContext = musicFileContext;
     this.selectionService = selectionService;
     this.managerStatusService = managerStatusService;
     this.fileSystemWatcherService = fileSystemWatcherService;
     this.managerViewModel = managerViewModel;
     this.musicFiles = new ObservableCollection<MusicFile>();
     this.updateSubDirectoriesCommand = new DelegateCommand(UpdateSubDirectories);
     this.navigateDirectoryUpCommand = new DelegateCommand(NavigateDirectoryUp, CanNavigateDirectoryUp);
     this.navigateHomeCommand = new DelegateCommand(NavigateHome);
     this.navigatePublicHomeCommand = new DelegateCommand(NavigatePublicHome);
     this.loadRecursiveCommand = new DelegateCommand(LoadRecursive);
     this.navigateToSelectedSubDirectoryCommand = new DelegateCommand(NavigateToSelectedSubDirectory);
     this.showMusicPropertiesCommand = new DelegateCommand(ShowMusicProperties);
 }
 public ManagerController(IShellService shellService, IEnvironmentService environmentService, IMusicFileContext musicFileContext,
                          SelectionService selectionService, ManagerStatusService managerStatusService, IFileSystemWatcherService fileSystemWatcherService,
                          Lazy <ManagerViewModel> managerViewModel)
 {
     this.shellService             = shellService;
     this.environmentService       = environmentService;
     this.musicFileContext         = musicFileContext;
     this.selectionService         = selectionService;
     this.managerStatusService     = managerStatusService;
     this.fileSystemWatcherService = fileSystemWatcherService;
     this.managerViewModel         = managerViewModel;
     this.musicFiles = new ObservableCollection <MusicFile>();
     this.updateSubDirectoriesCommand           = new DelegateCommand(UpdateSubDirectories);
     this.navigateDirectoryUpCommand            = new DelegateCommand(NavigateDirectoryUp, CanNavigateDirectoryUp);
     this.navigateHomeCommand                   = new DelegateCommand(NavigateHome);
     this.navigatePublicHomeCommand             = new DelegateCommand(NavigatePublicHome);
     this.loadRecursiveCommand                  = new DelegateCommand(LoadRecursive);
     this.navigateToSelectedSubDirectoryCommand = new DelegateCommand(NavigateToSelectedSubDirectory);
     this.showMusicPropertiesCommand            = new DelegateCommand(ShowMusicProperties);
     this.deleteSelectedFilesCommand            = new DelegateCommand(DeleteSelectedFiles);
 }