| | |
| | | CommonPage.Loading.Start(""); |
| | | #region 数据处理 |
| | | var tempDeata = await currentKey.ReadPanelConfigureInfoAsync(); |
| | | |
| | | if (tempDeata != null && tempDeata.deviceStatusReportData != null) |
| | | { |
| | | currentClusterID = tempDeata.deviceStatusReportData.CluterID; |
| | | //if (currentClusterID == 6) |
| | | //{ |
| | | |
| | | foreach (var attr in tempDeata.deviceStatusReportData.AttriBute) |
| | | { |
| | | currentKey.panelMode = attr.AttriButeData; |
| | |
| | | |
| | | var bindDeviceListTemp = new System.Collections.Generic.List<BindListResponseObj> { }; |
| | | var bindSceneListTemp = new System.Collections.Generic.List<BindListResponseObj> { }; |
| | | if (getBindList != null) |
| | | if (getBindList != null && getBindList.getAllBindResponseData != null) |
| | | { |
| | | if (getBindList.getAllBindResponseData != null) |
| | | foreach (var b in getBindList.getAllBindResponseData.BindList) |
| | | { |
| | | foreach (var b in getBindList.getAllBindResponseData.BindList) |
| | | if (b.BindCluster == currentClusterID) |
| | | { |
| | | if (b.BindCluster == currentClusterID) |
| | | if (b.BindCluster == 6) |
| | | { |
| | | if (b.BindCluster == 6) |
| | | { |
| | | |
| | | if (b.BindType == 2) |
| | | { |
| | | bindSceneListTemp.Add(b); |
| | | } |
| | | else |
| | | { |
| | | bindDeviceListTemp.Add(b); |
| | | } |
| | | if (b.BindType == 2) |
| | | { |
| | | bindSceneListTemp.Add(b); |
| | | } |
| | | else |
| | | { |
| | | currentKey.bindList.Add(b); |
| | | bindDeviceListTemp.Add(b); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | currentKey.bindList.Add(b); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | var btn = new Button() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | }; |
| | | this.midFrameLayout.AddChidren(btn); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btn); |
| | | }); |
| | | } |
| | | |
| | | if (currentKey.panelMode == 1) |
| | | { |
| | | currentKey.bindList = bindSceneListTemp; |
| | | currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddScene); |
| | | } |
| | | else if (currentKey.panelMode == 100 || currentKey.panelMode == 101 || currentKey.panelMode == 102) |
| | | { |
| | | currentKey.bindList = bindDeviceListTemp; |
| | | currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddSwitch); |
| | | } |
| | | else if (currentKey.panelMode == 200 || currentKey.panelMode == 201 || currentKey.panelMode == 202 || currentKey.panelMode == 203 || currentKey.panelMode == 204 || currentKey.panelMode == 205) |
| | | { |
| | | currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddDimmer); |
| | | } |
| | | else if (currentKey.panelMode == 300 || currentKey.panelMode == 301 || currentKey.panelMode == 302 || currentKey.panelMode == 303 || currentKey.panelMode == 304) |
| | | { |
| | | currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddCurtain); |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var btn = new Button() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | }; |
| | | this.midFrameLayout.AddChidren(btn); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btn); |
| | | }); |
| | | } |
| | | } |
| | | catch |
| | |
| | | midVerticalScrolViewLayout.Y = topMidVerticalScrolViewLayout.Bottom; |
| | | midVerticalScrolViewLayout.Height = this.midFrameLayout.Height; |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout; |
| | | |
| | | //var tempDeata = await currentKey.ReadPanelConfigureInfoAsync(); |
| | | //if (tempDeata != null && tempDeata.deviceStatusReportData != null) |
| | | //{ |
| | | // currentClusterID = tempDeata.deviceStatusReportData.CluterID; |
| | | // if (currentClusterID == 6) |
| | | // { |
| | | // foreach (var attr in tempDeata.deviceStatusReportData.AttriBute) |
| | | // { |
| | | // curModeId = attr.AttriButeData; |
| | | // currentKey.panelMode = curModeId; |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | if (currentKey.panelMode == 1) |
| | | { |
| | |
| | | RefreshList(); |
| | | //如果是场景,用户删除清空当前到房间列表 |
| | | currentKey.RoomId = ""; |
| | | currentKey.ReSave(); |
| | | } |
| | | |
| | | CommonPage.Loading.Hide(); |
| | | } |
| | | |
| | |
| | | currentKey.currentKeySelectModeText = btnMethodText.Text; |
| | | oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | } |
| | | |
| | | if (currentKey.currentKeySelectModeText == Language.StringByID(R.MyInternationalizationString.AddScene)) |
| | | { |
| | | if (currentKey.bindList.Count != 0) |
| | |
| | | RefreshList(); |
| | | //如果是场景,用户删除清空当前到房间列表 |
| | | currentKey.RoomId = ""; |
| | | currentKey.ReSave(); |
| | | return 0; |
| | | break; |
| | | case 1: |