//Event handlers void DeviceHandler_Events(object sender, SldwDeviceEventArgs e) { switch (e.EventType) { case SldwDeviceEventArgs.eSldwDeviceEventType.Name: SetNameFb(e.StringValue); break; case SldwDeviceEventArgs.eSldwDeviceEventType.Group: SetGroupFb(e.StringValue); break; case SldwDeviceEventArgs.eSldwDeviceEventType.Version: SetVersionFb(e.StringValue); break; case SldwDeviceEventArgs.eSldwDeviceEventType.Serial: SetSerialFb(e.StringValue); break; case SldwDeviceEventArgs.eSldwDeviceEventType.Product: SetProductFb(e.StringValue); break; case SldwDeviceEventArgs.eSldwDeviceEventType.MacAddresses: SetMacAddressesFb(e.StringValue); break; case SldwDeviceEventArgs.eSldwDeviceEventType.Brightness: SetBrightnessFb((ushort)(e.Brightness * 65535)); break; } }
void DeviceHandler_Events(object sender, SldwDeviceEventArgs e) { switch (e.EventType) { case SldwDeviceEventArgs.eSldwDeviceEventType.Name: _xpanel.StringInput[11].StringValue = e.StringValue; break; case SldwDeviceEventArgs.eSldwDeviceEventType.Group: _xpanel.StringInput[12].StringValue = e.StringValue; break; case SldwDeviceEventArgs.eSldwDeviceEventType.Version: _xpanel.StringInput[15].StringValue = e.StringValue; break; case SldwDeviceEventArgs.eSldwDeviceEventType.Serial: _xpanel.StringInput[14].StringValue = e.StringValue; break; case SldwDeviceEventArgs.eSldwDeviceEventType.Product: _xpanel.StringInput[13].StringValue = e.StringValue; break; case SldwDeviceEventArgs.eSldwDeviceEventType.MacAddresses: _xpanel.StringInput[16].StringValue = e.StringValue; break; case SldwDeviceEventArgs.eSldwDeviceEventType.Brightness: _xpanel.UShortInput[15].UShortValue = (ushort)(e.Brightness * 65535); break; } }
void ReceiverDeviceHandler_Events(object sender, SldwDeviceEventArgs e) { CrestronConsole.PrintLine(e.ToString()); }