HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-12-14 e90209beae6a4e822cecb18e6889f8bda23f630e
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
@@ -72,7 +72,7 @@
            //设置标题信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice));
            this.gatewayId = HdlGatewayResourse.NowSelectGatewayId;
            this.gatewayId = GatewayResourse.NowSelectGatewayId;
            HdlGatewayLogic.Current.GetRealGateway(ref this.realGateway, this.gatewayId);
            //初始化中部控件
@@ -163,7 +163,7 @@
                return;
            }
            //根据设备Type创建对应的设备对象
            var device = HdlDeviceCommonLogic.Current.NewDeviceObjectByDeviceId((DeviceType)jobject.Value<int>("Device_ID"), jobject.Value<int>("Epoint"));
            var device = Common.LocalDevice.Current.NewDeviceObjectByDeviceId((DeviceType)jobject.Value<int>("Device_ID"), jobject.Value<int>("Epoint"));
            if (device == null)
            {
                return;
@@ -171,14 +171,14 @@
            device.DeviceInfo = info;
            //给新设备设置主键属性
            HdlDeviceCommonLogic.Current.SetNewDeviceMainKeys(device, jobject);
            Common.LocalDevice.Current.SetNewDeviceMainKeys(device, jobject);
            device.CurrentGateWayId = this.realGateway.GwId;
            //将DeviceInfo的属性设置到主属性中
            HdlDeviceCommonLogic.Current.SetDeviceInfoToMain(device, device);
            Common.LocalDevice.Current.SetDeviceInfoToMain(device, device);
            //添加设备的缓存
            device.IsOnline = 1;
            HdlDeviceCommonLogic.Current.AddDeviceToMemory(ref device);
            Common.LocalDevice.Current.AddDeviceToMemory(ref device);
            //刷新超时时间
            this.waitDeviceTimeOut = 20;
@@ -236,10 +236,10 @@
                    device.ReSave();
                    //设置设备功能类型 (不能在接收回路的地方写入,不然网关可能会超负荷)
                    HdlDeviceCommonLogic.Current.RefreshDeviceFunctionType(device, device, true);
                    Common.LocalDevice.Current.RefreshDeviceFunctionType(device, device, true);
                    System.Threading.Thread.Sleep(200);
                    //获取设备的固定属性
                    if (HdlDeviceAttributeLogic.Current.ReadDeviceAllFixedAttribute(device) == true)
                    if (HdlDeviceFixedAttributeLogic.Current.SetAllFixedAttributeToDevice(device) == true)
                    {
                        System.Threading.Thread.Sleep(200);
                    }
@@ -269,7 +269,7 @@
            if (this.targetFormId != string.Empty)
            {
                //再关闭设备入网指导界面
                HdlFormLogic.Current.CloseFormByFormName(this.targetFormId);
                this.CloseFormByFormName(this.targetFormId);
            }
            //添加设备