public VolumeLevel Add(Room room, VolumeLevelType type, IVolumeDevice volumeDevice) { VolumeLevel level = new VolumeLevel(room, type, volumeDevice); this.Add(level); return(level); }
void volumeDevice_VolumeChanged(IVolumeDevice device, VolumeChangeEventArgs args) { if (VolumeChanged != null) { VolumeChanged(this, args); } }
protected virtual void OnVolumeChanged(IVolumeDevice device, VolumeChangeEventArgs args) { var handler = VolumeChanged; if (handler != null) { handler(device, args); } }
public VolumeLevel(VolumeLevelType levelType, IVolumeDevice volumeDevice) { this.Device = volumeDevice; this.LevelType = levelType; volumeDevice.VolumeChanged += new VolumeDeviceChangeEventHandler(volumeDevice_VolumeChanged); #if DEBUG CrestronConsole.PrintLine("Created new VolumeLevel {0}, {1}", levelType.ToString(), volumeDevice.Name); #endif }
public void VolumeDown(string name) { IVolumeDevice volume = this.GetVolumeDevice(name); if (volume.IsOn) { volume.VolumeSystem.VolumeDown(); this.Unit.SaveChanges(); } }
void mic_VolumeChanged(IVolumeDevice device, VolumeChangeEventArgs args) { // Loop through all mics and check all mics are equal to the calling devices status // If not return so we don't call event for the group foreach (ShureCeilingMic mic in this) { if (device.VolumeMute != mic.VolumeMute) { return; } } if (VolumeChanged != null) { VolumeChanged(this, new VolumeChangeEventArgs(VolumeLevelChangeEventType.MuteChanged)); } }