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());
 }
예제 #3
0
 public PlayerController(IShellService shellService, IEnvironmentService environmentService, ISelectionService selectionService, PlayerService playerService,
                         IMusicPropertiesService musicPropertiesService, IPlaylistService playlistService, Lazy <PlayerViewModel> playerViewModel, ExportFactory <InfoViewModel> infoViewModelFactory)
 {
     this.shellService               = shellService;
     this.environmentService         = environmentService;
     this.selectionService           = selectionService;
     this.playerService              = playerService;
     this.musicPropertiesService     = musicPropertiesService;
     this.playlistService            = playlistService;
     this.playerViewModel            = playerViewModel;
     this.infoViewModelFactory       = infoViewModelFactory;
     this.playAllCommand             = new DelegateCommand(PlayAll, CanPlayAll);
     this.playSelectedCommand        = new DelegateCommand(PlaySelected, CanPlaySelected);
     this.enqueueAllCommand          = new DelegateCommand(EnqueueAll, CanEnqueueAll);
     this.enqueueSelectedCommand     = new DelegateCommand(EnqueueSelected, CanEnqueueSelected);
     this.previousTrackCommand       = new DelegateCommand(PreviousTrack, CanPreviousTrack);
     this.nextTrackCommand           = new DelegateCommand(NextTrack, CanNextTrack);
     this.infoCommand                = new DelegateCommand(ShowInfo);
     this.showMusicPropertiesCommand = new DelegateCommand(ShowMusicProperties);
     this.showPlaylistCommand        = new DelegateCommand(ShowPlaylist);
 }