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

            MainPage = new LoadingPage();

            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(AceMobileAppTemplate.Mobile.Properties.Resources.SYNCFUSION_LICENSE);

            InitServices();

            try
            {
                Container.Resolve <IDatabaseManager>().Authenticate();
            }
            catch (Exception e)
            {
                MainPage.DisplayAlert("Error", "There was an error authenticating with the server: " + e.Message, "Close");
                Quit();
            }

            if (CrossSettings.Current.GetValueOrDefault("Username", "_") != "_")
            {
                AutoLogin();
            }
            else
            {
                MainPage = new LoginPage();
            }
        }