| | |
| | | {
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | this.DeleteGateway(strWayId, gatewayRow);
|
| | | this.DeleteGateway(strWayId);
|
| | | });
|
| | | });
|
| | | };
|
| | |
| | | /// </summary>
|
| | | /// <param name="strWayId"></param>
|
| | | /// <param name="row"></param>
|
| | | private async void DeleteGateway(string strWayId, GatewayRowControl row)
|
| | | private void DeleteGateway(string strWayId)
|
| | | {
|
| | | //打开进度条
|
| | | this.ShowProgressBar();
|
| | | //删除云端网关
|
| | | bool result = await HdlGatewayLogic.Current.DeleteGateway(strWayId);
|
| | | bool result = HdlGatewayLogic.Current.DeleteGateway(strWayId);
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | | if (result == false)
|
| | |
| | | /// </summary>
|
| | | /// <param name="gatewayId"></param>
|
| | | /// <param name="online"></param>
|
| | | private async void DoSwitchGateway(string gatewayId)
|
| | | private void DoSwitchGateway(string gatewayId)
|
| | | {
|
| | | var result = await HdlGatewayLogic.Current.DoSwitchGateway(gatewayId);
|
| | | var result = HdlGatewayLogic.Current.DoSwitchGateway(gatewayId);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | |
| | | /// <param name="hadGwOnline">2020.05.25追加:此住宅是否拥有网关在线</param>
|
| | | public override void GatewayOnlinePush(ZbGateway gateWay, bool online, bool hadGwOnline)
|
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | if (this.Parent == null)
|
| | | {
|
| | |
| | | {
|
| | | this.dicRowContr[gwid].IsOnline = online;
|
| | | }
|
| | | });
|
| | | }, ShowErrorMode.NO);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | /// 网关新版本检测
|
| | | /// </summary>
|
| | | /// <param name="listWays"></param>
|
| | | private async void CheckGatewayNewVersion(List<ZbGateway> listWays)
|
| | | private void CheckGatewayNewVersion(List<ZbGateway> listWays)
|
| | | {
|
| | | foreach (var way in listWays)
|
| | | {
|
| | |
| | | continue;
|
| | | }
|
| | | //获取最新版本
|
| | | var result = await HdlGatewayLogic.Current.GetGatewayAllNewVersion(way, ShowErrorMode.NO);
|
| | | var result = HdlGatewayLogic.Current.GetGatewayAllNewVersion(way, ShowErrorMode.NO);
|
| | | if (result == null)
|
| | | {
|
| | | continue;
|
| | |
| | | {
|
| | | //有新版本
|
| | | string gwid = way.GwId;
|
| | | Application.RunOnMainThread(() =>
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | if (this.dicRowContr.ContainsKey(gwid) == true && this.dicRowContr[gwid] != null)
|
| | | {
|