コード例 #1
0
        // Constructors

        public DefaultAudioSwitch(IDisplayManager displayManager,
                                  IAudioDeviceManager audioDeviceManager,
                                  IConfigurationReader configurationReader,
                                  IConfigurationWriter configurationWriter)
        {
            _displayManager      = displayManager;
            _audioDeviceManager  = audioDeviceManager;
            _configurationReader = configurationReader;
            _configurationWriter = configurationWriter;
            _configuration       = CreateDefaultConfigurationIfNecessary(displayManager);
            _lastDisplayNode     = _displayManager.GetCurrentDisplayMode();
            _displayManager.DisplayModeChanged += DisplayModeChanged;
            _displayManager.StartPolling(1000);
        }