public VolumeViewModel(IVolumeService volumeController) { _volumeController = volumeController; MaxVolume = volumeController.GetMaxVolume(); Volume = volumeController.GetVolume(); volumeController.VolumeChanged += VolumeController_VolumeChanged; }
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); }
public VideoPlayerViewModel(MediaPlayerBuilder playerService, IVideoLibrary videoLibrary, IVolumeService volumeController, IBrightnessService brightnessController, IOrientationService orientationService, IStatusBarService statusBarService, IFileService fileService) { App.DebugLog(""); this.videoLibrary = videoLibrary; this.orientationService = orientationService; this.statusBarService = statusBarService; FilePickerVM = new FilePickerViewModel(fileService); FilePickerVM.SubtitleFileTappedCommand = new Command <object>(o => SubtitleFileTapped(o)); ToggleFavoriteCommand = new Command(ToggleFavorite); ToggleControlsVisibilityCommand = new Command(ToggleControlsVisibility); ToggleAudioTracksCommand = new Command(ToggleAudioTracks); ToggleSubtitlesCommand = new Command(ToggleSubtitles); ToggleMediaInfoCommand = new Command(ToggleMediaInfo); SelectSubtitlesCommand = new Command <object>(SelectSubtitles, (e) => canChangeSubtitles); SelectAudioTrackCommand = new Command <object>(SelectAudioTrack, (e) => canChangeAudioTrack); OpenSubtitlesFromFileCommand = new Command(OpenSubtitlesFilePicker); volumeViewModel = new VolumeViewModel(volumeController); brightnessViewModel = new BrightnessViewModel(brightnessController); favoriteScenes = new FavoritesCollection(favoriteSceneDuration); VlcPlayerHelper = new VlcPlayerHelper(playerService); }
/// <summary> /// Initializes a new instance of the <see cref="VolumeController" /> class. /// </summary> /// <param name="volumeService">The volume service.</param> /// <param name="interactionController">The interaction controller.</param> /// <param name="volumeControllerReporter">The volume controller reporter.</param> public VolumeController(IVolumeService volumeService, IInteractionController interactionController, IVolumeControllerReporter?volumeControllerReporter) { this.volumeService = volumeService; this.interactionController = interactionController; this.volumeControllerReporter = volumeControllerReporter; this.volumeControllerReporter?.SetSource(this); this.interactionController.KeyInputEvent.Register(this, this.OnInteractionControllerKeyInput); }
public DefaultPatWorkflow(string appDirectory) { _modulesService = new ModulesService(Path.Combine(appDirectory, "Modules")); _optionsService = new OptionsService(Path.Combine(appDirectory, "options.bin")); _volumeService = new VolumeService(); DimensionedValue.DimensionService = new DimensionService(_modulesService.GetModules <IDimensionModule>()); _topHorizonDataSourceSelector = new ModuleSelector <IDataSourceModule>(_modulesService.GetModules <IDataSourceModule>(), _optionsService); _baseHorizonModifierSelector = new ModuleSelector <ISourceModifierModule>(_modulesService.GetModules <ISourceModifierModule>(), _optionsService); _triangulationModuleSelector = new ModuleSelector <ITriangulationModule>(_modulesService.GetModules <ITriangulationModule>(), _optionsService); _fluidContactModifierSelector = new ModuleSelector <ITriangulationModifierModule>(_modulesService.GetModules <ITriangulationModifierModule>(), _optionsService); _resultDimensionSelector = new ModuleSelector <IDimensionModule>(_modulesService.GetModules <IDimensionModule>().Where(m => m.Type == DimensionType.Cubic), _optionsService); _resultDimensionSelector.PropertyChanged += ResultDimensionSelectorOnPropertyChanged; }
/// <summary> /// Initializes a new instance of the <see cref="ViewFactory" /> class. /// </summary> /// <param name="musicPlayer">The music player.</param> /// <param name="playerController">The player controller.</param> /// <param name="volumeService">The volume service.</param> /// <param name="menuController">The menu controller.</param> /// <param name="lifecycleConfiguration">The lifecycle configuration.</param> public ViewFactory(IMusicPlayer musicPlayer, PlayerController playerController, IVolumeService volumeService, MenuController menuController, ILifecycleConfiguration lifecycleConfiguration) { this.playerView = new Lazy <PlayerTextView>(() => new PlayerTextView(playerController, musicPlayer, volumeService), LazyThreadSafetyMode.ExecutionAndPublication); this.menuView = new Lazy <MenuTextView>(() => new MenuTextView(new NetworkDeviceInfoProvider(), menuController)); this.volumeView = new Lazy <VolumeTextView>(() => new VolumeTextView(volumeService), LazyThreadSafetyMode.ExecutionAndPublication); this.shutdownView = new Lazy <ShutdownTextView>(() => new ShutdownTextView(lifecycleConfiguration)); }
public ContainerBuilder MountVolume(IVolumeService volume, string fqContainerPath, MountType access) { _config.CreateParams.Volumes = _config.CreateParams.Volumes.ArrayAdd($"{volume.Name}:{fqContainerPath.EscapePath()}:{access.ToDocker()}"); return(this); }
public VolumeController(ILogger<TemperatureController> logger, IVolumeService volumeService) { _logger = logger; _volumeService = volumeService; }
public Sender(IVolumeService volServ) { this.volumeService = volServ; this.volumeService.ChangeVolume += new EventHandler <ValueEventArgs <string> >(VolumeChanged); }
public VolumeController(IVolumeService volumeService) { this.VolumeService = volumeService; }
/// <summary> /// Initializes a new instance of the <see cref="VolumeTextView" /> class. /// </summary> /// <param name="volumeService">The volume service.</param> public VolumeTextView(IVolumeService volumeService) { this.volumeService = volumeService; this.volumeService.VolumeChanged += this.OnVolumeServiceVolumeChanged; }
public VolumeManager(IVolumeService volumes, Ec2Client ec2) { this.ec2 = ec2 ?? throw new ArgumentNullException(nameof(ec2)); this.volumeService = volumes ?? throw new ArgumentNullException(nameof(volumes)); }
public AudioCommand(IVolumeService volumeService) { this.volumeService = volumeService; }
static Program() { /// Inject the VolumeService using the Dependency Inversion Principle _volumeService = new VolumeService(); }
public AudioController(MidgeContext context, IServiceManager serviceManager) : base(context, serviceManager) { _volumeService = Services.GetService <IVolumeService>(); _audioStreamService = Services.GetService <IAudioStreamService>(); }