黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs
@@ -208,7 +208,7 @@
                    if (data.Type == 0)
                    {
                        //只要设备
                        string mainkey = LocalDevice.Current.GetDeviceMainKeys(data.DeviceAddr, data.Epoint);
                        string mainkey = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(data.DeviceAddr, data.Epoint);
                        dicOldListTask[mainkey] = data.TaskList;
                    }
                }
@@ -221,7 +221,7 @@
            {
                foreach (var mainkey in room.ListDevice)
                {
                    var device = LocalDevice.Current.GetDevice(mainkey);
                    var device = HdlDeviceCommonLogic.Current.GetDevice(mainkey);
                    if (this.CheckDeviceCanShow(device) == true)
                    {
                        //这个设备本地存在,并且它还没有加入到执行目标列表,则这个房间可以显示
@@ -251,14 +251,14 @@
            {
                //设备菜单的白色背景
                var functionBack1 = new FrameLayout();
                functionBack1.X = ControlCommonResourse.XXLeft;
                functionBack1.X = HdlControlResourse.XXLeft;
                functionBack1.Height = Application.GetRealHeight(160);
                functionBack1.Width = Application.GetRealWidth(1028);
                functionBack1.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
                functionBodyView.AddChidren(functionBack1);
                functionBack1.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft);
                var functionBack2 = new FrameLayout();
                functionBack2.X = ControlCommonResourse.XXLeft;
                functionBack2.X = HdlControlResourse.XXLeft;
                functionBack2.Y = functionBack1.Bottom - Application.GetRealHeight(50);
                functionBack2.Height = Application.GetRealHeight(279 - 160 + 50);
                functionBack2.Width = Application.GetRealWidth(1028);
@@ -268,14 +268,14 @@
                //设备菜单的左右滑动的控件
                this.deviceFunctionMenuContr = new HorizontalScrolViewLayout();
                deviceFunctionMenuContr.X = ControlCommonResourse.XXLeft;
                deviceFunctionMenuContr.X = HdlControlResourse.XXLeft;
                deviceFunctionMenuContr.Height = Application.GetRealHeight(279);
                deviceFunctionMenuContr.Width = Application.GetRealWidth(1028);
                functionBodyView.AddChidren(deviceFunctionMenuContr);
                //设备的背景容器
                var frameDeviceBack = new FrameLayout();
                frameDeviceBack.X = ControlCommonResourse.XXLeft;
                frameDeviceBack.X = HdlControlResourse.XXLeft;
                frameDeviceBack.Y = deviceFunctionMenuContr.Bottom + Application.GetRealHeight(35);
                frameDeviceBack.BackgroundColor = UserCenterColor.Current.White;
                frameDeviceBack.Width = bodyFrameLayout.Width;
@@ -360,7 +360,7 @@
            var listDevice = new List<CommonDevice>();
            for (int i = 0; i < rowInfo.listDeviceKeys.Count; i++)
            {
                var device = LocalDevice.Current.GetDevice(rowInfo.listDeviceKeys[i]);
                var device = HdlDeviceCommonLogic.Current.GetDevice(rowInfo.listDeviceKeys[i]);
                if (device != null)
                {
                    listDevice.Add(device);
@@ -391,10 +391,10 @@
        /// <param name="device"></param>
        private void AddDeviceRow(VerticalListControl listView, CommonDevice device)
        {
            string mainkey = LocalDevice.Current.GetDeviceMainKeys(device);
            string mainkey = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
            //设备控件
            var rowDevice = new FrameRowControl(listView.rowSpace / 2);
            rowDevice.RightOffset = ControlCommonResourse.XXLeft - Application.GetRealWidth(109);
            rowDevice.RightOffset = HdlControlResourse.XXLeft - Application.GetRealWidth(109);
            listView.AddChidren(rowDevice);
            //设备图标背景控件
@@ -411,7 +411,7 @@
            //设备图标控件
            var btnDeviceIcon = new IconViewControl(78);
            btnDeviceIcon.Gravity = Gravity.Center;
            Common.LocalDevice.Current.SetDeviceIconToControl(btnDeviceIcon, device);
            HdlDeviceCommonLogic.Current.SetDeviceIconToControl(btnDeviceIcon, device);
            frameIconBackGroud.AddChidren(btnDeviceIcon);
            //重新绑定事件
            rowDevice.ChangedChidrenBindMode(frameIconBackGroud, ChidrenBindMode.BindEvent);
@@ -420,13 +420,13 @@
            var btnDeviceName = new NormalViewControl(600, 60, true);
            btnDeviceName.X = Application.GetRealWidth(181);
            btnDeviceName.Gravity = Gravity.CenterVertical;
            btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device);
            btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
            rowDevice.AddChidren(btnDeviceName, ChidrenBindMode.BindEvent);
            btnDeviceName.Y += rowDevice.chidrenYaxis;
            //底线
            var btnBottomLine = new NormalViewControl(Application.GetRealWidth(841), ControlCommonResourse.BottomLineHeight, false);
            var btnBottomLine = new NormalViewControl(Application.GetRealWidth(841), HdlControlResourse.BottomLineHeight, false);
            btnBottomLine.X = Application.GetRealWidth(181);
            btnBottomLine.Y = rowDevice.Height - ControlCommonResourse.BottomLineHeight;
            btnBottomLine.Y = rowDevice.Height - HdlControlResourse.BottomLineHeight;
            btnBottomLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
            rowDevice.AddChidren(btnBottomLine, ChidrenBindMode.NotBind);
            //右箭头
@@ -456,7 +456,7 @@
        /// <param name="btnStatu"></param>
        private void ShowDeviceDetailSettion(CommonDevice device, NormalViewControl btnStatu)
        {
            string mainKeys = LocalDevice.Current.GetDeviceMainKeys(device);
            string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
            List<Safeguard.TaskListInfo> listTaskinfo = null;
            if (dicNewListTask.ContainsKey(mainKeys) == true)
@@ -524,7 +524,7 @@
        /// <param name="listInfo"></param>
        private void AddSettionDataToMemory(CommonDevice device, List<Safeguard.TaskListInfo> listInfo)
        {
            string mainKeys = LocalDevice.Current.GetDeviceMainKeys(device);
            string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
            if (listInfo == null || listInfo.Count == 0)
            {
                //指定为无动作模式
@@ -571,11 +571,11 @@
            }
            //根据设备所属类型排序
            listDevice = LocalDevice.Current.SortDeviceByBelongType(listDevice);
            listDevice = HdlDeviceCommonLogic.Current.SortDeviceByBelongType(listDevice);
            var dic = new Dictionary<string, DeviceRowInfo>();
            foreach (var device in listDevice)
            {
                var typeInfo = LocalDevice.Current.GetDeviceBelongEnumInfo(device);
                var typeInfo = HdlDeviceCommonLogic.Current.GetDeviceBelongEnumInfo(device);
                //按所属ID分组
                if (dic.ContainsKey(typeInfo.BeloneText) == false)
                {
@@ -583,12 +583,12 @@
                    string path1 = string.Empty;
                    string path2 = string.Empty;
                    //获取图片
                    LocalDevice.Current.GetDeviceFunctionTypeMenuIcon(typeInfo, ref path1, ref path2);
                    HdlDeviceCommonLogic.Current.GetDeviceFunctionTypeMenuIcon(typeInfo, ref path1, ref path2);
                    dic[typeInfo.BeloneText].IconPath = path1;
                    dic[typeInfo.BeloneText].IconPathSelected = path2;
                    dic[typeInfo.BeloneText].TextId = typeInfo.BeloneText;
                }
                dic[typeInfo.BeloneText].listDeviceKeys.Add(LocalDevice.Current.GetDeviceMainKeys(device));
                dic[typeInfo.BeloneText].listDeviceKeys.Add(HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device));
            }
            return dic;
        }
@@ -626,7 +626,7 @@
                device.Type == DeviceType.ColorTemperatureLight ||//色温灯
                device.Type == DeviceType.WindowCoveringDevice)//窗帘
            {
                string mainkey = LocalDevice.Current.GetDeviceMainKeys(device);
                string mainkey = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
                return this.dicOldListTask.ContainsKey(mainkey) == false;
            }
            return false;