private void ProcessControl(MobileContentPage page, MobileContentScreen screen, BaseControl control) { //create control //View //initalize controls IView view = GetView(page, screen, control); ViewHelper.SetupView(page, screen, control, view); view.Init(); this.Content = view.GetView(); }
public static IMobilePage GetPage(string pageName) { IMobilePage retVal = null; MobileScreen screen = MobileScreen.GetByName(pageName); switch (screen.Type.ToLower()) { case "mobilecontent": retVal = new MobileContentPage(screen); break; case "mobiletabbed": retVal = new MobileTabbedPage(screen); break; case "mobilenavigation": Page root = GetPage(((MobileNavigationScreen)screen).GetRootScreen()).GetPage(); retVal = new MobileNavigationPage(screen, root); break; } if (retVal != null) { string loginScreen = Configuration.GetInstance().App.LoginScreen; if (!String.IsNullOrEmpty(loginScreen)) { if (retVal.Screen != null) { if (retVal.Screen.RequireAuthentication) { UserIdentityService identity = UserIdentityService.GetInstance(); string userName = identity.IdentityProvider.GetUserName(); if (String.IsNullOrEmpty(userName)) { retVal = GetPage(loginScreen); } } } } } return(retVal); }