public DeviceStateNotification(DeviceState playstate) { MuteActive = playstate.muteActive; VolumeMaster = playstate.volumeMaster; ShuffleActive = playstate.shuffleActive; RepeatActive = playstate.repeatActive; }
void Device_VolumeChanged(object sender, DeviceController.DeviceVolumeEventArgs e) { DeviceState _playState = new DeviceState(); _playState.volumeMaster = e.Volume.ToString(); SendMessageAll(new Protocol.DeviceStateNotification(_playState)); }
void Device_MuteChanged(object sender, DeviceController.DeviceMuteEventArgs e) { DeviceState _playState = new DeviceState(); _playState.muteActive = (e.MuteState == DeviceController.DeviceMuteEventArgs.MuteStates.Muted) ? "true" : "false"; SendMessageAll(new Protocol.DeviceStateNotification(_playState)); }