| | |
| | | /// <param name="pageShowEvent">主页显示之后触发的事件(没有住宅的话,则不会触发)</param> |
| | | public static void GoUserPage(bool downloadData , bool isFirstOpen = false, Action pageShowEvent = null) |
| | | { |
| | | //加载Loading效果 |
| | | var waitPage = new Loading(); |
| | | BaseView.AddChidren(waitPage); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | |
| | | //当没有住宅时,不能让它往下走 |
| | | if (UserInfo.Current.regionList.Count == 0) |
| | | { |
| | | waitPage.Hide(); |
| | | var addResidencePage = new BindingResidencePage(); |
| | | BaseView.AddChidren(addResidencePage); |
| | | addResidencePage.LoadView(); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | Entity.FunctionList.List.Clear(); |
| | | Entity.SpatialInfo.CurrentSpatial.Clear(); |
| | | ///等待获取住宅信息 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | waitPage.RemoveFromParent(); |
| | | BaseView.RemoveAll(); |
| | | #region 后退事件 |
| | | BasePageView = new PageLayout(); |
| | | BasePageView.ScrollEnabled = false; |
| | | BasePageView.IsShowPoint = false; |
| | |
| | | { |
| | | Log($"后退事件异常:{ex.Message}"); |
| | | } |
| | | //while (e < BasePageView.ChildrenCount - 1) |
| | | //{ |
| | | // BasePageView.GetChildren(BasePageView.ChildrenCount - 1).RemoveFromParent(); |
| | | //} |
| | | }; |
| | | BaseView.AddChidren(BasePageView); |
| | | |
| | | var backView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(100), |
| | |
| | | return; |
| | | } |
| | | MainPage.Log($"move:{e.X}"); |
| | | if (StartX == 0 && e.X < 30) { |
| | | if (StartX == 0 && e.X < 30) |
| | | { |
| | | StartX = (int)e.X; |
| | | } |
| | | if (StartX < 30 ) |
| | |
| | | } |
| | | } |
| | | }; |
| | | #endregion |
| | | |
| | | |
| | | |
| | | if (NoLoginMode) |
| | | { |
| | | //跳转页面---- |
| | | var UserBasePage = new UserPage(); |
| | | BasePageView.AddChidren(UserBasePage); |
| | | UserBasePage.LoadPage(); |
| | | BasePageView.PageIndex = 0; |
| | | |
| | | return; |
| | | } |
| | | |
| | | //加载Loading效果 |
| | | var waitPage = new Loading(); |
| | | BaseView.AddChidren(waitPage); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | |
| | | //当没有住宅时,不能让它往下走 |
| | | if (UserInfo.Current.regionList.Count == 0) |
| | | { |
| | | waitPage.Hide(); |
| | | var addResidencePage = new BindingResidencePage(); |
| | | BaseView.AddChidren(addResidencePage); |
| | | addResidencePage.LoadView(); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | Entity.FunctionList.List.Clear(); |
| | | Entity.SpatialInfo.CurrentSpatial.Clear(); |
| | | ///等待获取住宅信息 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | waitPage.RemoveFromParent(); |
| | | |
| | | //跳转页面---- |
| | | var UserBasePage = new UserPage(); |
| | | BasePageView.AddChidren(UserBasePage); |
| | | UserBasePage.LoadPage(); |
| | | BasePageView.PageIndex = 0; |
| | | |
| | | if (isFirstOpen) |
| | | { |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | |
| | | |
| | | if (downloadData) |
| | | { |
| | | ///初始化app数据 |
| | | Common.ApiUtlis.Ins.DownloadData(); |
| | | }; |
| | | |
| | | |
| | | |
| | | }); |
| | | } |
| | | }).Start(); |