黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs
@@ -102,18 +102,18 @@
                this.ShowProgressBar();
                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)
                        {
                            //关闭
@@ -140,7 +140,7 @@
        {
            this.listview.RemoveAll();
            string nameValue = Common.LocalDevice.Current.GetDeviceEpointName(nowSelectDevice);
            string nameValue = HdlDeviceCommonLogic.Current.GetDeviceEpointName(nowSelectDevice);
            if (dicDeviceSaveName.ContainsKey(nowSelectDevice.DeviceEpoint) == true)
            {
                nameValue = dicDeviceSaveName[nowSelectDevice.DeviceEpoint];
@@ -158,7 +158,7 @@
            {
                btnDeviceName.txtInput.FinishInputEvent += () =>
                {
                    string oldName = Common.LocalDevice.Current.GetDeviceEpointName(nowSelectDevice);
                    string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(nowSelectDevice);
                    if (btnDeviceName.Text.Trim() == string.Empty)
                    {
                        //将名字还原
@@ -167,7 +167,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;
@@ -212,7 +212,7 @@
        private void InitTopRightMenu()
        {
            //检测此回路是否拥有定位功能
            if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(nowSelectDevice) == false
            if (HdlDeviceCommonLogic.Current.DeviceIsCanFixedPosition(nowSelectDevice) == false
                || Common.Config.Instance.Home.IsShowTemplate == true)
            {
                return;
@@ -236,7 +236,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;
@@ -249,7 +249,7 @@
                frame.AddRowMenu(deviceMenu, "Item/FixedPosition.png", "Item/FixedPositionSelected.png", () =>
                {
                    //发送定位功能
                    Common.LocalDevice.Current.SetFixedPositionCommand(nowSelectDevice);
                    HdlDeviceCommonLogic.Current.SetFixedPositionCommand(nowSelectDevice);
                });
            }
@@ -300,7 +300,7 @@
        private void AddBackLightRow()
        {
            //河东设备才会开启此选项
            if (Common.LocalDevice.Current.IsHdlDevice(nowSelectDevice) == true)
            if (HdlDeviceCommonLogic.Current.IsHdlDevice(nowSelectDevice) == true)
            {
                //背光灯
                string caption = Language.StringByID(R.MyInternationalizationString.uBackLight);
@@ -328,14 +328,14 @@
        /// </summary>
        private void AddVibrationFeedbackRow()
        {
            var listDevice = Common.LocalDevice.Current.GetDevicesByMac(nowSelectDevice.DeviceAddr, false);
            var myType = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice);
            var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(nowSelectDevice.DeviceAddr, false);
            var myType = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(listDevice);
            //只有简约面板才会有这个菜单
            if (myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleTwo
                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleThree
                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleFour
                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FourButtonScene
                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_TwoButtonCurtain)
            if (myType.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleTwo
                || myType.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleThree
                || myType.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleFour
                || myType.ConcreteType == DeviceConcreteType.ButtonPanel_FourButtonScene
                || myType.ConcreteType == DeviceConcreteType.ButtonPanel_TwoButtonCurtain)
            {
                //震动反馈
                var rowContr = new FrameRowControl(listview.rowSpace / 2);
@@ -421,7 +421,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 listOffSwitch = new List<CommonDevice>();
            foreach (var device in listDevice)
            {
@@ -666,7 +666,7 @@
            nowContr.BorderColor = 0xfffb744a;
            nowSelectControl = nowContr;
            nowSelectDevice = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, Convert.ToInt32(nowContr.Name.Replace("btn", string.Empty)));
            nowSelectDevice = HdlDeviceCommonLogic.Current.GetDevice(deviceObj.DeviceAddr, Convert.ToInt32(nowContr.Name.Replace("btn", string.Empty)));
            //重新初始化菜单行
            this.InitMenuRow();