private INavigationService CreateNavigationService() { var navigationService = new NavigationService(); navigationService.Configure("CircleMenu", typeof(CircleMenuSample)); return navigationService; }
public ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); SimpleIoc.Default.Register<VMMainPage>(); SimpleIoc.Default.Register<VMNewGames>(); SimpleIoc.Default.Register<VMChoixJoueur>(); SimpleIoc.Default.Register<VMParamPartie>(); SimpleIoc.Default.Register<VMLoadGame>(); SimpleIoc.Default.Register<VMRules>(); SimpleIoc.Default.Register<VMRanking>(); SimpleIoc.Default.Register<VMTableScore>(); SimpleIoc.Default.Register<VMGestionJoueurs>(); SimpleIoc.Default.Register<VMNouveauJoueur>(); NavigationService navigationPages = new NavigationService(); SimpleIoc.Default.Register<INavigationService>(() => navigationPages); navigationPages.Configure("MainPage", typeof(MainPage)); navigationPages.Configure("NewGame", typeof(NewGame)); navigationPages.Configure("ChoixJoueur", typeof(ChoixJoueur)); navigationPages.Configure("ParamPartie", typeof(ParamPartie)); navigationPages.Configure("LoadGame", typeof(LoadGame)); navigationPages.Configure("Rules", typeof(Rules)); navigationPages.Configure("Ranking", typeof(Ranking)); navigationPages.Configure("TableScore", typeof(TableScore)); navigationPages.Configure("GestionJoueurs", typeof(GestionJoueurs)); navigationPages.Configure("NouveauJoueur", typeof(NouveauJoueur)); }
private INavigationService CreateNavigationService() { var navigationService = new NavigationService(); navigationService.Configure("MainCategories", typeof(View.MainCategories)); return navigationService; }
/// <summary> /// Invoked when this page is about to be displayed in a Frame. /// </summary> /// <param name="e">Event data that describes how this page was reached. /// This parameter is typically used to configure the page.</param> protected override void OnNavigatedTo(NavigationEventArgs e) { var b = e.Parameter; var service = new NavigationService(); var key = service.CurrentPageKey; }
static ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); var nav = new NavigationService(); nav.Configure(NotificationListPageKey, typeof(NotificationListPage)); nav.Configure(LoginPageKey, typeof(LoginPage)); nav.Configure(StatisticsPage, typeof(StatisticsPage)); SimpleIoc.Default.Register<INavigationService>(() => nav); SimpleIoc.Default.Register<IDialogService, DialogService>(); SimpleIoc.Default.Register<IStorageService, StorageService>(); SimpleIoc.Default.Register<ToastLogic>(); if (ViewModelBase.IsInDesignModeStatic) { SimpleIoc.Default.Register<IDataService, Design.DesignDataService>(); } else { SimpleIoc.Default.Register<IDataService, DataService>(); } SimpleIoc.Default.Register<LoginViewModel>(); SimpleIoc.Default.Register<NotificationListViewModel>(); SimpleIoc.Default.Register<StatisticsViewModel>(); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); if (!_initialized) { _initialized = true; ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); var nav = new NavigationService(); nav.Configure(Page2Key, typeof(Page2Activity)); nav.Configure(Page3Key, typeof(Page3Activity)); SimpleIoc.Default.Register<INavigationService>(() => nav); } var button = FindViewById<Button>(Resource.Id.MyButton); button.Click += (s, e) => { var nav = ServiceLocator.Current.GetInstance<INavigationService>(); nav.NavigateTo(Page2Key); }; }
private INavigationService createNavigationService() { var navigationService = new NavigationService(); navigationService.Configure("MainPage", typeof(MainPage)); navigationService.Configure("AddPage", typeof(AlarmPage)); return navigationService; }
static ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); var nav = new NavigationService(); nav.Configure(SecondPageKey, typeof(SecondPage)); SimpleIoc.Default.Register<INavigationService>(() => nav); SimpleIoc.Default.Register<IDialogService, DialogService>(); SimpleIoc.Default.Register<TrainServiceCache>(); #if ISARM SimpleIoc.Default.Register<IPowerService, PowerService>(); #else SimpleIoc.Default.Register<IPowerService, MockPowerService>(); #endif if (ViewModelBase.IsInDesignModeStatic) { SimpleIoc.Default.Register<IDataService, Design.DesignDataService>(); SimpleIoc.Default.Register<IRailWebservice>(() => new DesignRailWebservice("")); } else { SimpleIoc.Default.Register<IDataService, DataService>(); SimpleIoc.Default.Register<IRailWebservice>(() => new RailWebservice("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")); } SimpleIoc.Default.Register<MainViewModel>(); SimpleIoc.Default.Register<ClockViewModel>(); SimpleIoc.Default.Register<DeparturesViewModel>(); SimpleIoc.Default.Register<PowerMonitorViewModel>(); }
private static INavigationService CreateNavigationService() { var navigationService = new NavigationService(); navigationService.Configure("CreateRegistrationView", typeof(CreateRegistrationView)); return navigationService; }
static ViewModelLocator() { //Setup IOC Container ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); //Create a NavigationService and register the pages with their corresponding names var navigationService = new NavigationService(); navigationService.Configure(ViewModelNames.CreatePage, typeof(CreatePage)); navigationService.Configure(ViewModelNames.ListPage, typeof(ListPage)); navigationService.Configure(ViewModelNames.SearchPage, typeof(SearchPage)); navigationService.Configure(ViewModelNames.SettingsPage, typeof(SettingsPage)); navigationService.Configure(ViewModelNames.StartPage, typeof(StartPage)); //This NavigationService should be injected for every INavigationService SimpleIoc.Default.Register<INavigationService>(() => navigationService); //The default DialogService should be injected for every IDialogService SimpleIoc.Default.Register<IDialogService, DialogService>(); //DemoDataProvider should be injected for every IDataProvider SimpleIoc.Default.Register<IDataProvider, DemoDataProvider>(); //Register the ViewModels SimpleIoc.Default.Register<StartViewModel>(); SimpleIoc.Default.Register<CreateViewModel>(); SimpleIoc.Default.Register<ListViewModel>(); SimpleIoc.Default.Register<SearchViewModel>(); SimpleIoc.Default.Register<SettingsViewModel>(); }
private static INavigationService CreateNavigationService() { var navigationService = new NavigationService(); navigationService.Configure(Views.Settings, typeof(SettingsPage)); return navigationService; }
public ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); SimpleIoc.Default.Register<LoginUserViewModel>(); SimpleIoc.Default.Register<SearchViewModel>(); SimpleIoc.Default.Register<SearchListViewModel>(); SimpleIoc.Default.Register<FavoritesViewModel>(); SimpleIoc.Default.Register<PersonDetailsViewModel>(); SimpleIoc.Default.Register<AccountViewModel>(); SimpleIoc.Default.Register<AddClientViewModel>(); SimpleIoc.Default.Register<ModificationsViewModel>(); NavigationService navigationService = new NavigationService(); SimpleIoc.Default.Unregister<INavigationService>(); SimpleIoc.Default.Register<INavigationService>(() => navigationService); navigationService.Configure("LoginPage", typeof(LoginPage)); navigationService.Configure("RegisterPage", typeof(RegisterPage)); navigationService.Configure("FavoritePage", typeof(FavoritePage)); navigationService.Configure("FavoriteDetails", typeof(FavoriteDetails)); navigationService.Configure("SearchPage", typeof(SearchPage)); navigationService.Configure("SearchListPage", typeof(SearchListPage)); navigationService.Configure("PersonDetails", typeof(PersonDetails)); navigationService.Configure("Account", typeof(Account)); navigationService.Configure("ModificationPage", typeof(ModificationPage)); }
static ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); SimpleIoc.Default.Register<MainViewModel>(); SimpleIoc.Default.Register<FavoriteTeamsViewModel>(); SimpleIoc.Default.Register<TeamViewModel>(); SimpleIoc.Default.Register<CompositionViewModel>(); SimpleIoc.Default.Register<ChampionshipsViewModel>(); SimpleIoc.Default.Register<RankingViewModel>(); SimpleIoc.Default.Register<SubscriptionViewModel>(); SimpleIoc.Default.Register<HomeViewModel>(); NavigationService navigationPages = new NavigationService(); SimpleIoc.Default.Register<INavigationService>(() => navigationPages); navigationPages.Configure("MainPage", typeof(MainPage)); navigationPages.Configure("FavoritePage", typeof(FavoriteTeamsPage)); navigationPages.Configure("TeamPage", typeof(TeamPage)); navigationPages.Configure("CompositionPage", typeof(CompositionPage)); navigationPages.Configure("ChampionshipsPage", typeof(ChampionshipsPage)); navigationPages.Configure("RankingPage", typeof(RankingPage)); navigationPages.Configure("SubscriptionPage", typeof(SubscriptionPage)); navigationPages.Configure("HomePage", typeof(HomePage)); }
private static INavigationService CreateNavigationService() { var navigationService = new NavigationService(); navigationService.Configure("Main", typeof(MainPage)); navigationService.Configure("Settings", typeof(SettingsPage)); return navigationService; }
protected override INavigationService CreateNavigationService() { var navigationService = new NavigationService(); navigationService.Configure("Main", new Uri("/Taksari.WP;component/View/MainPage.xaml", UriKind.RelativeOrAbsolute)); navigationService.Configure("AppSettings", new Uri("/Taksari.WP;component/View/AppSettingsPage.xaml", UriKind.RelativeOrAbsolute)); navigationService.Configure("Help", new Uri("/Taksari.WP;component/View/HelpPage.xaml", UriKind.RelativeOrAbsolute)); return navigationService; }
private static INavigationService CreateNavigationService() { var nc = new NavigationService(); nc.Configure(LogPage.Key, typeof(LogPage)); nc.Configure(ActionPage.Key, typeof(ActionPage)); nc.Configure(AboutPage.Key, typeof(AboutPage)); return nc; }
private INavigationService CreateNavigationService() { var navigationService = new NavigationService(); navigationService.Configure("Add", typeof(AddPage)); navigationService.Configure("Details", typeof(DetailsPage)); return navigationService; }
private static INavigationService RegisterNavigationService() { var service = new NavigationService(); service.Configure(Navigation.MainView, typeof(MainPage)); service.Configure(Navigation.Edit, typeof(Edit)); service.Configure(Navigation.Settings, typeof(Settings)); return service; }
protected INavigationService InitNavigationService() { var service = new NavigationService(); service.Configure(typeof(MainPageViewModel).FullName, typeof(MainPage)); service.Configure(typeof(SecondPageViewModel).FullName, typeof(SecondPage)); return service; }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { var navService = new NavigationService(); navService.Configure("AlarmDetails", typeof(NewAlarmView)); SimpleIoc.Default.Register<INavigationService>(() => navService); this.InitializeComponent(); this.Suspending += this.OnSuspending; }
protected override INavigationService CreateNavigationService() { var navigationService = new NavigationService(); navigationService.Configure(Const.MOVIES_VIEW, typeof(MoviesView)); navigationService.Configure(Const.MOVIESDATAIL_VIEW, typeof(MovieDetailView)); return navigationService; }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { var nav = new NavigationService(); nav.Initialize(Window.RootViewController as UINavigationController); SimpleIoc.Default.Register<INavigationService>(() => nav); SimpleIoc.Default.Register<IDialogService, DialogService>(); return true; }
// In iOS the CreateNavigationService method needs to be called outside the Bootstrapper to gain accees to the RootViewController public void CreateNavigationService(UIWindow window) { var navigationService = new NavigationService(); navigationService.Initialize((UINavigationController)window.RootViewController); navigationService.Configure("Add", "AddViewController"); navigationService.Configure("Details", "DetailsViewController"); SimpleIoc.Default.Register<INavigationService>(() => navigationService); }
public void TestSelectTestDisplaysData() { INavigationService navigationService = new NavigationService(); IDialogService dialogService = new DialogService(); IDataRepository dataRepository = new QuestionsDesignRepository(); SelectTestViewModel viewModel = new SelectTestViewModel(navigationService, dataRepository, dialogService); viewModel.GetTestsCommand.Execute(null); Assert.IsNotNull(viewModel.Tests); }
static INavigationService CreateNavigationService() { var navigationService = new NavigationService(); #if WINDOWS_PHONE_APP navigationService.Configure("PhoneSettings", typeof(PhoneSettings)); navigationService.Configure("PokemonView", typeof(PokemonView)); #endif navigationService.Configure("AbilityView", typeof(AbilitiesView)); return navigationService; }
private static INavigationService RegisterNavigationService() { var service = new NavigationService(); service.Configure("CreateNote", typeof(CreateNote)); service.Configure("ReadNote", typeof(ReadNote)); service.Configure("SearchNotes", typeof(SearchNotes)); service.Configure("Settings", typeof(Settings)); service.Configure("EditNote", typeof(EditNote)); return service; }
private INavigationService CreateNavigationService() { var navigationService = new NavigationService(); navigationService.Configure(ViewNames.Room, typeof(RoomPage)); navigationService.Configure(ViewNames.Settings, typeof(SettingsPage)); navigationService.Configure(ViewNames.SystemVariable, typeof(SystemVariablePage)); navigationService.Configure(ViewNames.Program, typeof(ProgramPage)); navigationService.Configure(ViewNames.About, typeof(AboutPage)); return navigationService; }
/// <summary> /// The create navigation service. /// </summary> /// <returns> /// The <see cref="INavigationService"/>. /// </returns> private INavigationService CreateNavigationService() { var navigationService = new NavigationService(); navigationService.Configure("Main", typeof(MainPage)); navigationService.Configure("Room", typeof(RoomPage)); navigationService.Configure("Rooms", typeof(RoomsPage)); navigationService.Configure("Authentication", typeof(AuthenticationPage)); return navigationService; }
/// <summary> /// Creates and configures <see cref="GalaSoft.MvvmLight.Views.INavigationService"/> implementation. /// </summary> /// <returns>Instance of <see cref="GalaSoft.MvvmLight.Views.INavigationService"/> implementation.</returns> private INavigationService CreateNavigationService() { var loNavigationService = new NavigationService(); #if WINDOWS_UWP loNavigationService.Configure("Main", typeof(View.MainView)); loNavigationService.Configure("Settings", typeof(View.SettingsView)); loNavigationService.Configure("ActivityDetails", typeof(View.ActivityDetailsView)); #endif return(loNavigationService); }
private INavigationService CreateNavigationService() { var navigationService = new NavigationService(); navigationService.Configure(HubPageKey, typeof(HubPage)); navigationService.Configure(NewsDetailPageKey, typeof(NewsDetailPage)); navigationService.Configure(ActionsPageKey, typeof(ActionsPage)); navigationService.Configure(NearbyPageKey, typeof(NearbyPage)); navigationService.Configure(SettingsPageKey, typeof(SettingsPage)); return navigationService; }
public ViewModelLocator() { var navigationService = new NavigationService(); var descriptionPageType = typeof(FullDescriptionPage); navigationService.Configure(descriptionPageType.Name, descriptionPageType); _unityContainer.RegisterType<IParser, Parser>() .RegisterType<IMyShowService, MyShowService>() .RegisterType<ISearchViewModel, SearchViewModel>() .RegisterType<IFullDescriptionViewModel, FullDescriptionViewModel>() .RegisterInstance(navigationService); }
/// <summary> /// Constructor for the Application object. /// </summary> public App() { var bootstrapper = new MapsSampleBootstrapper(); bootstrapper.Startup(); var nav = new NavigationService(); SimpleIoc.Default.Register <INavigationService>(() => nav); // Global handler for uncaught exceptions. UnhandledException += Application_UnhandledException; // Standard XAML initialization InitializeComponent(); // Sets phone accent style derivants Current.Resources.Add("PhoneAccentBrushBright", new SolidColorBrush(Colors.Transparent)); Current.Resources.Add("PhoneAccentBrushBrighter", new SolidColorBrush(Colors.Transparent)); Current.Resources.Add("PhoneAccentBrushDark", new SolidColorBrush(Colors.Transparent)); Current.Resources.Add("PhoneAccentBrushDarker", new SolidColorBrush(Colors.Transparent)); Current.OverrideStyles(); // Phone-specific initialization InitializePhoneApplication(); // Language display initialization InitializeLanguage(); // Show graphics profiling information while debugging. if (Debugger.IsAttached) { // Display the current frame rate counters. Application.Current.Host.Settings.EnableFrameRateCounter = true; // Show the areas of the app that are being redrawn in each frame. //Application.Current.Host.Settings.EnableRedrawRegions = true; // Enable non-production analysis visualization mode, // which shows areas of a page that are handed off to GPU with a colored overlay. //Application.Current.Host.Settings.EnableCacheVisualization = true; // Prevent the screen from turning off while under the debugger by disabling // the application's idle detection. // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run // and consume battery power when the user is not using the phone. PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; } }
/// <summary> /// Constructor for the Application object. /// </summary> public App() { var nav = new GalaSoft.MvvmLight.Views.NavigationService(); nav.Configure( ViewModelLocator.DetailsPageKey, new Uri("/DetailsPage.xaml", UriKind.Relative)); // nav.Configure( // ViewModelLocator.DetailsPageKey, new Uri("/DetailsPage.xaml", UriKind.Relative)); SimpleIoc.Default.Register <INavigationService>(() => nav); SimpleIoc.Default.Register <IDialogService, DialogService>(); // Global handler for uncaught exceptions. UnhandledException += Application_UnhandledException; // Standard XAML initialization InitializeComponent(); //Initialize Parse Client ParseClient.Initialize("30h40Y0id8Sg4UySnrhJZZgbe33jUXtAK7Th3EuW", "gXDba6TNKKcZNUQgCmEpEtneJfSerz9Fh7GurmbR"); // Phone-specific initialization InitializePhoneApplication(); // Language display initialization InitializeLanguage(); // Show graphics profiling information while debugging. if (Debugger.IsAttached) { // Display the current frame rate counters. Application.Current.Host.Settings.EnableFrameRateCounter = true; // Show the areas of the app that are being redrawn in each frame. //Application.Current.Host.Settings.EnableRedrawRegions = true; // Enable non-production analysis visualization mode, // which shows areas of a page that are handed off to GPU with a colored overlay. //Application.Current.Host.Settings.EnableCacheVisualization = true; // Prevent the screen from turning off while under the debugger by disabling // the application's idle detection. // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run // and consume battery power when the user is not using the phone. PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; } }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { var nav = new GalaSoft.MvvmLight.Views.NavigationService(); //nav.Configure( // ViewModelLocator.DetailsPageKey, // typeof(DetailsPage)); //nav.Configure( // ViewModelLocator.AddCommentPageKey, // typeof(AddCommentPage)); SimpleIoc.Default.Register <INavigationService>(() => nav); SimpleIoc.Default.Register <IDialogService, DialogService>(); InitializeComponent(); Suspending += OnSuspending; }