| | |
| | | using HDL_ON.UI.UI2.PersonalCenter.PirDevice; |
| | | using Shared; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | |
| | | |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | btnTip.Text = "该设备已物拟到安防传感器类别可到对应类别查看使用"; |
| | | btnTip.Text = "该设备已添加到安防传感器类别,可到对应功能板块查看"; |
| | | } |
| | | else |
| | | { |
| | | btnTip.Text = "The device is planned to be used in the corresponding category for security sensor."; |
| | | btnTip.Text = "The device has been added to the security sensor category, which can be viewed in the corresponding function block."; |
| | | } |
| | | |
| | | var btnDel = new Button() { |
| | |
| | | |
| | | btnDel.MouseUpEventHandler = (sender, e) => { |
| | | var pack = PirSend.DeleteDevice(function.deviceId); |
| | | if(pack.Code == StateCode.SUCCESS) |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | DelDeviceEvent?.Invoke(); |
| | | this.CloseForm(); |
| | | }else |
| | | var mes = ""; |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | mes = "设备删除成功。"; |
| | | } |
| | | else |
| | | { |
| | | mes = "Device deleted successfully."; |
| | | } |
| | | var tip = new Tip() |
| | | { |
| | | Text = mes, |
| | | CloseTime = 2, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(MainPage.BaseView); |
| | | } |
| | | else |
| | | { |
| | | IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); |
| | | } |