黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs
@@ -98,18 +98,18 @@
                dicDeviceSaveName[nowSelectDevice.DeviceEpoint] = btnDeviceName.Text.Trim();
                foreach (var epoint in dicDeviceSaveName.Keys)
                {
                    var device = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, epoint);
                    var device = HdlDeviceCommonLogic.Current.GetDevice(deviceObj.DeviceAddr, epoint);
                    if (device == null || dicDeviceSaveName[epoint] == string.Empty)
                    {
                        //不能允许空白名字
                        continue;
                    }
                    string newName = dicDeviceSaveName[epoint];
                    string oldName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                    string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                    if (oldName != newName)
                    {
                        //设备名称修改
                        var result = Common.LocalDevice.Current.ReName(device, newName);
                        var result = HdlDeviceCommonLogic.Current.ReName(device, newName);
                        if (result == false)
                        {
                            return;
@@ -130,7 +130,7 @@
            //回路备注
            string caption = Language.StringByID(R.MyInternationalizationString.uDeviceEpointNote);
            string nameValue = Common.LocalDevice.Current.GetDeviceEpointName(nowSelectDevice);
            string nameValue = HdlDeviceCommonLogic.Current.GetDeviceEpointName(nowSelectDevice);
            if (dicDeviceSaveName.ContainsKey(nowSelectDevice.DeviceEpoint) == true)
            {
                nameValue = dicDeviceSaveName[nowSelectDevice.DeviceEpoint];
@@ -143,7 +143,7 @@
            btnDeviceName.AddBottomLine();
            btnDeviceName.txtInput.FinishInputEvent += () =>
            {
                string oldName = Common.LocalDevice.Current.GetDeviceEpointName(nowSelectDevice);
                string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(nowSelectDevice);
                if (btnDeviceName.Text.Trim() == string.Empty)
                {
                    //将名字还原
@@ -152,7 +152,7 @@
                if (oldName != btnDeviceName.Text.Trim())
                {
                    //设备名称修改
                    var result = Common.LocalDevice.Current.ReName(nowSelectDevice, btnDeviceName.Text.Trim());
                    var result = HdlDeviceCommonLogic.Current.ReName(nowSelectDevice, btnDeviceName.Text.Trim());
                    if (result == false)
                    {
                        return;
@@ -191,7 +191,7 @@
        private void InitTopRightMenu()
        {
            //检测此回路是否拥有定位功能
            if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(nowSelectDevice) == false)
            if (HdlDeviceCommonLogic.Current.DeviceIsCanFixedPosition(nowSelectDevice) == false)
            {
                return;
            }
@@ -214,7 +214,7 @@
            int menuCount = 1;
            string deviceMenu = string.Empty;
            //检测此回路是否拥有定位功能
            bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(nowSelectDevice);
            bool canTest = HdlDeviceCommonLogic.Current.DeviceIsCanFixedPosition(nowSelectDevice);
            //if (canTest == true)
            //{
            //    menuCount = 2;
@@ -227,7 +227,7 @@
                frame.AddRowMenu(deviceMenu, "Item/FixedPosition.png", "Item/FixedPositionSelected.png", () =>
                {
                    //发送定位功能
                    Common.LocalDevice.Current.SetFixedPositionCommand(nowSelectDevice);
                    HdlDeviceCommonLogic.Current.SetFixedPositionCommand(nowSelectDevice);
                });
            }
@@ -268,7 +268,7 @@
        private void InitDeviceEpointIcon(VerticalFrameControl listBackControl)
        {
            bool hadDevice = false;
            var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceObj.DeviceAddr);
            var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceObj.DeviceAddr);
            var listSort = new List<CommonDevice>();
            foreach (var device in listDevice)
            {
@@ -309,13 +309,13 @@
            frameBorder.AddChidren(btnPic);
            if (deviceEnum.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueEight)
            if (deviceEnum.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEight)
            {
                //四开八控面板
                btnPic.UnSelectedImagePath = "DeviceItem/PanelFangyueEightButtonTable.png";
                this.InitEightButtonPanelIcon(frameBorder, listSort);
            }
            else if (deviceEnum.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFour)
            else if (deviceEnum.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFour)
            {
                //双开四控面板
                btnPic.UnSelectedImagePath = "DeviceItem/PanelFangyueFourButtonTable.png";
@@ -532,7 +532,7 @@
            nowContr.TextColor = 0xfffb744a;
            nowSelectControl = nowContr;
            nowSelectDevice = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, Convert.ToInt32(nowContr.Text.Replace("CHANNEL", string.Empty)));
            nowSelectDevice = HdlDeviceCommonLogic.Current.GetDevice(deviceObj.DeviceAddr, Convert.ToInt32(nowContr.Text.Replace("CHANNEL", string.Empty)));
            //重新初始化菜单行
            this.InitMenuRow();