gxc
2020-02-28 66a9965c44ecc32a6696abca876ab9d1cd091584
ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -284,14 +284,6 @@
                                                    ac.currentSystemMode = attList.AttriButeData;
                                                    ac.LastDateTime = DateTime.Now;
                                                    break;
                                                case 4099:
                                                    var value = Convert.ToString(attList.AttriButeData, 2).PadLeft(16, '0');
                                                    var modeStr = value.Substring(value.Length - 5, 5);
                                                    for (int j = 0; j < modeStr.Length; j++)
                                                    {
                                                        ac.listSupportMode[j] = Convert.ToInt32(modeStr[j]) == 49 ? 1 : 0;
                                                    }
                                                    break;
                                                case 4097:
                                                    //过虑网清洗标志:42
                                                    ac.CleanStatu = attList.AttriButeData == 42;
@@ -885,7 +877,7 @@
            typeIdDic.Clear();
            foreach (var device in devList)
            {
                var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device.CommonDevice });
                var info = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device.CommonDevice);
                if (info.BeloneType == DeviceBeloneType.A干接点 || info.BeloneType == DeviceBeloneType.A中继器)
                {
                    continue;
@@ -1093,10 +1085,10 @@
                                        }
                                    })
                                    { IsBackground = true }.Start();
                                    var deviceRow = new CategoryFunctionRow(0, 35);
                                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                    deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                                    deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                    deviceRow.IsSelected = light.OnOffStatus == 1;
                                    deviceTypeRowLayout.AddChidren(deviceRow);
@@ -1194,7 +1186,7 @@
                                    var deviceRow = new CategoryFunctionRow(0, 35);
                                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                    deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                                    deviceRow.IsSelected = airSwitch.OnOffStatus == 1;
                                    deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                    deviceTypeRowLayout.AddChidren(deviceRow);
@@ -1295,7 +1287,7 @@
                                    var deviceRow = new CategoryFunctionRow(0, 35);
                                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                    deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                                    deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                    deviceRow.IsSelected = dimmableLight.OnOffStatus == 1;
                                    deviceTypeRowLayout.AddChidren(deviceRow);
@@ -1398,7 +1390,7 @@
                                    var deviceRow = new CategoryFunctionRow(0, 35);
                                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                    deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                                    deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                    deviceRow.IsSelected = ac.currentSystemMode != 1;
                                    deviceTypeRowLayout.AddChidren(deviceRow);
@@ -1501,7 +1493,7 @@
                                    var deviceRow = new CategoryFunctionForWinRow(0, 35);
                                    deviceRow.Init(deviceUI);
                                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                    deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                                    deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                    deviceRow.IsSelected = rollerShade.WcdCurrentPositionLiftPercentage != 0;
                                    deviceRow.SetRollerShadeIcon(rollerShade.WcdType);
@@ -1563,7 +1555,7 @@
                            {
                                var deviceRow = new CategoryFunctionRow(0, 35);
                                deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                                deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                deviceRow.HideSwitchBtn(true);
                                deviceTypeRowLayout.AddChidren(deviceRow);
@@ -1600,7 +1592,7 @@
                            {
                                var deviceRow = new CategoryFunctionRow(0, 35);
                                deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                                deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                deviceRow.IsSelected = (deviceUI.CommonDevice as IASZone).iASInfo?.Alarm1 == 1;
                                deviceRow.HideSwitchBtn(true);
@@ -1668,7 +1660,7 @@
                                    var deviceRow = new CategoryFunctionRow(0, 35);
                                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                    deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                                    deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                    deviceRow.IsSelected = false;
                                    deviceRow.HideSwitchBtn(true);
@@ -1700,7 +1692,7 @@
                            {
                                var deviceRow = new CategoryFunctionRow(0, 35);
                                deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                                deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                deviceRow.HideSwitchBtn(true);
                                deviceTypeRowLayout.AddChidren(deviceRow);
@@ -1785,7 +1777,7 @@
            if (Common.Room.CurrentRoom.IsLove)
            {
                deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                if (Common.Room.CurrentRoom.IsCollectInRoom(deviceUI.FileName) == false)
                {
                    devListScrolView.RemoveViewByTag(deviceUI);
@@ -1811,7 +1803,7 @@
                else
                {
                    deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                    deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                }
            }
        }
@@ -1828,7 +1820,7 @@
            if (Common.Room.CurrentRoom.IsLove)
            {
                deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                if (Common.Room.CurrentRoom.IsCollectInRoom(deviceUI.FileName) == false)
                {
                    devListScrolView.RemoveViewByTag(deviceUI);
@@ -1854,7 +1846,7 @@
                else
                {
                    deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                    deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                }
            }
        }
@@ -2206,7 +2198,8 @@
                            Common.Logic.CurrentLogic.IsEnable = 1;//默认为开
                            if (logiciocnBtn.Tag.ToString() == "3")
                            {
                                Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text;// Language.StringByID(MyInternationalizationString.automation1);
                                Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text;
                                Common.Logic.CurrentLogic.LogicCustomPushText = Common.Logic.CurrentLogic.LogicName + Language.StringByID(MyInternationalizationString.defaulttext);
                                var addLogicPage = new Logic.AddLogicPage();
                                HomePage.Instance.AddChidren(addLogicPage);
                                HomePage.Instance.PageIndex += 1;
@@ -2216,6 +2209,7 @@
                            {
                                Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text;
                                Common.Logic.CurrentLogic.LogicCustomPushText = Common.Logic.CurrentLogic.LogicName + Language.StringByID(MyInternationalizationString.defaulttext);
                                Logic.TemplatePage templatePage = new Logic.TemplatePage();
                                Logic.TemplatePage.s = logiciocnBtn.Tag.ToString();
                                HomePage.Instance.AddChidren(templatePage);
@@ -2870,4 +2864,4 @@
    }
}
}