| | |
| | |
|
| | | //回路备注
|
| | | string caption = Language.StringByID(R.MyInternationalizationString.uDeviceEpointNote);
|
| | | string nameValue = Common.LocalDevice.Current.GetDeviceEpointName(this.device);
|
| | | string nameValue = HdlDeviceCommonLogic.Current.GetDeviceEpointName(this.device);
|
| | | var btnDeviceName = new FrameCaptionInputControl(caption, nameValue, listview.rowSpace / 2);
|
| | | btnDeviceName.txtInput.MaxByte = 48;//限制只能输入48个字节
|
| | | listview.AddChidren(btnDeviceName);
|
| | |
| | | btnDeviceName.AddBottomLine();
|
| | | btnDeviceName.txtInput.FinishInputEvent += () =>
|
| | | {
|
| | | string oldName = Common.LocalDevice.Current.GetDeviceEpointName(this.device);
|
| | | string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(this.device);
|
| | | if (btnDeviceName.Text.Trim() == string.Empty)
|
| | | {
|
| | | //将名字还原
|
| | |
| | | if (oldName != btnDeviceName.Text.Trim())
|
| | | {
|
| | | //设备名称修改
|
| | | var result = Common.LocalDevice.Current.ReName(this.device, btnDeviceName.Text.Trim());
|
| | | var result = HdlDeviceCommonLogic.Current.ReName(this.device, btnDeviceName.Text.Trim());
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | |
| | | btnFinish.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | string newName = btnDeviceName.Text.Trim();
|
| | | string oldName = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
|
| | | if (oldName != newName)
|
| | | {
|
| | | //设备名称修改
|
| | | var result = Common.LocalDevice.Current.ReName(device, newName);
|
| | | var result = HdlDeviceCommonLogic.Current.ReName(device, newName);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|