| | |
| | | |
| | | BaseActivity.BackKeyAction = () => { |
| | | if (Shared.SimpleControl.MainPage.Loading != null) { |
| | | Console.WriteLine (MainPage.Loading.CurStatus); |
| | | Utlis.WriteLine (MainPage.Loading.CurStatus); |
| | | if (Shared.SimpleControl.MainPage.Loading.CurStatus) { |
| | | Shared.SimpleControl.MainPage.Loading.Hide (); |
| | | return; |
| | |
| | | //if(BaseActivity.VerifyDateTime == DateTime.MaxValue) { } else |
| | | try { |
| | | var lastView = Shared.Application.MainPage.GetChildren (Shared.Application.MainPage.ChildrenCount - 1); |
| | | Console.WriteLine ("lastView " + lastView); |
| | | Utlis.WriteLine ("lastView " + lastView); |
| | | if (MainPage.Loading.CurStatus) { |
| | | return; |
| | | } |
| | |
| | | BaseActivity.VerifyDateTime = DateTime.MaxValue; |
| | | return; |
| | | } else { |
| | | Console.WriteLine ("Remove Dialog!!!!"); |
| | | Utlis.WriteLine ("Remove Dialog!!!!"); |
| | | var lastView2 = Shared.Application.MainPage.GetChildren (Shared.Application.MainPage.ChildrenCount - 2); |
| | | lastView.RemoveFromParent (); |
| | | lastView2.RemoveFromParent (); |
| | | Console.WriteLine ("Remove Dialog End!!!!"); |
| | | Utlis.WriteLine ("Remove Dialog End!!!!"); |
| | | BaseActivity.VerifyDateTime = DateTime.MinValue; |
| | | return; |
| | | } |
| | | } |
| | | } catch (System.Exception ezx) { |
| | | Console.WriteLine (ezx.Message); |
| | | Utlis.WriteLine (ezx.Message); |
| | | } |
| | | if (SharedMethod.SharedMethod.CurPageLayout != null) { |
| | | if (SharedMethod.SharedMethod.CurPageLayout.ChildrenCount > 1) { |
| | | Console.WriteLine ("Remove PageLayout Children!!!!"); |
| | | Utlis.WriteLine ("Remove PageLayout Children!!!!"); |
| | | SharedMethod.SharedMethod.CurPageLayout.GetChildren (SharedMethod.SharedMethod.CurPageLayout.ChildrenCount - 1).RemoveFromParent (); |
| | | Console.WriteLine ("Remove PageLayout Children End!!!!"); |
| | | Utlis.WriteLine ("Remove PageLayout Children End!!!!"); |
| | | BaseActivity.VerifyDateTime = DateTime.MinValue; |
| | | } else { |
| | | Console.WriteLine ("BaseActivity.VerifyDateTime = DateTime.MaxValue"); |
| | | Utlis.WriteLine ("BaseActivity.VerifyDateTime = DateTime.MaxValue"); |
| | | BaseActivity.VerifyDateTime = DateTime.MaxValue; |
| | | } |
| | | } |
| | |
| | | UserConfig.Instance.SaveUserConfig (); |
| | | } |
| | | BaseActivity.NetworkStateChanged += (int obj) => { |
| | | Console.WriteLine ("NetworkStateChanged " + obj); |
| | | Utlis.WriteLine ("NetworkStateChanged " + obj); |
| | | UserConfig.Instance.internetStatus = obj; |
| | | UserConfig.Instance.SaveUserConfig (); |
| | | //网络变化通知 |
| | |
| | | |
| | | IsShowTip = true; |
| | | var status = isNetworkAvailable (this); |
| | | Console.WriteLine ("status!!!" + status); |
| | | Utlis.WriteLine ("status!!!" + status); |
| | | int internetStatus = 0; |
| | | if (status) { |
| | | var isWifi = isWifiConnected (this); |
| | |
| | | internetStatus = 1; |
| | | } |
| | | } |
| | | Console.WriteLine (""); |
| | | Utlis.WriteLine (""); |
| | | Shared.SimpleControl.EquipmentPublicClass.CheckLinkRemote (internetStatus, false); |
| | | } |
| | | |