| | |
| | | //划线
|
| | | btnNote.AddBottomLine();
|
| | | btnNote.txtInput.FinishInputEvent += () =>
|
| | | {
|
| | | string oldName = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
|
| | | if (btnNote.Text.Trim() == string.Empty)
|
| | | {
|
| | | //将名字还原
|
| | | btnNote.Text = oldName;
|
| | | }
|
| | | if (oldName != btnNote.Text)
|
| | | {
|
| | | //设备名称修改
|
| | | var result = Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //设备备注修改成功!
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uDeviceReNoteSuccess);
|
| | | this.ShowMassage(ShowMsgType.Tip, msg);
|
| | | }
|
| | | };
|
| | | {
|
| | | string oldName = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
|
| | | if (btnNote.Text.Trim() == string.Empty)
|
| | | {
|
| | | //将名字还原
|
| | | btnNote.Text = oldName;
|
| | | }
|
| | | if (oldName != btnNote.Text)
|
| | | {
|
| | | //查看模板时,不允许编辑
|
| | | if (Common.Config.Instance.Home.IsShowTemplate == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //设备名称修改
|
| | | var result = Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //设备备注修改成功!
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uDeviceReNoteSuccess);
|
| | | this.ShowMassage(ShowMsgType.Tip, msg);
|
| | | }
|
| | | };
|
| | |
|
| | | //设备类型
|
| | | caption = Language.StringByID(R.MyInternationalizationString.uDeviceType);
|
| | |
| | | }
|
| | | this.CloseForm();
|
| | | };
|
| | | //查看模板时,不允许编辑
|
| | | if (Common.Config.Instance.Home.IsShowTemplate == true)
|
| | | {
|
| | | btnFinish.CanClick = false;
|
| | | btnSwingSwitch.CanClick = false;
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | //如果是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | var data = ModelData.DeviceModelDataLogic.Current.GetAcSwingModeSupport(deviceAc);
|
| | | var data = TemplateData.TemplateDeviceDataLogic.Current.GetAcSwingModeSupport(deviceAc);
|
| | | //转换为二进制
|
| | | var value = Convert.ToString(data, 2).PadLeft(16, '0');
|
| | | //这个设置是放在后面的
|