xm
2020-04-28 dfd3bdc07c49fab66b38382e0bbe7c91bdf4f15b
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
old mode 100755 new mode 100644
@@ -141,7 +141,7 @@
                //选择未分配时,清空
                if (roomKeys == string.Empty) { listCheck = new List<string>(); }
                foreach (var device in this.listNewDevice)
                {
                {
                    if (device is OTADevice)
                    {
                        //针对单纯只有一个200端点的设备
@@ -160,10 +160,16 @@
                        //这里有点特殊,如果回路没有设置有区域的时候,才设置
                        listCheck.Add(mainKeys);
                        HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
                    }
                    else if (this.deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir
                      && device.Type == DeviceType.FreshAir)
                    {
                        //新风面板的新风设备,则区域跟着模块一起
                        HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
                    }
                    else if (listCheck.Contains(mainKeys) == true)
                    {
                        //如果这个回路之前都还没有区域,在本界面还没有关闭之前,可以无条件随便变更
                    {
                        //如果这个回路之前都还没有区域,在本界面还没有关闭之前,可以无条件随便变更
                        HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
                    }
                }
@@ -576,8 +582,8 @@
        private void AddDryContactSettionRow()
        {
            if (this.listDeviceType.Contains(DeviceType.OnOffSwitch) == false)
            {
                //必须有一路回路是OnOffSwitch才行,面板的干接点的话,使用的是别的菜单
            {
                //必须有一路回路是OnOffSwitch才行,面板的干接点的话,使用的是别的菜单
                return;
            }
            if (deviceEnumInfo.IsHdlDevice == true && deviceEnumInfo.BeloneType == DeviceBeloneType.A按键面板)
@@ -673,8 +679,12 @@
        {
            //只有回路数大于1才能有这个菜单
            if (Common.LocalDevice.Current.GetDevicesCountByMac(listNewDevice[0].DeviceAddr) == 1)
            {
                return;
            {
                //要求新风小模块的新风有功能设置
                if (deviceEnumInfo.ConcreteType != DeviceConcreteType.Relay_FangyueFreshAirModul)
                {
                    return;
                }
            }
            if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment
                || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
@@ -932,10 +942,19 @@
                var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
                var form = new BottomItemSelectForm();
                form.CancelCallEvent = true;//允许取消
                form.AddForm(title, listText, nowSelectNo);
                form.FinishSelectEvent += (selectNo) =>
                {
                    btnFunction.Text = listText[selectNo];
                    if (selectNo == -1)
                    {
                        //选择取消
                        btnFunction.Text = string.Empty;
                    }
                    else
                    {
                        btnFunction.Text = listText[selectNo];
                    }
                    nowSelectNo = selectNo;
                    //记录起当前选择的功能类型
                    if (selectNo == 0)
@@ -956,13 +975,22 @@
                            this.listNewDevice[0].IconPath = "Device/Light.png";
                        }
                    }
                    else
                    else if (selectNo == 2)
                    {
                        this.listNewDevice[0].DfunctionType = DeviceFunctionType.A插座;
                        if (this.listNewDevice[0].IsCustomizeImage == false)
                        {
                            //重新设置图片
                            this.listNewDevice[0].IconPath = "Device/Socket1.png";
                        }
                    }
                    else
                    {
                        this.listNewDevice[0].DfunctionType = DeviceFunctionType.A未定义;
                        if (this.listNewDevice[0].IsCustomizeImage == false)
                        {
                            //重新设置图片
                            this.listNewDevice[0].IconPath = "Device/Switch.png";
                        }
                    }
                    this.listNewDevice[0].ReSave();
@@ -1187,8 +1215,8 @@
        private void ShowTopRightMenu()
        {
            //检测此回路是否拥有定位功能(拿端点最小的那个回路去定位)
            bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]);
            bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]);
            var frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1);
            string deviceMenu = string.Empty;
            if (canTest == true)