| | |
| | | X = Application.GetRealWidth(150), |
| | | }; |
| | | topFrameLayout.AddChidren(titleName); |
| | | if (Common.Logic.CurrentLogic.LogicId == 1) |
| | | if (Common.Logic.CurrentLogic.LogicId != 0) |
| | | { |
| | | titleName.Text = Language.StringByID(MyInternationalizationString.editautomation); |
| | | } |
| | |
| | | UnSelectedImagePath = "ZigeeLogic/Back.png", |
| | | }; |
| | | topFrameLayout.AddChidren(back); |
| | | |
| | | back.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | //if (Common.Logic.CurrentLogic.LogicId != 0) |
| | |
| | | Height = Application.GetRealHeight(160), |
| | | Gravity = Gravity.CenterVertical, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | X = Application.GetRealWidth(1080 - 330), |
| | | X = Application.GetRealWidth(1080 - 340), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | | conditionsowLayout.AddChidren(devicestatus); |
| | |
| | | |
| | | } |
| | | break; |
| | | default: |
| | | { |
| | | if (intvalue == "1") |
| | | { |
| | | devicestatus.TextID = MyInternationalizationString.callthepolice; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | } |
| | | } |
| | | break; |
| | |
| | | Height = Application.GetRealHeight(160), |
| | | Gravity = Gravity.CenterVertical, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | X = Application.GetRealWidth(1080 - 330), |
| | | X = Application.GetRealWidth(1080 - 340), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | | actionsrowLayout.AddChidren(devicestatus); |
| | |
| | | |
| | | switch (deviceinof.Type) |
| | | { |
| | | |
| | | case DeviceType.OnOffOutput: |
| | | { |
| | | var TaskList = actions["TaskList"] as List<Dictionary<string, string>>; |
| | |
| | | devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.close); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case DeviceType.DimmableLight: |
| | | { |
| | | var TaskList = actions["TaskList"] as List<Dictionary<string, string>>; |
| | | if (TaskList == null) |
| | | { |
| | | continue; |
| | | } |
| | | foreach (var status in TaskList) |
| | | { |
| | | if (status["TaskType"].ToString() == "3") |
| | | { |
| | | var intvalue = int.Parse(status["Data1"]); |
| | | var lightbrightnessvalue = (intvalue * 100) / 254; |
| | | devicestatus.Text = lightbrightnessvalue.ToString() + "%"; |
| | | } |
| | | else if (status["TaskType"].ToString() == "1") |
| | | { |
| | | if (status["Data1"].ToString() == "1") |
| | | { |
| | | devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.open); |
| | | } |
| | | else |
| | | { |
| | | devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.close); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | Gravity = Gravity.CenterVertical, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | //TextColor = 0xff121212, |
| | | TextID = MyInternationalizationString.securitymode, |
| | | TextID = MyInternationalizationString.security, |
| | | }; |
| | | actionsrowLayout.AddChidren(btnsecurity); |
| | | |
| | |
| | | #endregion |
| | | |
| | | #region ----推送设置---- |
| | | |
| | | /* |
| | | var pushRowLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(150), |
| | |
| | | btncustompush.MouseUpEventHandler += customclick; |
| | | custompushback.MouseUpEventHandler += customclick; |
| | | custompushRowLayout.MouseUpEventHandler += customclick; |
| | | */ |
| | | #endregion |
| | | |
| | | |
| | |
| | | |
| | | var frameLayout = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(1920 - 720), |
| | | Height = Application.GetRealHeight(720), |
| | | BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor, |
| | | Y = Application.GetRealHeight(1920 - 680 - 50), |
| | | Height = Application.GetRealHeight(680), |
| | | BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor, |
| | | Width = Application.GetRealWidth(1000), |
| | | X = Application.GetRealWidth(40), |
| | | Radius = (uint)Application.GetRealHeight(40), |
| | | }; |
| | | flMain.AddChidren(frameLayout); |
| | | |
| | | var titlerow = new RowLayout |
| | | var titlerow = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | | Height = Application.GetRealHeight(150), |
| | | }; |
| | | frameLayout.AddChidren(titlerow); |
| | | |
| | | var titlebtn = new Button |
| | | { |
| | | //Text = "请选择多条件组合", |
| | | //TextID = MyInternationalizationString.Multicondition, |
| | | TextID = MyInternationalizationString.multicondition, |
| | | TextSize = 16, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | |
| | | |
| | | var androw = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | | Height = Application.GetRealHeight(160), |
| | | Y = titlerow.Bottom, |
| | | }; |
| | | frameLayout.AddChidren(androw); |
| | |
| | | TextID = MyInternationalizationString.Allconditions, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | //Text = "满足全部条件时", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | X = Application.GetRealHeight(50), |
| | | }; |
| | | androw.AddChidren(andbtn); |
| | | |
| | | var orrow = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | | Height = Application.GetRealHeight(160), |
| | | Y = androw.Bottom, |
| | | }; |
| | | frameLayout.AddChidren(orrow); |
| | |
| | | TextID = MyInternationalizationString.anycondition, |
| | | //Text = "满足任一条件时", |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | X = Application.GetRealHeight(50) |
| | | }; |
| | | orrow.AddChidren(orbtn); |
| | | |
| | |
| | | { |
| | | TextID = MyInternationalizationString.cancel, |
| | | TextSize = 16, |
| | | Y = orrow.Bottom, |
| | | Height = Application.GetRealHeight(180), |
| | | Y = orrow.Bottom + Application.GetRealHeight(30), |
| | | Height = Application.GetRealHeight(160), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor, |
| | | }; |
| | | frameLayout.AddChidren(cancelbtn); |
| | | cancelbtn.MouseUpEventHandler += (sender4, e4) => |