Exemplo n.º 1
0
        public App()
        {
            InitializeComponent();

            if (Device.OS == TargetPlatform.Android || Device.OS == TargetPlatform.iOS)
            {
                MainPage = new MasterDetailContainer();
            }
            else
            {
                MainPage = new RootTabPage();
            }
        }
Exemplo n.º 2
0
        public App()
        {
            InitializeComponent();
            CurrentApp            = this;
            TextResources.Culture = DependencyService.Get <ILocalize>().GetCurrentCultureInfo();
            ImageService.Instance.Initialize(new Configuration {
                FadeAnimationForCachedImages = false
            });

            Debug.WriteLine("^^^ Constructor");
            // var savedState = !string.IsNullOrEmpty(Settings.State) ? JsonConvert.DeserializeObject<ApplicationState>(Settings.State) : GetInitialState();
            var savedState = GetInitialState();

            Store = new Store <ApplicationState>(Reducers.Reducers.ReduceApplication, savedState);

            // _NavPage = savedState.CurrentUser.IsAuthenticated ? new NavigationPage(new MainPage()) : new NavigationPage(new LoginPage());
            MainPage = new RootTabPage();
        }