| | |
| | | /// 变更网络时的事件
|
| | | /// </summary>
|
| | | private string changedNetworkTime = string.Empty;
|
| | | /// <summary> |
| | | /// 当前 wifi 的 |
| | | /// <summary>
|
| | | /// 当前 wifi 的
|
| | | /// </summary>
|
| | | private string oldSsid = string.Empty;
|
| | |
|
| | |
| | | /// <param name="value">0:没有网络 1:4G 2:wifi</param>
|
| | | public void NetworkStateChanged(int value)
|
| | | {
|
| | | if(Common.Config.Instance.HomeId==string.Empty) |
| | | { |
| | | //在登录界面不处理 |
| | | return; |
| | | } |
| | | if (Common.Config.Instance.HomeId == string.Empty)
|
| | | {
|
| | | //在登录界面不处理
|
| | | return;
|
| | | }
|
| | | #if iOS
|
| | | var nowSsid = this.SSID;
|
| | | if (this.oldSsid == nowSsid) |
| | | { |
| | | //如果当前 wifi 的名字一样,则不处理 |
| | | return; |
| | | if (this.oldSsid == nowSsid)
|
| | | {
|
| | | //如果当前 wifi 的名字一样,则不处理
|
| | | ZigBee.Common.Application.FindGateWaySocket.Start();
|
| | | return;
|
| | | }
|
| | | this.oldSsid = nowSsid; |
| | | this.oldSsid = nowSsid;
|
| | | #endif
|
| | | |
| | | //没有网络 |
| | | //没有网络
|
| | | if (value == 0)
|
| | | {
|
| | | this.CanAccessHttp = false;
|