Esempio n. 1
0
 public AudioSystem(IMusicSystem musicSystem, IVolumeSystem volumeSystem) : base(volumeSystem)
 {
     this.MusicalSystem             = (MusicalSystem)musicSystem;
     this.MusicalSystem.Songs       = this.MusicalSystem.GetDefaultSongs();
     this.MusicalSystem.CurrentSong = this.MusicalSystem.Songs.First().ToString();
     this.VolumeSystem.Volume       = this.volume;
 }
Esempio n. 2
0
 public MusicalDevice(IVolumeSystem volumeSystem)
 {
     this.VolumeSystem           = (VolumeSystem)volumeSystem;
     this.VolumeSystem.Volume    = volume;
     this.VolumeSystem.MaxVolume = maxVolume;
     this.VolumeSystem.MinVolume = minVolume;
 }
Esempio n. 3
0
        public TV(IChannelSystem channelSystem, IVolumeSystem volumeSystem, IBrightSystem brightSystem)
        {
            this.ChannelSystem = (ChannelSystem)channelSystem;
            this.VolumeSystem  = (VolumeSystem)volumeSystem;
            this.BrightSystem  = (BrightSystem)brightSystem;

            this.VolumeSystem.Volume    = this.volume;
            this.VolumeSystem.MinVolume = 0;
            this.VolumeSystem.MaxVolume = 100;

            this.BrightSystem.BrightLevel = BrightLevel.Medium;
        }