| | |
| | | btnNote.InitControl();
|
| | | //划线
|
| | | btnNote.AddBottomLine();
|
| | | btnNote.txtInput.FinishInputEvent += async () =>
|
| | | btnNote.txtInput.FinishInputEvent += () =>
|
| | | {
|
| | | string oldName = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
|
| | | if (btnNote.Text.Trim() == string.Empty)
|
| | |
| | | if (oldName != btnNote.Text)
|
| | | {
|
| | | //设备名称修改
|
| | | var result = await Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
|
| | | var result = Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | |
| | | string statu = btnSwingSwitch.IsSelected == true ? "0" : "1";
|
| | | //将二进制转换为十进制
|
| | | int sendData = Convert.ToInt32(this.fixValue + statu, 2);
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | var result = await HdlDeviceAirConditionerLogic.Current.SetUseAcSwingFunctionStatu(deviceAc, sendData);
|
| | | var result = HdlDeviceAirConditionerLogic.Current.SetUseAcSwingFunctionStatu(deviceAc, sendData);
|
| | | if (result == true)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | |
| | | var btnFinish = new BottomClickButton();
|
| | | btnFinish.TextID = R.MyInternationalizationString.uSave;
|
| | | bodyFrameLayout.AddChidren(btnFinish);
|
| | | btnFinish.ButtonClickEvent += async (sender, e) =>
|
| | | btnFinish.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | string oldName = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
|
| | | if (oldName != btnNote.Text)
|
| | | {
|
| | | //设备名称修改
|
| | | var result = await Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
|
| | | var result = Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | |
| | | /// </summary>
|
| | | private bool ReadAirConditionerSwingModeSupport()
|
| | | {
|
| | | //如果是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | var data = ModelData.DeviceModelDataLogic.Current.GetAcSwingModeSupport(deviceAc);
|
| | | //转换为二进制
|
| | | var value = Convert.ToString(data, 2).PadLeft(16, '0');
|
| | | //这个设置是放在后面的
|
| | | this.fixValue = value.Substring(0, value.Length - 1);
|
| | | this.swingMode = Convert.ToInt32(value.Substring(this.fixValue.Length));
|
| | | return true;
|
| | | }
|
| | |
|
| | | string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(deviceAc);
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("ReadAirConditionerModeSupport", ReceiveComandDiv.A设备属性上报, (report) =>
|
| | | {
|