| | |
| | | SelectedTextColor = SkinStyle.Current.TextColor1, |
| | | }; |
| | | acRowView.AddChidren (tempDeviceName); |
| | | //2020-08-28 增加长按修改设备备注 |
| | | ButtonNameAddMouseLongEventHandler (tempDeviceName, devcieCommon); |
| | | |
| | | tempDeviceName.MouseUpEventHandler += openACControlPageEvent; |
| | | |
| | | Button btnMode = new Button () { |
| | |
| | | IsMoreLines = true |
| | | }; |
| | | fhRowView.AddChidren (tempDeviceName); |
| | | |
| | | //2020-08-28 增加长按修改设备备注 |
| | | ButtonNameAddMouseLongEventHandler (tempDeviceName, devcieCommon); |
| | | |
| | | tempDeviceName.MouseUpEventHandler += (sender2, e2) => { |
| | | UserFHPage fhView = new UserFHPage (fh, room); |
| | | if (roomFilePath == Room.FavoriteRoom) { |
| | |
| | | IsMoreLines = true |
| | | }; |
| | | DeviceRowView.AddChidren (btnName); |
| | | |
| | | //2020-08-28 增加长按修改设备备注 |
| | | ButtonNameAddMouseLongEventHandler (btnName, devcieCommon); |
| | | |
| | | //btnName.MouseLongEventHandler += (sender, e)=>{ |
| | | // RemarkDeviceName (devcieCommon, SimpleControl.CommonPage.MyEncodingUTF8.GetBytes (Newtonsoft.Json.JsonConvert.SerializeObject (devcieCommon)), btnName); |
| | | //}; |
| | | |
| | | Button tempSwitch = new Button () { |
| | | Width = Application.GetMinRealAverage (90), |
| | |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="btnName"></param> |
| | | /// <param name="devcieCommon"></param> |
| | | void ButtonNameAddMouseLongEventHandler (Button btnName,Common devcieCommon) |
| | | { |
| | | //2020-08-28 增加长按修改设备备注 |
| | | btnName.MouseLongEventHandler += (sender, e) => { |
| | | RemarkDeviceName (devcieCommon, SimpleControl.CommonPage.MyEncodingUTF8.GetBytes (Newtonsoft.Json.JsonConvert.SerializeObject (devcieCommon)), btnName); |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="commonDevice"></param> |
| | | /// <param name="commonBytes"></param> |
| | | /// <param name="btnEquipment"></param> |
| | | void RemarkDeviceName (Common commonDevice, byte[] commonBytes, Button btnEquipment) |
| | | { |
| | | Action successAction = () => { |
| | | GenericDialog.Current.RefreshRemark (commonDevice); |
| | | //if (!roomDeviceFilePathList.Contains (filePath)) { |
| | | // roomDeviceFilePathList.Add (filePath); |
| | | //} |
| | | }; |
| | | GenericDialog.Current.ShowModifyRemarksDialog (commonDevice, commonBytes, btnEquipment, successAction); |
| | | } |
| | | } |
| | | } |