예제 #1
0
 public VolumeViewModel(IVolumeService volumeController)
 {
     _volumeController = volumeController;
     MaxVolume         = volumeController.GetMaxVolume();
     Volume            = volumeController.GetVolume();
     volumeController.VolumeChanged += VolumeController_VolumeChanged;
 }
예제 #2
0
 public VideoPlayerViewModel(INavigationService navigationService, MediaPlayerService playerService,
                             IVideoLibrary videoLibrary, IVolumeService volumeController, IBrightnessService brightnessController,
                             IOrientationService orientationService, IStatusBarService statusBarService)
 {
     App.DebugLog("");
     this.navigationService          = navigationService;
     this.playerService              = playerService;
     this.videoLibrary               = videoLibrary;
     this.volumeController           = volumeController;
     this.brightnessController       = brightnessController;
     this.orientationService         = orientationService;
     this.statusBarService           = statusBarService;
     PlayPauseCommand                = new DelegateCommand(TogglePlayPause);
     ToggleFavoriteCommand           = new DelegateCommand(ToggleFavorite);
     ToggleControlsVisibilityCommand = new DelegateCommand(ToggleControlsVisibility);
     ToggleAudioTracksCommand        = new DelegateCommand(ToggleAudioTracks);
     ToggleSubtitlesCommand          = new DelegateCommand(ToggleSubtitles);
     ToggleMediaInfoCommand          = new DelegateCommand(ToggleMediaInfo);
     SelectSubtitlesCommand          = new DelegateCommand <object>(SelectSubtitles, (e) => canChangeSubtitles);
     SelectAudioTrackCommand         = new DelegateCommand <object>(SelectAudioTrack, (e) => canChangeAudioTrack);
     MaxVolume = volumeController.GetMaxVolume();
     Volume    = volumeController.GetVolume();
     volumeController.VolumeChanged += VolumeController_VolumeChanged;
     Brightness     = Settings.VideoBrightness;
     favoriteScenes = new FavoritesCollection(favoriteSceneDuration);
 }