| | |
| | | /// </summary> |
| | | public static void CheckLinkRemote (int status) |
| | | { |
| | | if (isConnectiong) { |
| | | return; |
| | | } |
| | | isConnectiong = true; |
| | | //if (isConnectiong) { |
| | | // return; |
| | | //} |
| | | //isConnectiong = true; |
| | | UserConfig.Instance.internetStatus = status; |
| | | #if wallon |
| | | return; |
| | |
| | | if (status == 0) { |
| | | Application.RunOnMainThread (() => { |
| | | MainPage.AddTip (Language.StringByID (R.MyInternationalizationString.InternetStatusTip)); |
| | | UserMiddle.LinkStatusTip.BackgroundColor = SkinStyle.Current.DelColor; |
| | | MainPage.WiFiStatus = "CrabtreeAdd/WiFiUnlink.png"; |
| | | UserMiddle.btnLinkStatus.UnSelectedImagePath = MainPage.WiFiStatus; |
| | | }); |
| | | } else { |
| | | if (MainPage.LoginUser == null || !MainPage.LoginUser.IsLogin) { |
| | | return; |
| | | } |
| | | Application.RunOnMainThread (() => { |
| | | if (UserMiddle.LinkStatusTip.BackgroundColor == SkinStyle.Current.DelColor) { |
| | | UserMiddle.LinkStatusTip.BackgroundColor = SkinStyle.Current.MainColor; |
| | | } |
| | | }); |
| | | //Application.RunOnMainThread (() => { |
| | | // if (UserMiddle.LinkStatusTip.BackgroundColor == SkinStyle.Current.DelColor) { |
| | | // UserMiddle.LinkStatusTip.BackgroundColor = SkinStyle.Current.MainColor; |
| | | // } |
| | | //}); |
| | | var localFileList = IO.FileUtils.ReadFiles (); |
| | | var gateWayList = localFileList.FindAll ((obj) => { |
| | | return (obj.StartsWith ("Equipment_")) && ( |
| | |
| | | return; |
| | | } |
| | | Application.RunOnMainThread (() => { |
| | | UserMiddle.LinkStatusTip.BackgroundColor = SkinStyle.Current.LinkStatusTipColor; |
| | | MainPage.WiFiStatus = "CrabtreeAdd/WiFi.png"; |
| | | UserMiddle.btnLinkStatus.UnSelectedImagePath = MainPage.WiFiStatus; |
| | | MainPage.Loading.Hide (); |
| | | }); |
| | | Shared.SimpleControl.Phone.UserMiddle.ReadAllDeviceStatus (); |