| | |
| | | public class DeviceMacInfoEditorForm : EditorCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 设备对象
|
| | | /// </summary>
|
| | |
| | | {
|
| | | //简约面板随便一个回路来获取设备信息
|
| | | 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);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
|
| | | {
|
| | | //添加【绑定目标】行(简约环境面板用)
|
| | | //添加【绑定目标】行(简约环境面板用) |
| | | this.AddSimplePanelSettionRow();
|
| | | }
|
| | | else
|
| | |
| | | {
|
| | | 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;
|
| | | }
|
| | |
| | | {
|
| | | 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;
|
| | | }
|
| | |
| | | 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)
|
| | | {
|
| | |
| | | //删除指定设备
|
| | | 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);
|
| | |
| | |
|
| | | //删除设备
|
| | | 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)
|