public DeviceAlert(XmlNode alert, VeraController controller) : base(alert, controller) { XmlAttributeCollection xmlAttribs = alert.Attributes; DeviceID = Convert.ToInt32(xmlAttribs["PK_Device"].Value); RoomID = Convert.ToInt32(xmlAttribs["Room"].Value); DeviceName = xmlAttribs["DeviceName"].Value; DeviceType = xmlAttribs["DeviceType"].Value; }
private async void btnGetDevices_ClickAsync(object sender, EventArgs e) { m_Controller = new VeraController(txtControllerAddress.Text); m_Controller.DebugPrint += AddTextToOutput; await m_Controller.ConnectAsync(); PopulateDeviceTreeView(); }
public Alert(XmlNode alert, VeraController controller) { XmlAttributeCollection xmlAttribs = alert.Attributes; Controller = controller; Description = xmlAttribs["Description"].Value; Timestamp = Convert.ToInt64(xmlAttribs["LocalTimestamp"].Value); LocalTime = Convert.ToDateTime(xmlAttribs["LocalDate"].Value); ID = Convert.ToUInt64(xmlAttribs["PK_Alert"].Value); Type = (EventType)Convert.ToUInt32(xmlAttribs["EventType"].Value); }
public static Alert Construct(XmlNode alert, VeraController controller) { XmlAttributeCollection xmlAttribs = alert.Attributes; Alert.EventType iEventType = (Alert.EventType)Convert.ToInt32(xmlAttribs["EventType"].Value); Alert retAlert = null; switch (iEventType) { case Alert.EventType.DeviceStatus: retAlert = new DeviceAlert(alert, controller); break; case Alert.EventType.SysError: default: retAlert = new Alert(alert, controller); break; } return(retAlert); }
public Device(XmlNode device, VeraController controller) { Controller = controller; Update(device, Controller.Rooms); }
public Dimmer(XmlNode device, VeraController controller) : base(device, controller) { }
public SwitchDevice(XmlNode device, VeraController controller) : base(device, controller) { }
public RollerShutter(XmlNode device, VeraController controller) : base(device, controller) { }