protected override void OnInitialize() { base.OnInitialize(); var musicFileContext = Container.GetExportedValue<MockMusicFileContext>(); musicFiles = new ObservableCollection<MusicFile>() { musicFileContext.Create(@"C:\Users\Public\Music\Dancefloor\Culture Beat - Serenity.wav"), musicFileContext.Create(@"C:\Culture Beat - Serenity - Epilog.wma"), }; selectionService = Container.GetExportedValue<SelectionService>(); selectionService.Initialize(musicFiles); playlistManager = new PlaylistManager(); playlistSettings = new PlaylistSettings(); controller = Container.GetExportedValue<PlayerController>(); controller.PlaylistSettings = playlistSettings; controller.PlaylistManager = playlistManager; controller.Initialize(); shellService = Container.GetExportedValue<ShellService>(); shellService.ShowPlaylistViewAction = () => { }; view = (MockPlayerView)shellService.PlayerView; viewModel = ViewHelper.GetViewModel<PlayerViewModel>(view); }
protected override void OnInitialize() { base.OnInitialize(); controller = Container.GetExportedValue<ManagerController>(); controller.Initialize(); shellService = Container.GetExportedValue<ShellService>(); selectionService = Container.GetExportedValue<SelectionService>(); managerStatusService = Container.GetExportedValue<IManagerStatusService>(); var view = (MockManagerView)shellService.ContentView; viewModel = ViewHelper.GetViewModel<ManagerViewModel>(view); }
protected override void OnInitialize() { base.OnInitialize(); musicFileContext = Container.GetExportedValue<MockMusicFileContext>(); musicFiles = new ObservableCollection<MusicFile>() { musicFileContext.Create(@"C:\Users\Public\Music\Dancefloor\Culture Beat - Serenity.wav"), musicFileContext.Create(@"C:\Culture Beat - Serenity - Epilog.wma"), }; selectionService = Container.GetExportedValue<SelectionService>(); selectionService.Initialize(musicFiles); musicFiles.First().Metadata.Album = "Serenity"; }
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); }