| | |
| | | //设置标题信息
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uDeviceSettion));
|
| | |
|
| | | //初始化右上角菜单
|
| | | this.InitTopRightMenu();
|
| | | //重新获取硬件信息(false:不需要获取,true:需要获取)
|
| | | var result = this.RefreshHardFirmwareInfo();
|
| | |
|
| | | //初始化中部控件
|
| | | this.InitMiddleFrame();
|
| | |
|
| | | //重新获取硬件信息
|
| | | this.RefreshHardFirmwareInfo();
|
| | |
|
| | | //简约多功能面板获取绑定目标的显示
|
| | | if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //简约面板随便一个回路来获取设备信息
|
| | | var dev = HdlDeviceCommonLogic.Current.GetDevice(deviceMac, 62);
|
| | | if (dev != null)
|
| | | if (result == true)
|
| | | {
|
| | | var key = new ZigBee.Device.Panel();
|
| | | key.DeviceAddr = deviceMac;
|
| | | key.CurrentGateWayId = dev.CurrentGateWayId;
|
| | | InitBindInfo(key); |
| | | //如果需要重新去读取设备的信息才能显示界面的话,等待一段时间
|
| | | this.ShowProgressBar();
|
| | | System.Threading.Thread.Sleep(1500);
|
| | | }
|
| | | }
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //初始化右上角菜单
|
| | | this.InitTopRightMenu();
|
| | |
|
| | | //初始化中部控件
|
| | | this.InitMiddleFrame();
|
| | |
|
| | | //简约多功能面板获取绑定目标的显示
|
| | | if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
|
| | | {
|
| | | //简约面板随便一个回路来获取设备信息
|
| | | var dev = HdlDeviceCommonLogic.Current.GetDevice(deviceMac, 62);
|
| | | if (dev != null)
|
| | | {
|
| | | var key = new ZigBee.Device.Panel();
|
| | | key.DeviceAddr = deviceMac;
|
| | | key.CurrentGateWayId = dev.CurrentGateWayId;
|
| | | InitBindInfo(key);
|
| | | }
|
| | | }
|
| | | if (result == true)
|
| | | {
|
| | | this.CloseProgressBar();
|
| | | }
|
| | | });
|
| | | });
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | if (Common.Config.Instance.Home.IsShowTemplate == true)
|
| | | {
|
| | | btnSwitch.CanClick = false;
|
| | | btnSwitch.IsSelected = TemplateData.TemplateDeviceDataLogic.Current.GetCurtainHandPullControl(deviceCurtain);
|
| | | btnSwitch.IsSelected = HdlTemplateDeviceDataLogic.Current.GetCurtainHandPullControl(deviceCurtain);
|
| | | return;
|
| | | }
|
| | | //如果是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | btnSwitch.IsSelected = TemplateData.TemplateDeviceDataLogic.Current.GetCurtainHandPullControl(deviceCurtain);
|
| | | btnSwitch.IsSelected = HdlTemplateDeviceDataLogic.Current.GetCurtainHandPullControl(deviceCurtain);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | #region ■ 硬件信息___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 重新获取硬件信息
|
| | | /// 重新获取硬件信息(false:不需要获取,true:需要获取)
|
| | | /// </summary>
|
| | | private void RefreshHardFirmwareInfo()
|
| | | private bool RefreshHardFirmwareInfo()
|
| | | {
|
| | | if (listNewDevice[0].DriveCode > 0 || Common.Config.Instance.Home.IsShowTemplate == true)
|
| | | {
|
| | | //虚拟设备没有这种操作
|
| | | return;
|
| | | return false;
|
| | | }
|
| | | //重新获取硬件信息
|
| | | HdlDeviceAttributeLogic.Current.ReadDeviceAllHardFirmwareInfo(listNewDevice[0]);
|
| | | //获取设备的固定属性
|
| | | return HdlDeviceAttributeLogic.Current.ReadDeviceAllFixedAttribute(listNewDevice[0]);
|
| | | }
|
| | |
|
| | | #endregion
|