public App(IFileRepository fileRepository, IExternalBrowserService externalBrowserService) { var service = new PageService(new WikiStorage(fileRepository), new HtmlWrapper(fileRepository), new MarkdownImpl()); _applicationEvents = new ApplicationEvents(); try { fileRepository.StorageDirectory = PersistedState.CustomStorageDirectory; } catch { //can't do much about it now. } PageFactory.Initialize(service, fileRepository, externalBrowserService, _applicationEvents); SyncBootstrapper.RefreshDropboxSync(fileRepository); SyncBootstrapper.RefreshFromSyncInterval(); MainPage = new NavigationPage(PageFactory.Current.CreateEmaWikiPage()); }
private void SetSyncInterval(int interval) { PersistedState.SyncInterval = interval; SyncBootstrapper.RefreshFromSyncInterval(); }