コード例 #1
0
        public static HistoryNavigationService CreateNavigationService()
        {
            var navigationService = new HistoryNavigationService();

            navigationService.Configure(PageKeys.Main.ToString(), typeof(MainPage));
            navigationService.Configure(PageKeys.Feed.ToString(), typeof(FeedPage));
            navigationService.Configure(PageKeys.Article.ToString(), typeof(ArticlePage));
            navigationService.Configure(PageKeys.Settings.ToString(), typeof(SettingsPage));

            return navigationService;
        }
コード例 #2
0
        public static IHistoryNavigationService CreateNavigationService()
        {
            var navigationService = new HistoryNavigationService();

            navigationService.Configure(PageKeys.Main.ToString(), typeof(Pages.MainPage));
            navigationService.Configure(PageKeys.Wizard.ToString(), typeof(WizardPage));
            navigationService.Configure(PageKeys.DrinkerCycle.ToString(), typeof(DrinkerCyclePage));
            navigationService.Configure(PageKeys.Settings.ToString(), typeof(SettingsPage));

            return navigationService;
        }
コード例 #3
0
        public static HistoryNavigationService CreateNavigationService()
        {
            var navigationService = new HistoryNavigationService();

            navigationService.Configure(PageKeys.Main.ToString(), typeof(MainPage));
            navigationService.Configure(PageKeys.Feed.ToString(), typeof(FeedPage));
            navigationService.Configure(PageKeys.Article.ToString(), typeof(ArticlePage));
            navigationService.Configure(PageKeys.Settings.ToString(), typeof(SettingsPage));

            return(navigationService);
        }
コード例 #4
0
        private static HistoryNavigationService ConstructNavigationService()
        {
            var ngs = new HistoryNavigationService();

            ngs.Configure(View.Enum.Pages.Main.ToString(), typeof(MainPage));
            ngs.Configure(View.Enum.Pages.ViewCourse.ToString(), typeof(CoursePage));
            ngs.Configure(View.Enum.Pages.AddEditCourse.ToString(), typeof(EditCoursePage));
            ngs.Configure(View.Enum.Pages.AddEditLecture.ToString(), typeof(EditLecturePage));

            return(ngs);
        }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the ViewModelLocator class.
        /// </summary>
        public ViewModelLocator()
        {
            ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
            
            // Create design time view services and models
            SimpleIoc.Default.Register<IStorageService>(() => new StorageService());
            SimpleIoc.Default.Register<IDialogService, DialogService>();
            SimpleIoc.Default.Register<IProgressService, ProgressService>();

            var navigationService = new HistoryNavigationService();
            navigationService.Configure(PageKeys.MainPage.ToString(), typeof(MainPage));
            navigationService.Configure(PageKeys.NotePage.ToString(), typeof(NotePage));
            SimpleIoc.Default.Register<IHistoryNavigationService>(() => navigationService);
        }