1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-03 17:13:50 +00:00

initial commit

This commit is contained in:
Kyle Spearrin
2016-05-02 02:52:09 -04:00
commit bc3d9c4465
95 changed files with 9245 additions and 0 deletions

55
src/App/App.cs Normal file
View File

@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bit.App.Abstractions;
using Bit.App.Views;
using Xamarin.Forms;
namespace Bit.App
{
public class App : Application
{
private readonly IDatabaseService _databaseService;
public App(IAuthService authService, IDatabaseService databaseService)
{
_databaseService = databaseService;
if(authService.IsAuthenticated)
{
var nav = new NavigationPage(new VaultListPage());
nav.BarBackgroundColor = Color.FromHex("3c8dbc");
nav.BarTextColor = Color.FromHex("ffffff");
MainPage = nav;
}
else
{
var nav = new NavigationPage(new LoginPage());
nav.BarBackgroundColor = Color.FromHex("3c8dbc");
nav.BarTextColor = Color.FromHex("ffffff");
MainPage = nav;
}
MainPage.BackgroundColor = Color.FromHex("ecf0f5");
}
protected override void OnStart()
{
// Handle when your app starts
_databaseService.CreateTables();
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
}