| | |
| | | refresview.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | } |
| | | } |
| | | |
| | | int i = 1;//局部变量,默认是第一条逻辑; |
| | | foreach (var logic in Common.Logic.LogicList) |
| | | { |
| | | |
| | | |
| | | var fLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(190 + 30), |
| | |
| | | BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor, |
| | | }; |
| | | refresview.AddChidren(fLayout); |
| | | |
| | | |
| | | var logicRowlayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(190 + 30), |
| | |
| | | |
| | | }; |
| | | fLayout.AddChidren(logicRowlayout); |
| | | |
| | | if (i == 1) |
| | | { |
| | | //实现android显示逻辑列表的圆角; |
| | | fLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft); |
| | | logicRowlayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft); |
| | | i = 2; |
| | | } |
| | | |
| | | var logicnameBtn = new Button |
| | | { |
| | | Height = Application.GetRealHeight(58), |
| | |
| | | |
| | | var logicswitchBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(104), |
| | | Height = Application.GetRealHeight(63), |
| | | Width = Application.GetMinRealAverage(104), |
| | | Height = Application.GetMinRealAverage(63), |
| | | UnSelectedImagePath = "ZigeeLogic/logicclose.png", |
| | | SelectedImagePath = "ZigeeLogic/logicopen.png", |
| | | X = logicRowlayout.Width - Application.GetRealWidth(104 + 58), |
| | |
| | | logic.IsEnable = 0; |
| | | StatusColor(logic, logicRowlayout, 0); |
| | | } |
| | | Device.Logic.Send.LogicControlSwitch(logic); |
| | | Send.LogicControlSwitch(logic); |
| | | //Logic.Send.AddModifyLogic(logic); |
| | | }; |
| | | if (logic.IsEnable == 1) |
| | |
| | | logicRowlayout.AddChidren(logictimeBtn); |
| | | |
| | | ///显示执行周期 |
| | | Device.Logic.Method.UpdateWeek(logictimeBtn, logic); |
| | | Method.UpdateWeek(logictimeBtn, logic); |
| | | |
| | | |
| | | List<string> indexlist = new List<string>(); |
| | |
| | | Height = Application.GetMinRealAverage(82), |
| | | X = Application.GetRealWidth(58) + Application.GetRealWidth(12 + (12 + 82 + 45 + 12) * i), |
| | | Y = Application.GetRealHeight(58 + 30 + 30), |
| | | Radius = (uint)Application.GetRealHeight(41), |
| | | Radius = (uint)Application.GetMinRealAverage(41), |
| | | BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, |
| | | }; |
| | | logicRowlayout.AddChidren(typebjBtn); |