Beispiel #1
0
        public App(string dbPath)
        {
            DBContext = new ImagicianDatabaseContext(dbPath);
            DBContext.Database.EnsureDeleted();
            DBContext.Database.EnsureCreated();

            InitializeComponent();
            DependencyService.Register <IDatabaseService, ImagicianService>();
            DependencyService.Register <ILogService, LogService>();
            DependencyService.Register <ISettingsService, SettingsService>();
            DependencyService.Register <IFolderService, FolderItemService>();
            DependencyService.Register <IImageService, ImageService>();
            var root = new MasterDetailPage()
            {
                BindingContext = new ImagicianPageViewModel(),
                Master         = new ImagicianPage(),
                Detail         = new ImageDetailPage()
            };

            //MainPage = new NavigationPage(new FolderDetailPage()) { BindingContext = new ImagicianPageViewModel() };
            MainPage = root;
        }
Beispiel #2
0
 public ImagicianService()
 {
     _context = App.DBContext;
 }