コード例 #1
0
ファイル: MusicPlayerViewModel.cs プロジェクト: kusl/vlcwinrt
 public MusicPlayerViewModel(HistoryService historyService, IMediaService mediaService, VlcService mediaPlayerService)
     : base(historyService, mediaService, mediaPlayerService)
 {
     _trackCollection = new TrackCollectionViewModel();
     _mediaService.MediaEnded += MediaService_MediaEnded;
     _historyService = historyService;
 }
コード例 #2
0
ファイル: PlayVideoViewModel.cs プロジェクト: kusl/vlcwinrt
        public PlayVideoViewModel(HistoryService historyService, IMediaService mediaService, VlcService mediaPlayerService)
            : base(historyService, mediaService, mediaPlayerService)
        {
            _subtitles = new ObservableCollection<Subtitle>();
            _subtitlesTracks = new Dictionary<int, string>();
            _audioTracks = new Dictionary<int, string>();
#if NETFX_CORE
            _mouseService = App.Container.Resolve<MouseService>();
#endif
            _setSubTitlesCommand = new SetSubtitleTrackCommand();
            _setAudioTrackCommand = new SetAudioTrackCommand();
            _openSubtitleCommand = new OpenSubtitleCommand();
        }
コード例 #3
0
ファイル: LastViewedViewModel.cs プロジェクト: kusl/vlcwinrt
        public LastViewedViewModel()
        {
            _historyService = App.Container.Resolve<HistoryService>();

            if (_historyService.FileCount() > 0)
            {
                LastViewedSectionVisible = true;
            }
            else
            {
                WelcomeSectionVisible = true;
            }
            _clearHistoryCommand = new ClearHistoryCommand();
            _historyService.HistoryUpdated += UpdateHistory;
        }
コード例 #4
0
        protected MediaPlaybackViewModel(HistoryService historyService, IMediaService mediaService, VlcService mediaPlayerService)
        {
            _historyService = historyService;

            _mediaService = mediaService;
            _mediaService.StatusChanged += PlayerStateChanged;

            _vlcPlayerService = mediaPlayerService;

            _displayAlwaysOnRequest = new DisplayRequest();
            _sliderPositionTimer = new DispatcherTimer();
            _sliderPositionTimer.Tick += FirePositionUpdate;
            _sliderPositionTimer.Interval = TimeSpan.FromMilliseconds(16);

            _skipAhead = new ActionCommand(() => _mediaService.SkipAhead());
            _skipBack = new ActionCommand(() => _mediaService.SkipBack());
            _playNext = new PlayNextCommand();
            _playPrevious = new PlayPreviousCommand();
            _playOrPause = new PlayPauseCommand();
            _goBackCommand = new StopVideoCommand();
        }
コード例 #5
0
ファイル: MediaService.cs プロジェクト: kusl/vlcwinrt
        public MediaService(HistoryService historyService, VlcService vlcService)
        {
            _historyService = historyService;
            _vlcService = vlcService;

            _vlcService.MediaEnded += VlcPlayerService_MediaEnded;
            _vlcService.StatusChanged += VlcPlayerService_StatusChanged;
            MediaControl.IsPlaying = false;

            CoreWindow.GetForCurrentThread().Activated += ApplicationState_Activated;
        }
コード例 #6
0
ファイル: VlcService.cs プロジェクト: kusl/vlcwinrt
 public VlcService(HistoryService historyService)
 {
     CurrentState = MediaPlayerState.Stopped;
     _historyService = historyService;
 }