WJC
2019-12-13 9c6bd67d66859e48f0e794cd2746aef9310ce71d
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
old mode 100755 new mode 100644
@@ -32,14 +32,15 @@
            var titleName = new Button
            {
                TextSize = 16,
                TextSize = 17,
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                TextAlignment = TextAlignment.CenterLeft,
                X = Application.GetRealWidth(176),
                Width = Application.GetRealWidth(400),
                Width = Application.GetRealWidth(600),
                Height = Application.GetRealHeight(69),
                Y = Application.GetRealHeight(92),
                TextID = MyInternationalizationString.selection,
                IsBold = true,
            };
            topRowLayout.AddChidren(titleName);
            if (Common.Logic.CurrentLogic.LogicId != 0)
@@ -83,7 +84,7 @@
            #endregion
            var middle = new VerticalScrolViewLayout
            {
@@ -112,6 +113,7 @@
                TextID = MyInternationalizationString.automationname,
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                Y = Application.GetRealHeight(35),
                TextSize = 15,
            };
            logicnamefl.AddChidren(text);
@@ -123,7 +125,7 @@
                X = text.Right,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                TextSize = 13,
                TextSize = 14,
                Text = Common.Logic.CurrentLogic.LogicName,
                //TextID=MyInternationalizationString.automation1,
            };
@@ -166,7 +168,7 @@
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                Width = Application.GetRealWidth(300),
                Height = Application.GetRealHeight(60),
                TextSize = 16,
                TextSize = 15,
                Gravity = Gravity.CenterVertical,
            });
@@ -277,6 +279,7 @@
                        TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                        TextID = MyInternationalizationString.addconditions,
                        X = Application.GetRealWidth(390),
                        TextSize = 14,
                    };
                    addfl.AddChidren(addtextbtn);
@@ -343,6 +346,7 @@
                                    TextAlignment = TextAlignment.CenterLeft,
                                    Gravity = Gravity.CenterVertical,
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    TextSize = 14,
                                };
                                conditionsRowLayout.AddChidren(timevalue);
@@ -354,6 +358,7 @@
                                    Gravity = Gravity.CenterVertical,
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    X = conditionsRowLayout.Width - Application.GetRealWidth(400),
                                    TextSize = 14,
                                };
                                conditionsRowLayout.AddChidren(timeTxet);
@@ -454,6 +459,7 @@
                                    Text = conditions["StartHour"] + ":" + s1 + "-" + conditions["StopHour"] + ":" + s2,
                                    //TextColor = 0xff121212,
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    TextSize = 14,
                                };
                                conditionsRowLayout.AddChidren(timevalue);
                                var timeTxet = new Button
@@ -464,6 +470,7 @@
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    X = conditionsRowLayout.Width - Application.GetRealWidth(400),
                                    TextID = MyInternationalizationString.timeframe,
                                    TextSize = 14,
                                };
                                conditionsRowLayout.AddChidren(timeTxet);
@@ -501,6 +508,7 @@
                                    TextAlignment = TextAlignment.CenterLeft,
                                    Text = deviceinof.DeviceEpointName,
                                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                    TextSize = 14,
                                };
                                conditionsRowLayout.AddChidren(btndevice);
@@ -541,7 +549,7 @@
                                        UserView.HomePage.Instance.AddChidren(memberList);
                                        UserView.HomePage.Instance.PageIndex += 1;
                                        MemberList.edit = true;
                                        memberList.Show(deviceinof);
                                        memberList.Show(deviceinof, conditions);
                                    }
                                };
@@ -555,6 +563,7 @@
                                    TextAlignment = TextAlignment.CenterRight,
                                    X = Application.GetRealWidth(400),
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    TextSize = 14,
                                };
                                conditionsRowLayout.AddChidren(devicestatus);
@@ -609,14 +618,24 @@
                                                        {
                                                            int minute = int.Parse(conditions["IgnoreTime"]) / 60;
                                                            int second = int.Parse(conditions["IgnoreTime"]) % 60;
                                                            if (second != 0)
                                                            if (minute != 0 && second != 0)
                                                            {
                                                                devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
                                                                devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime);
                                                            }
                                                            else
                                                            {
                                                                devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.unattendedtime1);
                                                                if (minute == 0 && second != 0)
                                                                {
                                                                    devicestatus.Text = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime);
                                                                }
                                                                if (minute != 0 && second == 0)
                                                                {
                                                                    devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.closetime);
                                                                }
                                                            }
                                                        }
                                                    }
@@ -624,7 +643,6 @@
                                                case 21:
                                                case 22:
                                                    {
                                                        conditionIcon.UnSelectedImagePath = "ZigeeLogic/doormagnetism.png";
                                                        if (intvalue == "1")
                                                        {
                                                            devicestatus.TextID = MyInternationalizationString.logicopen;
@@ -636,14 +654,24 @@
                                                                int minute = int.Parse(conditions["IgnoreTime"]) / 60;
                                                                int second = int.Parse(conditions["IgnoreTime"]) % 60;
                                                                if (second != 0)
                                                                if (minute != 0 && second != 0)
                                                                {
                                                                    devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime);
                                                                }
                                                                else
                                                                {
                                                                    devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.closetime);
                                                                    if (minute == 0 && second != 0)
                                                                    {
                                                                        devicestatus.Text = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime);
                                                                    }
                                                                    if (minute != 0 && second == 0)
                                                                    {
                                                                        devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.closetime);
                                                                    }
                                                                }
                                                            }
@@ -656,7 +684,6 @@
                                                    break;
                                                case 40:
                                                    {
                                                        conditionIcon.UnSelectedImagePath = "ZigeeLogic/smoke.png";
                                                        if (intvalue == "1")
                                                        {
                                                            devicestatus.TextID = MyInternationalizationString.smokescreen;
@@ -666,7 +693,6 @@
                                                    break;
                                                case 42:
                                                    {
                                                        conditionIcon.UnSelectedImagePath = "ZigeeLogic/waterleakage.png";
                                                        if (intvalue == "1")
                                                        {
                                                            devicestatus.TextID = MyInternationalizationString.waterleakage;
@@ -679,7 +705,6 @@
                                                    break;
                                                case 43:
                                                    {
                                                        conditionIcon.UnSelectedImagePath = "ZigeeLogic/gas.png";
                                                        if (intvalue == "1")
                                                        {
                                                            devicestatus.TextID = MyInternationalizationString.gas;
@@ -689,7 +714,6 @@
                                                    break;
                                                case 277:
                                                    {
                                                        conditionIcon.UnSelectedImagePath = "ZigeeLogic/waterleakage.png";
                                                        if (intvalue == "1")
                                                        {
                                                            devicestatus.TextID = MyInternationalizationString.callthepolice;
@@ -699,7 +723,6 @@
                                                    break;
                                                default:
                                                    {
                                                        conditionIcon.UnSelectedImagePath = "ZigeeLogic/infraredsensor.png";
                                                        if (intvalue == "1")
                                                        {
                                                            devicestatus.TextID = MyInternationalizationString.callthepolice;
@@ -718,13 +741,14 @@
                                        break;
                                    case DeviceType.DoorLock:
                                        {
                                            conditionIcon.UnSelectedImagePath = "ZigeeLogic/doorlock.png";
                                            for (int a = 0; a < Common.Logic.CurrentLogic.Accounts.Count; a++)
                                            {
                                                if (Common.Logic.CurrentLogic.Accounts[a]["Type"] == "1")
                                                {
                                                    if (Common.Logic.CurrentLogic.Accounts[a]["UserId"] == conditions["AttriButeData2"])
                                                    {
                                                        devicestatus.Text = conditions["Account"];
                                                        devicestatus.Text = Common.Logic.CurrentLogic.Accounts[a]["Account"];
                                                        break;
                                                    }
@@ -734,22 +758,54 @@
                                        }
                                        break;
                                    case DeviceType.TemperatureSensor:
                                       // conditionIcon.UnSelectedImagePath = "ZigeeLogic/temperature.png";
                                        // conditionIcon.UnSelectedImagePath = "ZigeeLogic/temperature.png";
                                        var dev = deviceinof as TemperatureSensor;
                                        if (conditions["Cluster_ID"]=="1026") {
                                        if (conditions["Cluster_ID"] == "1026")
                                        {
                                            dev.SensorDiv = 1;
                                        } else {
                                        }
                                        else
                                        {
                                            dev.SensorDiv = 2;
                                        }
                                        string s = "";
                                        switch (conditions["Range"])
                                        {
                                            case "0":
                                                {
                                                    s = ">";
                                                }
                                                break;
                                            case "1":
                                                {
                                                    s = "=";
                                                }
                                                break;
                                            case "2":
                                                {
                                                    s = "<";
                                                }
                                                break;
                                            case "6":
                                                {
                                                    s = "≥";
                                                }
                                                break;
                                            case "7":
                                                {
                                                    s = "≤";
                                                }
                                                break;
                                        }
                                        if (conditions["Cluster_ID"] == "1026")
                                        {
                                            conditionIcon.UnSelectedImagePath = "ZigeeLogic/temperature.png";
                                            devicestatus.Text = ">" + conditions["AttriButeData1"] + "℃";
                                            devicestatus.Text = s + conditions["AttriButeData1"] + "℃";
                                        }
                                        else
                                        {
                                            conditionIcon.UnSelectedImagePath = "ZigeeLogic/humidity.png";
                                            devicestatus.Text = "<" + conditions["AttriButeData1"] + "%";
                                            devicestatus.Text = s + conditions["AttriButeData1"] + "%";
                                        }
                                        break;
@@ -772,6 +828,7 @@
                                    Gravity = Gravity.CenterVertical,
                                    Text = logicinof.LogicName,
                                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                    TextSize = 14,
                                    //TextColor = 0xff121212,
                                };
                                conditionsRowLayout.AddChidren(btnlogic);
@@ -802,6 +859,7 @@
                                    TextAlignment = TextAlignment.CenterRight,
                                    X = Application.GetRealWidth(500),
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    TextSize = 14,
                                };
                                conditionsRowLayout.AddChidren(logicstatus);
@@ -826,6 +884,7 @@
                                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                    //TextColor = 0xff121212,
                                    TextID = MyInternationalizationString.security,
                                    TextSize = 14,
                                };
                                //conditionsRowLayout.AddChidren(btnsecurity);
@@ -858,6 +917,7 @@
                                    Gravity = Gravity.CenterVertical,
                                    TextAlignment = TextAlignment.CenterLeft,
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    TextSize = 14,
                                };
                                conditionsRowLayout.AddChidren(securitystatus);
@@ -885,15 +945,16 @@
                            break;
                        case 7:
                            {
                                conditionIcon.UnSelectedImagePath = "ZigeeLogic/position.png";
                                var btnlocation = new Button
                                {
                                    Width = Application.GetRealWidth(700),
                                    TextAlignment = TextAlignment.CenterLeft,
                                    Gravity = Gravity.CenterVertical,
                                    //Text = "地理位置",
                                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                    //TextColor = 0xff121212,
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    TextID = MyInternationalizationString.geographicalposition,
                                    TextSize = 14,
                                };
                                conditionsRowLayout.AddChidren(btnlocation);
@@ -921,6 +982,7 @@
                                    TextAlignment = TextAlignment.CenterRight,
                                    X = Application.GetRealWidth(500),
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    TextSize = 14,
                                };
                                conditionsRowLayout.AddChidren(locationstatus);
                                foreach (var radius in Common.Logic.CurrentLogic.Accounts)
@@ -1004,7 +1066,7 @@
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                Width = Application.GetRealWidth(300),
                Height = Application.GetRealHeight(60),
                TextSize = 16,
                TextSize = 15,
                Gravity = Gravity.CenterVertical,
            };
            targetRowLayout.AddChidren(btntargettitle);
@@ -1074,6 +1136,7 @@
                        TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                        TextID = MyInternationalizationString.addfunction,
                        X = Application.GetRealWidth(390),
                        TextSize = 14,
                    };
                    addfl.AddChidren(addtextbtn);
                    EventHandler<MouseEventArgs> addfunctionclick = (sender, e) =>
@@ -1140,10 +1203,11 @@
                                {
                                    Y = Application.GetRealHeight(20),
                                    Height = Application.GetRealHeight(50),
                                    Width = Application.GetRealWidth(450),
                                    Width = Application.GetRealWidth(400),
                                    TextAlignment = TextAlignment.CenterLeft,
                                    Text = deviceinof.DeviceEpointName,
                                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                    TextSize = 14,
                                };
                                actionsrowLayout.AddChidren(btndevicename);
@@ -1151,7 +1215,7 @@
                                var btnregionname = new Button
                                {
                                    Y = btndevicename.Bottom + Application.GetRealHeight(10),
                                    Width = Application.GetRealWidth(450),
                                    Width = Application.GetRealWidth(400),
                                    TextAlignment = TextAlignment.CenterLeft,
                                    Height = Application.GetRealHeight(50),
                                    Text = "",//Language.StringByID(MyInternationalizationString.customroom),
@@ -1163,12 +1227,13 @@
                                ///显示设备条件状态控件
                                var devicestatus = new Button
                                {
                                    Width = Application.GetRealWidth(350),
                                    Width = Application.GetRealWidth(400),
                                    Height = Application.GetRealHeight(130),
                                    Gravity = Gravity.CenterVertical,
                                    TextAlignment = TextAlignment.CenterRight,
                                    X = Application.GetRealWidth(450),
                                    X = Application.GetRealWidth(400),
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    TextSize = 14,
                                };
                                actionsrowLayout.AddChidren(devicestatus);
@@ -1184,13 +1249,6 @@
                                ///编辑点击事件
                                deviceedit.MouseUpEventHandler += (sender, e) =>
                                {
                                    //var deviceStatePage = new DeviceStatePage();
                                    //UserView.HomePage.Instance.AddChidren(deviceStatePage);
                                    //UserView.HomePage.Instance.PageIndex += 1;
                                    //deviceStatePage.IsDeviceEditor = true;
                                    //deviceStatePage.Show(deviceinof);
                                    //ActionModifyDeviceStateView(deviceinof);
                                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                                    this.AddChidren(flMain);
                                    LogicDevicePage.CurrentDeviceStateView(flMain, deviceinof, true);
@@ -1339,26 +1397,23 @@
                                            {
                                                continue;
                                            }
                                            string modetext = "", temperaturetext="", speedtext = "";
                                            string modetext = "", temperaturetext = "", speedtext = "";
                                            bool ifclose = false;
                                            foreach (var status in TaskList)
                                            {
                                                if (status["TaskType"].ToString() == "1")
                                                if (TaskList.Count == 1)
                                                {
                                                    if (status["Data1"].ToString() == "0")
                                                    {
                                                       // devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
                                                        ifclose = false;
                                                    }
                                                    else if (status["Data1"].ToString() == "1")
                                                    {
                                                        //devicestatus.Text = Language.StringByID(MyInternationalizationString.open);
                                                        ifclose = true;
                                                    }
                                                    //数组只有一个元素说明当前空调状态为关;
                                                    ifclose = false;
                                                    //如果空调状态是关;直接跳出for循坏;
                                                    break;
                                                }
                                                else if (status["TaskType"].ToString() == "5")
                                                else
                                                {
                                                    ifclose = true;
                                                }
                                                if (status["TaskType"].ToString() == "5")
                                                {
                                                    if (status["Data1"] == "3")
                                                    {//3---设置工作模式(1:自动;3:制冷;4:制热;7:送风;8:除湿)
@@ -1417,7 +1472,7 @@
                                                    //4---设置加热度数;5---设置制冷、除湿度数;7---设置自动度数
                                                    else if (status["Data1"] == "4" || status["Data1"] == "5" || status["Data1"] == "7")
                                                    {
                                                        var s = int.Parse(status["Data2"]) /100;
                                                        var s = int.Parse(status["Data2"]) / 100;
                                                        temperaturetext = s.ToString();
                                                    }
                                                    else if (status["Data1"] == "20")
@@ -1465,6 +1520,7 @@
                                    TextAlignment = TextAlignment.CenterLeft,
                                    Text = sceneinof.Name,
                                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                    TextSize = 14,
                                };
                                actionsrowLayout.AddChidren(btndevicename);
@@ -1503,6 +1559,7 @@
                                    Gravity = Gravity.CenterVertical,
                                    Text = logicinof.LogicName,
                                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                    TextSize = 14,
                                    //TextColor = 0xff121212,
                                };
                                actionsrowLayout.AddChidren(btnlogic);
@@ -1534,6 +1591,7 @@
                                    X = Application.GetRealWidth(1080 - 330),
                                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                    TextAlignment = TextAlignment.CenterRight,
                                    TextSize = 14,
                                };
                                actionsrowLayout.AddChidren(logicstatus);
@@ -1557,6 +1615,7 @@
                                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                    //TextColor = 0xff121212,
                                    TextID = MyInternationalizationString.security,
                                    TextSize = 14,
                                };
                                //actionsrowLayout.AddChidren(btnsecurity);
@@ -1585,6 +1644,7 @@
                                    Gravity = Gravity.CenterVertical,
                                    TextAlignment = TextAlignment.CenterLeft,
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    TextSize = 14,
                                };
                                actionsrowLayout.AddChidren(securitystatus);
@@ -1632,6 +1692,7 @@
                                    Width = Application.GetRealWidth(500),
                                    TextAlignment = TextAlignment.CenterLeft,
                                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                                    TextSize = 14,
                                };
                                actionsrowLayout.AddChidren(delaytimeBtn);
                                if (Minutes != 0)
@@ -1739,6 +1800,7 @@
                Width = Application.GetRealWidth(300),
                Height = Application.GetRealHeight(60),
                Gravity = Gravity.CenterVertical,
                TextSize = 14,
            };
            weekRowLayout.AddChidren(settxet);
            var btnweektext = new Button
@@ -1751,6 +1813,7 @@
                TextID = MyInternationalizationString.everyday,
                Y = Application.GetRealHeight(35),
                X = settxet.Right,
                TextSize = 14,
            };
            weekRowLayout.AddChidren(btnweektext);
@@ -1811,6 +1874,7 @@
                Height = Application.GetRealHeight(60),
                Gravity = Gravity.CenterVertical,
                TextID = MyInternationalizationString.pushswitch,
                TextSize = 14,
            };
            pushswitchRowlayout.AddChidren(btnswitchtxet);
@@ -1863,6 +1927,7 @@
                Width = Application.GetRealWidth(300),
                Height = Application.GetRealHeight(60),
                Gravity = Gravity.CenterVertical,
                TextSize = 14,
            };
            custompushRowLayout.AddChidren(btncustompush);
@@ -1908,15 +1973,12 @@
                BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
                TextID = MyInternationalizationString.Save,
                TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
                TextSize=16,
            };
            saveFrameLayout.AddChidren(btnsave);
            btnsave.MouseUpEventHandler += async (sender, e) =>
            {
                var name = logicTextBox.Text.Trim();
                //if (Common.Logic.CurrentLogic.Conditions.Count != 0 && Common.Logic.CurrentLogic.Actions.Count != 0)
                //{
                //    AddChidren(btnsave);
                //}
                if (string.IsNullOrEmpty(logicTextBox.Text.Trim()))
                {
                    new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.PleaseEnterLogicName), Language.StringByID(MyInternationalizationString.Close)).Show();
@@ -1930,7 +1992,7 @@
                }
                Common.Logic.CurrentLogic.LogicName = name;
                bool succeed = false;
                //判断是新添加逻辑(默认0)还是修改逻辑
                CommonPage.Loading.Start();
                if (Common.Logic.CurrentLogic.LogicId == 0)
@@ -1939,6 +2001,7 @@
                    var logicifon = await Send.AddModifyLogic(Common.Logic.CurrentLogic);
                    if (logicifon != null && logicifon.LogicId != 0)
                    {
                        succeed = true;
                        Common.Logic.CurrentLogic.LogicId = logicifon.LogicId;
                        Common.Logic.LogicList.Add(Common.Logic.CurrentLogic);
                    }
@@ -1946,17 +2009,21 @@
                else
                {
                    //发送修改逻辑命令
                    Send.AddModifyLogic(Common.Logic.CurrentLogic);
                   var modlogic=Send.AddModifyLogic(Common.Logic.CurrentLogic);
                    //编辑默认成功(不考虑网络情况);
                    succeed = true;
                }
                CommonPage.Loading.Hide();
                if (!succeed) {
                    //网关回复失败,不关闭界面,让它停留当前界面;
                    //(原因:考虑到失败重新编辑原来数据给用户带来了麻烦)
                    ///提示:添加自动化失败;
                    return;
                }
                UserView.HomePage.Instance.RemoveViewByTag("Logic");
                Category.Category.instance?.RefreshBodyView();
                //UserView.HomePage.Instance.RemoveAt("Logic1");
                //Category.Category category = new Category.Category();
                //UserView.HomePage.Instance.AddChidren(category);
                //UserView.HomePage.Instance.PageIndex += 1;
                //category.Show(2);
            };
@@ -2232,14 +2299,7 @@
                flMain.RemoveFromParent();
            };
            var timetypeframelayout1 = new FrameLayout
            {
                Width = Application.GetRealWidth(1080),
                Height = Application.GetRealHeight(100),
                Y = Application.GetRealHeight(1920 - 100),
                BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
            };
            flMain.AddChidren(timetypeframelayout1);
            var framelayout = new FrameLayout
            {
                Width = Application.GetRealWidth(1080),
@@ -2249,6 +2309,7 @@
                Radius = (uint)Application.GetRealHeight(60),
            };
            flMain.AddChidren(framelayout);
            framelayout.SetCornerWithSameRadius(Application.GetRealHeight(58),HDLUtils.RectCornerTopLeft|HDLUtils.RectCornerTopRight);
            #region  -------取消   完成
            var timetype = new RowLayout
@@ -2265,6 +2326,7 @@
                Width = Application.GetRealWidth(200),
                X = Application.GetRealWidth(80),
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 14,
            };
            timetype.AddChidren(Btncancel);
            Btncancel.MouseUpEventHandler += (sender16, e16) =>
@@ -2292,6 +2354,7 @@
                Width = Application.GetRealWidth(200),
                TextAlignment = TextAlignment.CenterRight,
                X = Btntitle.Right + Application.GetRealWidth(100),
                TextSize = 14,
            };
            timetype.AddChidren(Btncomplete);
@@ -2327,6 +2390,7 @@
                TextID = MyInternationalizationString.Allconditions,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
                TextSize = 14,
            };
            androw.AddChidren(andbtn);
@@ -2362,6 +2426,7 @@
                TextID = MyInternationalizationString.anycondition,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
                TextSize = 14,
            };
            orrow.AddChidren(orbtn);