public PlaylistController(ILogger logger, IPlaylistViewModel playlist, PlaylistTaskViewModel task, IVideoPlayer videoPlayer) { if (logger == null) throw new ArgumentNullException("logger"); if (playlist == null) throw new ArgumentNullException("playlist"); if (task == null) throw new ArgumentNullException("task"); if (videoPlayer == null) throw new ArgumentNullException("videoPlayer"); this.logger = logger; this.playlist = playlist; this.task = task; this.videoPlayer = videoPlayer; }
public void Playlist(PlaylistTaskViewModel taskViewModel, IPlaylistViewModel playlist) { if (taskViewModel == null) { throw new ArgumentNullException("taskViewModel"); } if (playlist == null) { throw new ArgumentNullException("playlist"); } try { if (!tabMap.ContainsKey(taskViewModel.Id)) { var playlistController = new PlaylistController(logger, playlist, taskViewModel, videoPlayer); var playlistView = new PlaylistView(); playlistView.Initialize(logger, playlistController); var tabItem = new TabItem(); //TextBlock header = new TextBlock(); //header.Inlines.Add(taskViewModel.Description); //header.ToolTip = string.Format("{0}: {1}", taskViewModel.Name, taskViewModel.Description); tabItem.Header = new TaskHeader(logger, taskViewModel); tabItem.Content = playlistView; resultControl.Items.Add(tabItem); tabItem.IsSelected = true; AddViewModel(taskViewModel, tabItem); if (taskViewModel.Status == TaskStatus.Ready) { taskViewModel.Start(); } } } catch (Exception ex) { logger.Error(" TaskResultView.Playlist", ex); } }
public PlaylistController(ILogger logger, IPlaylistViewModel playlist, PlaylistTaskViewModel task, IVideoPlayer videoPlayer) { if (logger == null) { throw new ArgumentNullException("logger"); } if (playlist == null) { throw new ArgumentNullException("playlist"); } if (task == null) { throw new ArgumentNullException("task"); } if (videoPlayer == null) { throw new ArgumentNullException("videoPlayer"); } this.logger = logger; this.playlist = playlist; this.task = task; this.videoPlayer = videoPlayer; }
public void Playlist(PlaylistTaskViewModel taskViewModel, IPlaylistViewModel playlist) { if (taskViewModel == null) throw new ArgumentNullException("taskViewModel"); if (playlist == null) throw new ArgumentNullException("playlist"); try { if (!tabMap.ContainsKey(taskViewModel.Id)) { var playlistController = new PlaylistController(logger, playlist, taskViewModel, videoPlayer); var playlistView = new PlaylistView(); playlistView.Initialize(logger, playlistController); var tabItem = new TabItem(); //TextBlock header = new TextBlock(); //header.Inlines.Add(taskViewModel.Description); //header.ToolTip = string.Format("{0}: {1}", taskViewModel.Name, taskViewModel.Description); tabItem.Header = new TaskHeader(logger, taskViewModel); tabItem.Content = playlistView; resultControl.Items.Add(tabItem); tabItem.IsSelected = true; AddViewModel(taskViewModel, tabItem); if (taskViewModel.Status == TaskStatus.Ready) { taskViewModel.Start(); } } } catch (Exception ex) { logger.Error(" TaskResultView.Playlist", ex); } }