| | |
| | |
|
| | | //设备备注
|
| | | string caption = Language.StringByID(R.MyInternationalizationString.uDeviceNote);
|
| | | string nameValue = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
|
| | | string nameValue = HdlDeviceCommonLogic.Current.GetDeviceEpointName(deviceAc);
|
| | | var btnNote = new FrameCaptionInputControl(caption, nameValue, listview.rowSpace / 2);
|
| | | btnNote.txtInput.MaxByte = 48;//限制只能输入48个字节
|
| | | listview.AddChidren(btnNote);
|
| | |
| | | btnNote.AddBottomLine();
|
| | | btnNote.txtInput.FinishInputEvent += () =>
|
| | | {
|
| | | string oldName = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
|
| | | string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(deviceAc);
|
| | | if (btnNote.Text.Trim() == string.Empty)
|
| | | {
|
| | | //将名字还原
|
| | |
| | | return;
|
| | | }
|
| | | //设备名称修改
|
| | | var result = Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
|
| | | var result = HdlDeviceCommonLogic.Current.ReName(deviceAc, btnNote.Text);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | |
| | |
|
| | | //设备类型
|
| | | caption = Language.StringByID(R.MyInternationalizationString.uDeviceType);
|
| | | nameValue = Common.LocalDevice.Current.GetDeviceObjectText(new List<CommonDevice>() { deviceAc });
|
| | | nameValue = HdlDeviceCommonLogic.Current.GetDeviceObjectText(new List<CommonDevice>() { deviceAc });
|
| | | var btnType = new FrameCaptionViewControl(caption, nameValue, listview.rowSpace / 2);
|
| | | btnType.UseClickStatu = false;
|
| | | listview.AddChidren(btnType);
|
| | |
| | | bodyFrameLayout.AddChidren(btnFinish);
|
| | | btnFinish.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | string oldName = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
|
| | | string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(deviceAc);
|
| | | if (oldName != btnNote.Text)
|
| | | {
|
| | | //设备名称修改
|
| | | var result = Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
|
| | | var result = HdlDeviceCommonLogic.Current.ReName(deviceAc, btnNote.Text);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | |
| | | private void InitTopRightMenu()
|
| | | {
|
| | | //检测此回路是否拥有定位功能(拿端点最小的那个回路去定位)
|
| | | bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(deviceAc);
|
| | | bool canTest = HdlDeviceCommonLogic.Current.DeviceIsCanFixedPosition(deviceAc);
|
| | | if (canTest == false)
|
| | | {
|
| | | return;
|
| | |
| | | frame.AddRowMenu(deviceMenu, "Item/FixedPosition.png", "Item/FixedPositionSelected.png", () =>
|
| | | {
|
| | | //发送定位功能
|
| | | Common.LocalDevice.Current.SetFixedPositionCommand(deviceAc);
|
| | | HdlDeviceCommonLogic.Current.SetFixedPositionCommand(deviceAc);
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | //如果是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | var data = TemplateData.TemplateDeviceDataLogic.Current.GetAcSwingModeSupport(deviceAc);
|
| | | var data = HdlTemplateDeviceDataLogic.Current.GetAcSwingModeSupport(deviceAc);
|
| | | //转换为二进制
|
| | | var value = Convert.ToString(data, 2).PadLeft(16, '0');
|
| | | //这个设置是放在后面的
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(deviceAc);
|
| | | string mainkeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(deviceAc);
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("ReadAirConditionerModeSupport", ReceiveComandDiv.A设备属性上报, (report) =>
|
| | | {
|
| | | string checkKeys = Common.LocalDevice.Current.GetDeviceMainKeys(report);
|
| | | string checkKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(report);
|
| | | if (checkKeys != mainkeys || report.DeviceStatusReport.CluterID != 514)
|
| | | {
|
| | | return;
|
| | |
| | | {
|
| | | //获取空调摆风状态失败
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uGetAirConditionerSwingFunctionFail);
|
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, null, "回复超时");
|
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, null, "回复超时");
|
| | | this.ShowMassage(ShowMsgType.Tip, msg);
|
| | | return false;
|
| | | }
|