| | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.Entity; |
| | | using System.Text.RegularExpressions; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | |
| | | //创建回调事件 |
| | | Action<string> callBackAction = (name) => |
| | | { |
| | | function.name = name; |
| | | btnFunctionName.Text = name; |
| | | DB_ResidenceData.residenceData.SaveResidenceData(); |
| | | if (string.IsNullOrEmpty(name)) |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.DeviceNameCannotBeEmpty), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(bodyView); |
| | | return; |
| | | } |
| | | if (function.name != name) |
| | | { |
| | | function.name = name; |
| | | btnFunctionName.Text = name; |
| | | function.UpdataFuncitonInfo(); |
| | | } |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.ChangeName, function.name, callBackAction); |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.ChangeName, function.name, callBackAction,StringId.DeviceNameCannotBeEmpty,0,new System.Collections.Generic.List<string>()); |
| | | }; |
| | | btnEditName.MouseUpEventHandler = eventHandler; |
| | | btnFunctionName.MouseUpEventHandler = eventHandler; |