public App(string dbPath)
        {
            InitializeComponent();

            PlannerRepository = new PlannerRepository(dbPath);

            MainPage = new MainPage();
        }
Example #2
0
        protected override void OnStart()
        {
            PlannerRepository = new PlannerRepository(this.dbPath);
            LoginRepository   = new LoginRepository(this.dbPath);

            // loads fake student data
            FakeData.CreateFakeStudent.CreateStudentData();

            // if user exists go to login, else go to registration
            if (LoginRepository.UserExistsState)
            {
                MainPage = new Login();
            }
            else
            {
                MainPage = new Registration();
            }
        }