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

            // The root page of the application
            MainPage = new SplashPage();
        }
Ejemplo n.º 2
0
        async protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Xamarin.Forms.Forms.Init(this, bundle);

            SplashPage splashPage = new SplashPage("@drawable/splash");

            FormsApp formsApp = new FormsApp();

            MXFormsContainer.Initialize(formsApp, formsApp.NavigationPage, (t) => {
                Xamarin.Forms.Device.BeginInvokeOnMainThread(() => {
                    //SetPage(formsApp.NavigationPage);
                });
            });

            MXFormsContainer.AddView <Home>(typeof(HomePage), ViewPerspective.Default);
            MXFormsContainer.AddView <About>(typeof(AboutPage), ViewPerspective.Default);


            await MXFormsContainer.Navigate("Home");


            SetPage(formsApp.NavigationPage);
        }
Ejemplo n.º 3
0
        public App()
        {
            InitializeComponent();

            app = this;
            _AuthenticationService = DependencyService.Get<IAuthenticationService>();

            /* if we were targeting Windows Phone, we'd want to include the next line. */
            // if (Device.OS != TargetPlatform.WinPhone) 
            TextResources.Culture = DependencyService.Get<ILocalize>().GetCurrentCultureInfo();

#if TRY_APP_SERVICE
            // Don't show splash screen for Try App Service version of client
            _AuthenticationService.BypassAuthentication();
            GoToRoot();
#else
            // If the App.IsAuthenticated property is false, modally present the SplashPage.
            if (!_AuthenticationService.IsAuthenticated)
            {
                MainPage = new SplashPage();
            }
            else
            {
                GoToRoot();
            }
#endif
        }
        /// <summary>
        /// Constructor initializes the services we will use throughout the app.
        /// Some of the services are defined as static objects to allow one instance access throughout the app (optional).
        /// You can also use DependencyService.Get<InterfaceForService>(); To get any service in the app.
        ///
        /// </summary>
        public App( )
        {
            InitializeComponent( );

            app = this;
            _authenticationService = DependencyService.Get <IAuthenticationService> ( );

            // Many of the Labels used for the app are stored in a .resx Resource File located in Localization directory.
            // This allows us to not hard code strings such as titles and labels to Views.
            TextResources.Culture = DependencyService.Get <ILocalize>().GetCurrentCultureInfo();


            // TODO: Implement more features to the AuthenticationService. Such as:
            // 1. Save user to shared preference
            // 2. Token authentication etc..
            if (!_authenticationService.IsAuthenticated)
            {
                Debug.WriteLine("Not authenticated! Show Login Page");

                // Display the login SplashPage to authenticate current user. Later on the splash page will be able to save user in shared
                // pref. instead of having to login everytime the app starts.
                MainPage = new SplashPage( );
            }
            else
            {
                // The User is authenticated. We Navigated to the RootPage.
                GoToRoot( );
            }
        }
Ejemplo n.º 5
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Forms.Init ();

            window = new UIWindow (UIScreen.MainScreen.Bounds);

            FormsApp formsApp = new FormsApp();

            var vc = formsApp.NavigationPage.CreateViewController ();
            window.RootViewController = vc;
            window.MakeKeyAndVisible ();

            string splashImage = "Default";

            if (UIScreen.MainScreen.Bounds.Height == 568)
                splashImage = String.Format("{0}-568h", splashImage);

            var splashPage = new SplashPage(splashImage);
            vc.PresentViewController(splashPage.CreateViewController(), false, null);

            MXFormsContainer.Initialize(formsApp, formsApp.NavigationPage, (t)=>{
                this.InvokeOnMainThread(()=>{
                    vc.DismissViewController(true, null);
                });
            });

            MXFormsContainer.AddView<Home>(typeof(HomePage), ViewPerspective.Default);
            MXFormsContainer.AddView<About>(typeof(AboutPage), ViewPerspective.Default);

            MXFormsContainer.Navigate("Home");
            return true;
        }
Ejemplo n.º 6
0
		async protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			Xamarin.Forms.Forms.Init (this, bundle);

			SplashPage splashPage = new SplashPage("@drawable/splash");

			FormsApp formsApp = new FormsApp();

			MXFormsContainer.Initialize(formsApp, formsApp.NavigationPage, (t)=>{
				Xamarin.Forms.Device.BeginInvokeOnMainThread(()=>{
					//SetPage(formsApp.NavigationPage);
				});
			});

			MXFormsContainer.AddView<Home>(typeof(HomePage), ViewPerspective.Default);
			MXFormsContainer.AddView<About>(typeof(AboutPage), ViewPerspective.Default);


			await MXFormsContainer.Navigate("Home");


			SetPage(formsApp.NavigationPage);

		}
Ejemplo n.º 7
0
        public App()
        {
            new MainStyles();
            new LabelStyles();

            MainPage = new SplashPage();
        }
Ejemplo n.º 8
0
        public App()
        {
            InitializeComponent();


            MainPage = new SplashPage();
        }
Ejemplo n.º 9
0
        public App()
        {
            InitializeComponent();
            SubscribeToDisplayAlertMessages();

            // The navigation logic startup needs to diverge per platform in order to meet the UX design requirements
            if (Device.RuntimePlatform == Device.Android)
            {
                // if this is an Android device, set the MainPage to a new SplashPage
                MainPage = new SplashPage();
            }
            else
            {
                // create a new NavigationPage, with a new AcquaintanceListPage set as the Root
                var navPage =
                    new NavigationPage(
                        new AcquaintanceListPage()
                {
                    BindingContext = new AcquaintanceListViewModel(),
                    Title          = "Acquaintances"
                })
                {
                    BarBackgroundColor = Color.FromHex("547799")
                };

                navPage.BarTextColor = Color.White;

                // set the MainPage of the app to the navPage
                MainPage = navPage;
            }
        }
Ejemplo n.º 10
0
        public App()
        {
            InitializeComponent();
            SubscribeToDisplayAlertMessages();

            if (Device.OS == TargetPlatform.Android)
            {
                MainPage = new SplashPage();
            }
            else
            {
                var navPage =
                    new NavigationPage(
                        new AcquaintanceListPage()
                {
                    BindingContext = new AcquaintanceListViewModel(),
                    Title          = "Acquaintances"
                })
                {
                    BarBackgroundColor = Color.FromHex("547799"),
                    BarTextColor       = Color.White
                };

                MainPage = navPage;
            }
        }
Ejemplo n.º 11
0
        public App()
        {
            InitializeComponent();

            app = this;
            _AuthenticationService = DependencyService.Get <IAuthenticationService>();

            CloudService = new AzureCloudService();
            User         = DependencyService.Get <IDevice>().GetIdentifier();

            /* if we were targeting Windows Phone, we'd want to include the next line. */
            // if (Device.OS != TargetPlatform.WinPhone)
            TextResources.Culture = DependencyService.Get <ILocalize>().GetCurrentCultureInfo();


            // If the App.IsAuthenticated property is false, modally present the SplashPage.
            if (!_AuthenticationService.IsAuthenticated)
            {
                MainPage = new SplashPage();
            }
            else
            {
                GoToRoot();
            }
        }
Ejemplo n.º 12
0
        public void splashPage_logIn()
        {
            var agent     = ConfigurationManager.AppSettings["Browser"];
            var cbtapi    = new CBTApi();
            var sessionId = ((RemoteWebDriver)Driver.Instance).SessionId.ToString();
            var caps      = new DesiredCapabilities();

            if (agent == "Remote_CBT")
            {
                try
                {
                    caps.SetCapability("name", "Club Automation Test: splashPage_logIn");
                    caps.SetCapability("build", "TestCase #");

                    SplashPage.GoTo();
                    SplashPage.AssertPageTitle();
                    SplashPage.EnterUsername();
                    SplashPage.EnterPassword();
                    cbtapi.takeSnapshot(sessionId);
                    SplashPage.ClickLoginBtn();
                    LocationSelector.SelectLocation();
                    LocationSelector.SelectPos();
                    LocationSelector.ClickSelect();
                    DashboardPage.AssertLoggedUserName();
                    cbtapi.takeSnapshot(sessionId);
                    log.InfoFormat($"{TestContext.TestName} - Test Passed");
                    cbtapi.setScore(sessionId, "Pass");
                }
                catch (Exception e)
                {
                    var snapshotHash = cbtapi.takeSnapshot(sessionId);
                    cbtapi.setDescription(sessionId, snapshotHash, e.ToString());
                    cbtapi.setScore(sessionId, "Fail");
                    log.ErrorFormat($"{TestContext.TestName} - Test Failed", e.Message, e.StackTrace);
                    throw;
                }
            }
            else
            {
                try
                {
                    SplashPage.GoTo();
                    SplashPage.AssertPageTitle();
                    SplashPage.EnterUsername();
                    SplashPage.EnterPassword();
                    SplashPage.ClickLoginBtn();
                    LocationSelector.SelectLocation();
                    LocationSelector.SelectPos();
                    LocationSelector.ClickSelect();
                    DashboardPage.AssertLoggedUserName();
                    log.InfoFormat($"{TestContext.TestName} - Test Passed");
                }
                catch (Exception e)
                {
                    log.ErrorFormat($"{TestContext.TestName} - Test Failed", e.Message, e.StackTrace);
                    throw;
                }
            }
        }
Ejemplo n.º 13
0
        public async Task <INavigationResult> NavigateToSplashAsync(Destination destination, INavigationParameters navigationParameters)
        {
            LoggerService.Info($"Destination: {destination}");

            var navigationParams = SplashPage.BuildNavigationParams(destination, navigationParameters);

            return(await NavigationService.NavigateAsync(Destination.SplashPage.ToPath(), navigationParams));
        }
Ejemplo n.º 14
0
        protected override async void OnInitialized()
        {
            InitializeComponent();

            var splashPage = new SplashPage();

            Current.MainPage = splashPage;
        }
Ejemplo n.º 15
0
        protected override void Init()
        {
            MDP = this;

            Flyout = new Page {
                Title = "Flyout"
            };
            Detail = new SplashPage();
        }
Ejemplo n.º 16
0
        protected override void Init()
        {
            MDP = this;

            Master = new Page {
                Title = "Master"
            };
            Detail = new SplashPage();
        }
Ejemplo n.º 17
0
        public App()
        {
            //Valores default
            App.SportTitle       = "Fútbol";
            App.SportNumber      = 5;
            App.StatusDisciplina = 2;
            App.tipoCompetencia  = 2;

            MainPage = new SplashPage();
        }
Ejemplo n.º 18
0
 public App()
 {
     InitializeComponent();
     OneSignal.Current.StartInit("1126a3d0-1d80-42ee-94db-d0449ac0a62c")
     .InFocusDisplaying(OSInFocusDisplayOption.None)
     .HandleNotificationReceived(OnNotificationRecevied)
     .HandleNotificationOpened(OnNotificationOpened)
     .EndInit();
     MainPage = new SplashPage();
 }
    protected override async void OnStart()
    {
        // show the splash
        MainPage = new SplashPage();
        // simple wait or initialize some services
        await Task.Delay(2000);

        // show the real page
        MainPage = new NavigationPage(new TabbedPageContainer());
    }
Ejemplo n.º 20
0
        public MainPage()
        {
            InitializeComponent();
            splash       = new SplashPage(this);
            mainPageView = new MainPageView();
            Navigation.PushAsync(splash);
            Navigation.InsertPageBefore(mainPageView, splash);

            MessagingCenter.Subscribe <AppEventMesseges>(this, AppEventMesseges.Resumed,
                                                         async _ => await vc.SwitchView(vc.CurrentView, true, false, null));
        }
Ejemplo n.º 21
0
        public App()
        {
            InitializeComponent();

            Device.SetFlags(new[]
            {
                "SwipeView_Experimental",
                "IndicatorView_Experimental"
            });

            MainPage = new SplashPage();
        }
Ejemplo n.º 22
0
        public App()
        {
            InitializeComponent();

            //Application.Current.Resources["PrimaryColor"] = Color.FromHex("#fb2056");

            CrossFirebasePushNotification.Current.Subscribe("media" + AppKey);
            CrossFirebasePushNotification.Current.Subscribe("feed" + AppKey);

            // Token event
            CrossFirebasePushNotification.Current.OnTokenRefresh += (s, p) =>
            {
                System.Diagnostics.Debug.WriteLine($"TOKEN : {p.Token}");
            };
            // Push message received event
            CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) =>
            {
                System.Diagnostics.Debug.WriteLine("Received");
            };
            //Push message received event
            //CrossFirebasePushNotification.Current.OnNotificationOpened += (s, p) =>
            //{
            //    System.Diagnostics.Debug.WriteLine("Opened");
            //    foreach (var data in p.Data)
            //    {
            //        System.Diagnostics.Debug.WriteLine($"{data.Key} : {data.Value}");
            //    }

            //};

            MainPage = new SplashPage();

            CrossFirebasePushNotification.Current.OnNotificationOpened += (s, p) =>
            {
                var pagefrompush  = p.Data["page"].ToString();
                var pushtitle     = p.Data["pushtitle"].ToString();
                var pushdat       = p.Data["pushpath"].ToString();
                var pushdet       = p.Data["pushdetails"].ToString();
                var pushothers    = "";
                var pushimagelink = p.Data["pushimagelink"].ToString();

                if (p.Data["pushothers"] != null)
                {
                    pushothers = p.Data["pushothers"].ToString();
                }
                ;

                MainPage = new MediaPage(pagefrompush, pushtitle, pushdat, pushdet, pushothers, pushimagelink);
            };


            MessagingCenter.Send <App>(this, "loadFeed");
        }
Ejemplo n.º 23
0
        /// <summary>
        /// Wird aufgerufen, wenn die Anwendung durch den Endbenutzer normal gestartet wird. Weitere Einstiegspunkte
        /// werden z. B. verwendet, wenn die Anwendung gestartet wird, um eine bestimmte Datei zu öffnen.
        /// </summary>
        /// <param name="e">Details über Startanforderung und -prozess.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            #if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.DebugSettings.EnableFrameRateCounter = true;
            }
            #endif
            Frame rootFrame = Window.Current.Content as Frame;

            // App-Initialisierung nicht wiederholen, wenn das Fenster bereits Inhalte enthält.
            // Nur sicherstellen, dass das Fenster aktiv ist.
            if (rootFrame == null)
            {
                // Frame erstellen, der als Navigationskontext fungiert und zum Parameter der ersten Seite navigieren
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;
                rootFrame.Navigated += OnNavigated;

                if (e.PreviousExecutionState != ApplicationExecutionState.Running)
                {
                    var extendedSplash = new SplashPage(e.SplashScreen);
                    rootFrame.Content = extendedSplash;
                }

                // Den Frame im aktuellen Fenster platzieren
                Window.Current.Content = rootFrame;

                // Register a handler for BackRequested events and set the
                // visibility of the Back button
                SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;

                SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility =
                    rootFrame.CanGoBack ?
                    AppViewBackButtonVisibility.Visible :
                    AppViewBackButtonVisibility.Collapsed;
            }

            if (e.PrelaunchActivated == false)
            {
                if (rootFrame.Content == null)
                {
                    // Wenn der Navigationsstapel nicht wiederhergestellt wird, zur ersten Seite navigieren
                    // und die neue Seite konfigurieren, indem die erforderlichen Informationen als Navigationsparameter
                    // übergeben werden
                    rootFrame.Navigate(typeof(MainPage), e.Arguments);
                }

                // Sicherstellen, dass das aktuelle Fenster aktiv ist
                Window.Current.Activate();
            }
        }
Ejemplo n.º 24
0
        void ShowSplash()
        {
            // Create the window
            var repository = ServerRepository.Instance;
            var server     = repository.Source;

            server.ConnectAsync().Wait(3000);
            CustomContainer.Register(server);
            CustomContainer.Register(repository);

            var textToDisplay = Warewolf.Studio.Resources.Languages.Core.StandardStyling.Replace("\r\n", "") +
                                Warewolf.Studio.Resources.Languages.HelpText.WarewolfDefaultHelpDescription +
                                Warewolf.Studio.Resources.Languages.Core.StandardBodyParagraphClosing;

            CustomContainer.Register <IEventAggregator>(new EventAggregator());
            CustomContainer.Register <IPopupController>(new PopupController());
            CustomContainer.Register <IAsyncWorker>(new AsyncWorker());
            CustomContainer.Register <IExplorerTooltips>(new ExplorerTooltips());
            CustomContainer.Register <IWarewolfWebClient>(new WarewolfWebClient(new WebClient {
                Credentials = CredentialCache.DefaultCredentials
            }));
            CustomContainer.Register <IActivityParser>(new ActivityParser());
            CustomContainer.Register <IServiceDifferenceParser>(new ServiceDifferenceParser());

            var toolBoxViewModel = new ToolboxViewModel(new ToolboxModel(server, server, null), new ToolboxModel(server, server, null));

            CustomContainer.Register <IToolboxViewModel>(toolBoxViewModel);

            var helpViewModel = new HelpWindowViewModel(new HelpDescriptorViewModel(new HelpDescriptor("", textToDisplay, null)), new HelpModel(new EventAggregator()));

            CustomContainer.Register <IHelpWindowViewModel>(helpViewModel);

            CustomContainer.RegisterInstancePerRequestType <IRequestServiceNameView>(() => new RequestServiceNameView());
            CustomContainer.RegisterInstancePerRequestType <IJsonObjectsView>(() => new JsonObjectsView());
            CustomContainer.RegisterInstancePerRequestType <IChooseDLLView>(() => new ChooseDLLView());
            CustomContainer.RegisterInstancePerRequestType <IFileChooserView>(() => new FileChooserView());

            var splashViewModel = new SplashViewModel(server, new ExternalProcessExecutor());

            var splashPage = new SplashPage {
                DataContext = splashViewModel
            };

            SplashView = splashPage;
            // Show it
            SplashView.Show(false);

            _resetSplashCreated?.Set();
            splashViewModel.ShowServerStudioVersion();
            Dispatcher.Run();
        }
Ejemplo n.º 25
0
 public App()
 {
     InitializeComponent();
     MainPage = new SplashPage();
     if (Properties.ContainsKey("Email"))
     {
         AutoLoginUser();
     }
     else
     {
         MainPage = new NavigationPage(new LoginPage());
     }
     //MainPage = new AdsTest();
 }
Ejemplo n.º 26
0
        public App( )
        {
            app = this;
            _authenticationService = DependencyService.Get <IAuthenticationService>();

            if (!_authenticationService.IsAuthenticated)
            {
                MainPage = new SplashPage();
            }
            else
            {
                GoToRoot();
            }
        }
Ejemplo n.º 27
0
        /// <summary>
        ///     Invoked when the application is launched normally by the end user.  Other entry points
        ///     will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
#if DEBUG
            if (Debugger.IsAttached)
            {
                DebugSettings.EnableFrameRateCounter = true;
            }
#endif
            var rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Init a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                //  Display an extended splash screen if app was not previously running.
                if (e.PreviousExecutionState != ApplicationExecutionState.Running)
                {
                    var extendedSplash = new SplashPage(e.SplashScreen);
                    rootFrame.Content      = extendedSplash;
                    Window.Current.Content = rootFrame;
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (e.PrelaunchActivated)
            {
                return;
            }
            if (rootFrame.Content == null)
            {
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }
            // Ensure the current window is active
            Window.Current.Activate();

            // 设置透明TitleBar
            TitleBarHelper.SetTransparentTitleBar();
        }
Ejemplo n.º 28
0
        private void FadeOutCompleted(object sender, EventArgs e)
        {
            (sender as AnimationClock).Completed -= FadeOutCompleted;

            _allowDirectNavigation = true;
            this.IsHitTestVisible  = true;

            SplashPage.NavigationService.Navigate(_navArgs.Content);

            SplashPage.Dispatcher.BeginInvoke(DispatcherPriority.Loaded,
                                              (ThreadStart) delegate()
            {
                DoubleAnimation da = new DoubleAnimation(1.0d, new Duration(TimeSpan.FromMilliseconds(200)));
                SplashPage.BeginAnimation(OpacityProperty, da);
            });
        }
Ejemplo n.º 29
0
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            ExtendAcrylicIntoTitleBar();

            if (e.PrelaunchActivated == false)
            {
                if (rootFrame.Content == null)
                {
                    if (e.PreviousExecutionState != ApplicationExecutionState.Running)
                    {
                        bool       loadState      = (e.PreviousExecutionState == ApplicationExecutionState.Terminated);
                        SplashPage extendedSplash = new SplashPage(e.SplashScreen, loadState);
                        Window.Current.Content = extendedSplash;
                        Window.Current.Activate();
                        return;
                    }

                    // When the navigation stack isn't restored navigate to the first page,
                    // configuring the new page by passing required information as a navigation
                    // parameter
                    rootFrame.Navigate(typeof(MainPage), e.Arguments);
                }
                // Ensure the current window is active
                Window.Current.Activate();
            }
        }
Ejemplo n.º 30
0
        public App()
        {
            InitializeComponent();

            app = this;
            _AuthenticationService = DependencyService.Get <IAuthenticationService>();

            // If the App.IsAuthenticated property is false, modally present the SplashPage.
            if (!_AuthenticationService.IsAuthenticated)
            {
                MainPage = new SplashPage();
            }
            else
            {
                GoToRoot();
            }
        }
Ejemplo n.º 31
0
 public App()
 {
     // sprawdzenie platformy
     if (Device.OS == TargetPlatform.Android)
     {
         MainPage = new SplashPage();
     }
     else
     {
         // strona główna aplikacji
         var navPage = new NavigationPage(new WalksPage()
         {
             Title = "Track My Walks"
         });
         MainPage = navPage;
     }
 }
Ejemplo n.º 32
0
        /// <summary>
        /// Initialize the plugin, called once after the DLL is loaded into GREET
        /// </summary>
        /// <param name="controler"></param>
        /// <returns></returns>
        //This is where the plugin actually gets called into GREET, so you make things that you can call here and they will show up
        public override bool InitializePlugin(IGREETController controler)
        {
            //init the controller that is used to send action and data requests to GREET
            ResultsAccess.controler = controler;

            //init menu items collection for this example (The text here is what will come up in the GREET model itself)
            ToolStripMenuItem read = new ToolStripMenuItem("TEAMS");

            read.Click += (s, e) =>
            {
                //generates and displays the splashpage form when the plugin is opened.
                SplashPage te = new SplashPage();
                te.Show();
            };
            this.items[0] = read;

            return(true);
        }
Ejemplo n.º 33
0
        //public event PageCreated PageCreatedEvent;

        /// <summary>
        /// Constructor initialize the caching pages list
        /// </summary>
        private PageManager()
        {
            try
            {
                var api = DependencyService.Get <IPlatformAPI>();
                if (api != null)
                {
                    api.UpdateStatusBar("#F8EBE3", false);
                }

                _pageMain = new StackPagesContainerPage();
                Application.Current.MainPage = _pageMain;
                if (Xamarin.Forms.Device.RuntimePlatform == Xamarin.Forms.Device.iOS)
                {
                    _pageMain.BackgroundColor = Color.FromHex("#F8EBE3");
                    _splashPage = new SplashPage();
                    _pageMain.Children.Add(_splashPage);
                }

                //_cachePages.Enqueue(typeof(PumpSessionPage));
                //_cachePages.Enqueue(typeof(BottleFeedSelectionPage));
                //_cachePages.Enqueue(typeof(NurseSessionSelectionPage));
                //_cachePages.Enqueue(typeof(SelectSpeedPage));
                //_cachePages.Enqueue(typeof(EnterOtherInfoPage));
                //_cachePages.Enqueue(typeof(RemindersPage));
                //_cachePages.Enqueue(typeof(CreateReminderTypePage));
                //_cachePages.Enqueue(typeof(CreateReminderPage));
                //_cachePages.Enqueue(typeof(SettingsPage));
                //_cachePages.Enqueue(typeof(MyPumpsPage));
                //_cachePages.Enqueue(typeof(PumpDetailPage));
                //_cachePages.Enqueue(typeof(BottleFeedStartPage));
                //_cachePages.Enqueue(typeof(NurseSessionStartPage));
                //_cachePages.Enqueue(typeof(MyInventoryPage));
                //_cachePages.Enqueue(typeof(ProfilePage));
                //_cachePages.Enqueue(typeof(BluetoothPumpDetectedPage));
                //_cachePages.Enqueue(typeof(BluetoothPumpSetupPage));
            }
            catch (Exception ex)
            {
                Debugger.Break();
                throw;
            }
        }
Ejemplo n.º 34
0
        public App()
        {
            InitializeComponent();

            MainPage = new SplashPage();

            /* var _task = StartedPage();
             *
             *
             * if (!_task)
             * {
             *   MainPage = new LoginPage();
             * }
             * else
             * {
             *  // MainPage = new MyTabbedPage();
             *   MainPage = new NavigationPage(new MyTabbedPage());
             * }*/
        }
Ejemplo n.º 35
0
        public App()
        {
            app = this;
            _AuthenticationService = DependencyService.Get<IAuthenticationService>();

            /* if we were targeting Windows Phone, we'd want to include the next line. */
            // if (Device.OS != TargetPlatform.WinPhone) 
            TextResources.Culture = DependencyService.Get<ILocalize>().GetCurrentCultureInfo();


            // If the App.IsAuthenticated property is false, modally present the SplashPage.
            if (!_AuthenticationService.IsAuthenticated)
            {
                MainPage = new SplashPage();
            }
            else
            {
                GoToRoot();
            }

        }