黄学彪
2019-12-05 b3e96fce4cc01113128ddf8e0a18fc19594a9e56
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
@@ -395,21 +395,32 @@
        /// </summary>
        /// <param name="strWayId"></param>
        /// <param name="row"></param>
        private async void DeleteGateway(string strWayId)
        private void DeleteGateway(string strWayId)
        {
            //删除云端网关
            bool result = await HdlGatewayLogic.Current.DeleteGateway(strWayId);
            if (result == false)
            HdlThreadLogic.Current.RunThread(async () =>
            {
                return;
            }
                //打开进度条
                this.ShowProgressBar();
            if (strWayId == GatewayResourse.AppOldSelectGatewayId)
            {
                HdlGatewayLogic.Current.SaveGatewayIdToLocation(string.Empty);
            }
            //关闭自身
            this.CloseForm();
                //删除云端网关
                bool result = await HdlGatewayLogic.Current.DeleteGateway(strWayId);
                //关闭进度条
                this.CloseProgressBar();
                if (result == false)
                {
                    return;
                }
                if (strWayId == GatewayResourse.AppOldSelectGatewayId)
                {
                    HdlGatewayLogic.Current.SaveGatewayIdToLocation(string.Empty);
                }
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //关闭自身
                    this.CloseForm();
                });
            });
        }
        #endregion