| | |
| | | /// <summary>
|
| | | /// 是否获取网关反馈的结果 0:没有获取得到 1:已经获取得到
|
| | | /// </summary>
|
| | | private int ResponeResult = 0;
|
| | | public int ResponeResult = 0;
|
| | | /// <summary>
|
| | | /// 当前端点的功能类型
|
| | | /// </summary>
|
| | |
| | | btnDeviceName.Y = Application.GetRealHeight(46);
|
| | | btnDeviceName.TextSize = 15;
|
| | | btnDeviceName.IsBold = true;
|
| | | btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
|
| | | btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(i_device);
|
| | | btnDeviceName.Width = btnDeviceName.GetRealWidthByText();
|
| | | btnDeviceName.TextAlignment = TextAlignment.Center;
|
| | | btnDeviceName.Gravity = Gravity.CenterHorizontal;
|
| | |
| | |
|
| | | //房间图标
|
| | | var btnRoomIcon = new IconViewControl(81);
|
| | | btnRoomIcon.X = ControlCommonResourse.XXLeft;
|
| | | btnRoomIcon.X = HdlControlResourse.XXLeft;
|
| | | btnRoomIcon.UnSelectedImagePath = "Item/Room.png";
|
| | | btnRoomIcon.Gravity = Gravity.CenterVertical;
|
| | | frameRoomBlack.AddChidren(btnRoomIcon);
|
| | |
| | | this.ResponeResult = 0;
|
| | |
|
| | | //先让指定控件不能点击
|
| | | var listSelect = new List<bool>();
|
| | | foreach (var myContr in listControl)
|
| | | {
|
| | | myContr.CanClick = false;
|
| | | listSelect.Add(myContr.IsSelected);
|
| | | }
|
| | |
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | |
| | | {
|
| | | var msgContr = new ShowMsgControl(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.FAIL));
|
| | | msgContr.Show();
|
| | | //变更回原来的状态
|
| | | for (int i = 0; i < listSelect.Count; i++)
|
| | | {
|
| | | if (listSelect[i] != listControl[i].IsSelected)
|
| | | {
|
| | | listControl[i].IsSelected = listSelect[i];
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | //开关按钮可以再点击
|
| | |
| | | /// </summary>
|
| | | private void AddDeviceReportEvent()
|
| | | {
|
| | | string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(this.device);
|
| | | string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(this.device);
|
| | | //属性上报
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceDetailCardAttribute" + mainKeys, ReceiveComandDiv.A设备属性上报, (report) =>
|
| | | {
|
| | | string mainKey2 = Common.LocalDevice.Current.GetDeviceMainKeys(report);
|
| | | string mainKey2 = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(report);
|
| | | if (mainKeys != mainKey2)
|
| | | {
|
| | | //不是同一个东西
|
| | |
| | | else
|
| | | {
|
| | | //刷新名字
|
| | | this.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(this.device);
|
| | | this.btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(this.device);
|
| | | btnDeviceName.Width = btnDeviceName.GetRealWidthByText();
|
| | | btnDeviceName.Gravity = Gravity.CenterHorizontal;
|
| | | if (this.nowSelectRoom == null)
|
| | |
| | | /// </summary>
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(this.device);
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("DeviceDetailCardControl" + mainKeys);
|
| | | string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(this.device);
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("DeviceDetailCardAttribute" + mainKeys);
|
| | |
|
| | | //回调函数
|