using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using System.IO;
using MobileApp.Views;

namespace MobileApp
{
    public partial class App : Application
    {
        public static string _RefCountryId { get; set; }
        public static string _RefDestinationId { get; set; }
        public static string _RefRestaurantId { get; set; }
        public static string _RefPoiId { get; set; }

        public App()
        {
            InitializeComponent();
            OnStart();
        }

        protected void Load()
        {
            
            
            if (Functions._IsOnline() == true)
            {
                MainPage = new MobileApp.MainPage();
            }
            else
            {
                MainPage = new MobileApp.Views.HomeError();
            }
        }
        protected override void OnStart()
        {
            Load();
        }

        protected override void OnSleep()
       {
            // Handle when your app sleeps
        }

        protected override void OnResume()
        {
            // Handle when your app resumes
        }
    }
}
