public RevolabsExecutiveElite(ComPort comPort) { this.CommunicationType = CommDeviceType.Serial; ComHandler = new RevolabsComHandler(comPort); ComHandler.ReceivedData += new RevolabsdReceivedDataEventHandler(ComHandler_ReceivedData); Mics = new RevolabMicCollection(this); Groups = new RevolabMicGroupCollection(this); }
void ComHandler_ReceivedData(RevolabsComHandler handler, string data) { if (data.StartsWith("notify status_group_mute ")) { string[] parts = data.Split(' '); if (parts[2] == this.Name || this.AllMicsGroup) { bool value = (parts[3] == "0") ? false : true; if (_Mute != value) { _Mute = value; #if DEBUG CrestronConsole.PrintLine("Mic Group {0} Mute = {1}", this.Name, this.Mute); #endif if (VolumeChanged != null) { VolumeChanged(this, new VolumeChangeEventArgs(VolumeLevelChangeEventType.MuteChanged)); } } } } }
void ComHandler_ReceivedData(RevolabsComHandler handler, string data) { OnReceive(data); }