| | |
| | | functionListView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = showdFunctionTypeRow.Bottom, |
| | | Height = Application.GetRealHeight(530), |
| | | Height = Application.GetRealHeight(530-60), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(functionListView); |
| | |
| | | input = new SecurityInput(); |
| | | input.sid = function.sid; |
| | | |
| | | var inKey = "status"; |
| | | var inValue = "true"; |
| | | switch(function.spk) |
| | | { |
| | | case SPK.SensorWater: |
| | | inKey = "alarm_status"; |
| | | inValue = "alarm"; |
| | | break; |
| | | case SPK.SensorPir: |
| | | inKey = "people_status"; |
| | | break; |
| | | case SPK.SensorSmoke: |
| | | inKey = "alarm_status"; |
| | | inValue = "alarm"; |
| | | break; |
| | | case SPK.SensorGas: |
| | | inKey = "alarm_status"; |
| | | inValue = "alarm"; |
| | | break; |
| | | case SPK.SensorDoorWindow: |
| | | inKey = "contact_status"; |
| | | inValue = "open"; |
| | | break; |
| | | } |
| | | input.condition = new List<SecurityInputCondition>() |
| | | { |
| | | new SecurityInputCondition() |
| | | { |
| | | key = "status", |
| | | value = "true", |
| | | key = inKey, |
| | | value = inValue, |
| | | } |
| | | }; |
| | | |