xm
2020-07-20 b02e8275a21dc06bf54b66273485d44e007a2616
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -14,6 +14,7 @@
    public class DeviceMacInfoEditorForm : EditorCommonForm
    {
        #region ■ 变量声明___________________________
        /// <summary>
        /// 设备对象
        /// </summary>
@@ -101,13 +102,13 @@
            {
                //简约面板随便一个回路来获取设备信息
                var dev = Common.LocalDevice.Current.GetDevice(deviceMac, 62);
                if (dev != null)
                {
                    var key = new ZigBee.Device.Panel();
                    key.DeviceAddr = deviceMac;
                    key.CurrentGateWayId = dev.CurrentGateWayId;
                    InitBindInfo(key);
                }
                if (dev != null)
                {
                    var key = new ZigBee.Device.Panel();
                    key.DeviceAddr = deviceMac;
                    key.CurrentGateWayId = dev.CurrentGateWayId;
                    InitBindInfo(key);
                }
            }
        }
@@ -296,7 +297,7 @@
            }
            else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
            {
                //添加【绑定目标】行(简约环境面板用)
                //添加【绑定目标】行(简约环境面板用)
                this.AddSimplePanelSettionRow();
            }
            else
@@ -1163,7 +1164,7 @@
                    {
                        Application.RunOnMainThread(() =>
                        {
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007_2" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                        });
                        return;
                    }
@@ -1175,7 +1176,7 @@
                    {
                        Application.RunOnMainThread(() =>
                        {
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007_3" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                        });
                        return;
                    }
@@ -1211,9 +1212,9 @@
                foreach (var bDev in bindList)
                {
                    var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                    if (device == null)
                    {
                        continue;
                    if (device == null)
                    {
                        continue;
                    }
                    if (device.Type == DeviceType.TemperatureSensor)
                    {
@@ -1546,24 +1547,7 @@
                    //删除指定设备
                    this.DoDeleteDevice();
                });
            });
            //同步
            deviceMenu = Language.StringByID(R.MyInternationalizationString.Synchronization);
            if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]))
            {
                frame.AddRowMenu(deviceMenu, "", "Item/SynchronizationSelected.png", () =>
                {
                    //如果当前住宅是虚拟住宅,此功能无效
                    if (Common.Config.Instance.Home.IsVirtually == true)
                    {
                        return;
                    }
                    //同步指定设备
                    this.SynchronizationDevice();
                });
            }
            });
            //同步
            deviceMenu = Language.StringByID(R.MyInternationalizationString.Synchronization);
@@ -1596,32 +1580,6 @@
                //删除设备
                bool result = await Common.LocalDevice.Current.DeleteDevice(listNewDevice);
                //关闭进度条
                this.CloseProgressBar();
                if (result == false)
                {
                    return;
                }
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //关闭界面
                    this.CloseForm();
                });
            });
        }
        /// <summary>
        /// 同步指定设备
        /// </summary>
        private void SynchronizationDevice()
        {
            HdlThreadLogic.Current.RunThread(async () =>
            {
                //打开进度条
                this.ShowProgressBar();
                //同步设备
                bool result = await Common.LocalDevice.Current.SynchronizationDevice(listNewDevice);
                //关闭进度条
                this.CloseProgressBar();
                if (result == false)