gxc
2019-11-15 05ce435c3b58e53eeab04c672affdeeab75f3036
ZigbeeApp/Shared/Phone/Device/Category/Category.cs
old mode 100755 new mode 100644
@@ -6,6 +6,7 @@
using ZigBee.Device;
using Shared.Phone.Device.CommonForm;
using Shared.Phone.Device.AC;
using Shared.Phone.UserCenter.DoorLock;
namespace Shared.Phone.Device.Category
{
@@ -383,12 +384,14 @@
                                    row.SetStatu(deviceUI.CommonDevice.IsOnline == 1);
                                    deviceUI.CommonDevice.LastDateTime = DateTime.Now;
                                    break;
                                case DeviceType.AirSwitch:
                                    deviceUI.CommonDevice.IsOnline = common.IsOnline;
                                    var row1 = rowLayout.GetChildren(0) as CategoryFunctionRow;
                                    row1.SetStatu(deviceUI.CommonDevice.IsOnline == 1);
                                    deviceUI.CommonDevice.LastDateTime = DateTime.Now;
                                    break;
                                case DeviceType.WindowCoveringDevice:
                                    deviceUI.CommonDevice.LastDateTime = DateTime.Now;
                                    deviceUI.CommonDevice.IsOnline = common.IsOnline;
@@ -402,6 +405,7 @@
                                    var row3 = rowLayout.GetChildren(0) as CategoryFunctionRow;
                                    row3.SetStatu(deviceUI.CommonDevice.IsOnline == 1);
                                    break;
                                case DeviceType.Thermostat:
                                    deviceUI.CommonDevice.LastDateTime = DateTime.Now;
                                    deviceUI.CommonDevice.IsOnline = common.IsOnline;
@@ -1070,6 +1074,7 @@
                            deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                            {
                                var lightControl = new Phone.Device.Light.AirSwitchControl();
                                UserView.HomePage.Instance.AddChidren(lightControl);
                                UserView.HomePage.Instance.PageIndex += 1;
@@ -1337,7 +1342,6 @@
                                }
                            }
                            var deviceTypeRowLayout = new RowLayout()
                            {
                                Height = Application.GetRealHeight(129 + 35),
@@ -1400,7 +1404,44 @@
                        }
                        else
                        {
                            var deviceTypeRowLayout = new RowLayout()
                            {
                                Height = Application.GetRealHeight(129 + 35),
                                LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                                Tag = deviceUI
                            };
                            deviceListScrolView.AddChidren(deviceTypeRowLayout);
                            var deviceRow = new CategoryFunctionRow(0, 35);
                            deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                            deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                            deviceRow.SetOnLineStatu(deviceUI.CommonDevice.IsOnline == 1);
                            deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                            deviceRow.HideSwitchBtn(true);
                            deviceTypeRowLayout.AddChidren(deviceRow);
                            deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                            {
                                var userDoorLockPage = new UserDoorLockPage(room, deviceUI);
                                HomePage.Instance.AddChidren(userDoorLockPage);
                                HomePage.Instance.PageIndex += 1;
                                userDoorLockPage.Show();
                            };
                            var editBtn = new CommonForm.RowLayoutEditButton()
                            {
                                Tag = deviceUI
                            };
                            deviceTypeRowLayout.AddRightView(editBtn);
                            editBtn.MouseUpEventHandler += deviceDetailHandler;
                            var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                            {
                                Tag = deviceUI
                            };
                            deviceTypeRowLayout.AddRightView(delBtn);
                            delBtn.MouseUpEventHandler += delEvent;
                        }
                    }
                };
@@ -1494,7 +1535,7 @@
                    {
                        RefreshFunction(room);
                    }
                }
                roomBtn.MouseUpEventHandler += (sender, e) =>
                {
@@ -1515,7 +1556,7 @@
                    }
                };
            }
        }
        #endregion
@@ -1571,7 +1612,6 @@
                        X = Application.GetRealWidth(179),
                        Width = Application.GetRealWidth(844),
                        Height = Application.GetRealHeight(400),
                        BackgroundColor = ZigbeeColor.Current.GXCRedColor,
                        UnSelectedImagePath = scene.IconPath,
                        Radius = (uint)Application.GetRealHeight(17)
                    };
@@ -1600,7 +1640,7 @@
                        Tag = scene
                    };
                    leftFL.AddChidren(collectionBtn);
                    var sceneNameBtn = new Button()
                    {
                        Width = Application.GetRealWidth(176),
@@ -1762,7 +1802,7 @@
                                }
                            };
                        }
                    };
                    deleteBtn.MouseUpEventHandler += delEvent;
                    //编辑场景
@@ -1818,6 +1858,7 @@
        #endregion
        #region ◆ 自动化__________________________
        /// <summary>
@@ -1827,6 +1868,7 @@
        {
            functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
            var bjFrameLayout = new FrameLayout
            {
                Width = Application.GetRealWidth(1080 - 58),
@@ -1988,7 +2030,7 @@
                var Idlist = await Logic.Send.GetLogicId(0);
                if (Idlist.Count != 0)
                {
                    var listlogic = await Logic.Send.ReadList(Idlist.Count,0);
                    var listlogic = await Logic.Send.ReadList(Idlist.Count, 0);
                    //foreach可能集合已被修改,枚举操作可能不会执行,可能出现崩溃(建议for)。
                    for (int j = 0; j < listlogic.Count; j++)
                    {
@@ -2004,7 +2046,7 @@
            //自动化
            Automationview(logicScrolView);
            CommonPage.Loading.Hide();
        }
        /// <summary>
@@ -2612,6 +2654,6 @@
        #endregion
    }
}