黄学彪
2019-10-10 2ed75b8b337048e5d75e6d9ec8307633134f02fd
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -47,7 +47,7 @@
                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);
            }
@@ -65,6 +65,7 @@
                UnSelectedImagePath = "ZigeeLogic/Back.png",
            };
            topFrameLayout.AddChidren(back);
            back.MouseDownEventHandler += (sender, e) =>
            {
                //if (Common.Logic.CurrentLogic.LogicId != 0)
@@ -469,7 +470,7 @@
                                    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);
@@ -588,6 +589,15 @@
                                                    }
                                                    break;
                                                default:
                                                    {
                                                        if (intvalue == "1")
                                                        {
                                                            devicestatus.TextID = MyInternationalizationString.callthepolice;
                                                        }
                                                    }
                                                    break;
                                             }
                                        }
                                        break;
@@ -1055,7 +1065,7 @@
                                    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);
@@ -1087,7 +1097,6 @@
                                switch (deviceinof.Type)
                                {
                                    case DeviceType.OnOffOutput:
                                        {
                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
@@ -1108,6 +1117,38 @@
                                                        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);
                                                    }
                                                }
                                            }
@@ -1240,7 +1281,7 @@
                                    Gravity = Gravity.CenterVertical,
                                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                    //TextColor = 0xff121212,
                                    TextID = MyInternationalizationString.securitymode,
                                    TextID = MyInternationalizationString.security,
                                };
                                actionsrowLayout.AddChidren(btnsecurity);
@@ -1337,7 +1378,7 @@
            #endregion
            #region  ----推送设置----
            /*
            var pushRowLayout = new RowLayout
            {
                Height = Application.GetRealHeight(150),
@@ -1442,6 +1483,7 @@
            btncustompush.MouseUpEventHandler += customclick;
            custompushback.MouseUpEventHandler += customclick;
            custompushRowLayout.MouseUpEventHandler += customclick;
            */
            #endregion
         
@@ -1800,21 +1842,25 @@
                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,
                };
@@ -1822,7 +1868,7 @@
                var androw = new RowLayout
                {
                    Height = Application.GetRealHeight(180),
                    Height = Application.GetRealHeight(160),
                    Y = titlerow.Bottom,
                };
                frameLayout.AddChidren(androw);
@@ -1832,12 +1878,14 @@
                    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);
@@ -1847,6 +1895,8 @@
                    TextID = MyInternationalizationString.anycondition,
                    //Text = "满足任一条件时",
                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                    TextAlignment = TextAlignment.CenterLeft,
                    X = Application.GetRealHeight(50)
                };
                orrow.AddChidren(orbtn);
@@ -1854,9 +1904,10 @@
                {
                    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) =>