protected override void Initialize(Frame rootFrame, Dictionary<string, Type> views, Dictionary<string, Type> dialogs) { base.Initialize(rootFrame, views, dialogs); _storageService = new StorageService(FileSystem.Current.LocalStorage.Path); _settingsService = new SettingsService(); _collectionStorageService = new SqliteCollectionStorageService(new SQLitePlatformWinRT()); RegisterInstance<INavigationService>(new NavigationService(rootFrame,views)); RegisterInstance<IEmailService>(new EmailService()); RegisterInstance<IResourceService>(new ResourceService()); RegisterInstance<IEmailService>(new EmailService()); //RegisterInstance<IInstallVoiceSynthesisService>(new InstallVoiceSynthesisService()); RegisterInstance<IScreenService>(new ScreenService()); RegisterInstance<IFontService>(new FontService()); RegisterInstance<IMediaService>(new MediaService()); RegisterInstance<IPopupService>(new PopupService()); RegisterInstance<ICopyPasteService>(new CopyPasteService()); RegisterInstance<ITextToSpeechService>(new TextToSpeechService()); RegisterInstance<IStorageService>(_storageService); RegisterInstance<ISettingsService>(_settingsService); RegisterInstance<IXmlService>(new XmlService()); RegisterInstance<ICollectionStorageService>(_collectionStorageService); InitializeAsync(); }
protected override void Initialize() { base.Initialize(); ViewModelsLocator.Initialize(this); _storageService = new StorageService(Environment.ExternalStorageDirectory.Path); _settingsService = new SettingsService(); _collectionStorageService = new SqliteCollectionStorageService(new SQLitePlatformAndroid()); _initializationStateService = new InitializationStateService(2); RegisterInstance<IInitializationStateService>(_initializationStateService); RegisterInstance<IResourceService>(new ResourceService()); RegisterInstance<IEmailService>(new EmailService()); RegisterInstance<IInstallVoiceSynthesisService>(new InstallVoiceSynthesisService()); RegisterInstance<IScreenService>(new ScreenService()); RegisterInstance<IFontService>(new FontService()); RegisterInstance<IMediaService>(new MediaService()); RegisterInstance<IPopupService>(new PopupService()); RegisterInstance<ICopyPasteService>(new CopyPasteService()); TextToSpeechService textToSpeechService = new TextToSpeechService(); textToSpeechService.Initialized += OnTtsInitialized; RegisterInstance<ITextToSpeechService>(textToSpeechService); RegisterInstance<IStorageService>(_storageService); RegisterInstance<ISettingsService>(_settingsService); RegisterInstance<IXmlService>(new XmlService()); RegisterInstance<ICollectionStorageService>(_collectionStorageService); Task.Run((Action)InitializeAsync); }