public void OnInitialized(IContainerProvider containerProvider) { var regionManager = containerProvider.Resolve <IRegionManager>(); ViewModelLocationProvider.Register <MainMenuView, MainMenuViewModel>(); regionManager.RegisterViewWithRegion("PartLeftMenu", typeof(MainMenuView)); }
public void OnInitialized(IContainerProvider containerProvider) { var regionManager = containerProvider.Resolve <IRegionManager>(); ViewModelLocationProvider.Register <ParametrageView, ParametrageViewModel>(); regionManager.RegisterViewWithRegion("PartCenterPanel", typeof(ParametrageView)); }
public void OnInitialized(IContainerProvider containerProvider) { var regionManager = containerProvider.Resolve <IRegionManager>(); regionManager.RegisterViewWithRegion(VolumeManagementRegionNames.Master, typeof(VolumesListView)); ViewModelLocationProvider.Register <VolumesListView, VolumesListViewModel>(); }
protected override void ConfigureViewModelLocator() { base.ConfigureViewModelLocator(); ViewModelLocationProvider.Register <MainWindow, MainWindowViewModel>(); ViewModelLocationProvider.Register <ChatWindow, ChatViewModel>(); }
private void ConfigureGem(IContainerRegistry containerRegistry) { containerRegistry.RegisterInstance(Options); containerRegistry.RegisterSingleton <ILoggerFacade, GemLogger>(); containerRegistry.RegisterSingleton <ExceptionHandler, DefaultExceptionHandler>(); if (Options.UseAppCenter) { containerRegistry.RegisterManySingleton <AppCenterLogger>(typeof(ILogger), typeof(ILoggerFacade), typeof(IAnalyticsService), typeof(ICrashesService)); HookAppCenterNavigationEvents(); } containerRegistry.RegisterSingleton(typeof(AppInitializer), Options.InitializerType); if (Options.SplashPageType == null) { Options.SplashPageType = typeof(ContentPage); } containerRegistry.RegisterForNavigation(Options.SplashPageType, Options.SplashPageType.Name); ViewModelLocationProvider.Register(Options.SplashPageType.ToString(), typeof(AppInitializer)); containerRegistry.RegisterForNavigation <DefaultChangeEnvPage, DefaultChangeEnvViewModel>(); }
protected override void ConfigureViewModelLocator() { base.ConfigureViewModelLocator(); ViewModelLocationProvider.Register <LabelMakerControl, LabelMakerViewModel>(); ViewModelLocationProvider.Register <CsvConverterControl, CsvConverterViewModel>(); }
protected override void ConfigureViewModelLocator() { base.ConfigureViewModelLocator(); ViewModelLocationProvider.Register <MainWindow, MainWindowViewModel>(); ViewModelLocationProvider.Register <browseButton, browseButtonViewModel>(); ViewModelLocationProvider.Register <MascotWindow, MascotWindowViewModel>(); }
public void RegisterTypes(IContainerRegistry containerRegistry) { containerRegistry.RegisterSingleton <IPlayerBroker, SpotifyBroker>(); ViewModelLocationProvider.Register <SongView, SongViewModel>(); ViewModelLocationProvider.Register <SettingsView, SettingsViewModel>(); }
protected override void RegisterTypes(IContainerRegistry containerRegistry) { ViewModelLocationProvider.Register <MainWindow, MainWindowViewModel>(); // Servisi containerRegistry.RegisterSingleton <IDbService, DBService>(); }
protected override void RegisterTypes(IContainerRegistry containerRegistry) { ViewModelLocationProvider.Register <MainWindow, MainViewModel>(); // containerRegistry.Register<i>(new C); ////throw new NotImplementedException(); }
public void RegisterTypes(Prism.Ioc.IContainerRegistry containerRegistry) { containerRegistry.Register <IWatchListService, WatchListService>(); ViewModelLocationProvider.Register <WatchListView, WatchListViewModel>(); ViewModelLocationProvider.Register <AddWatchView, AddWatchViewModel>(); }
public void RegisterTypes(IContainerRegistry containerRegistry) { containerRegistry.Register <RouteEditorNavigationCommand>(); containerRegistry.Register <IRouteEditorViewModel, RouteEditorViewModel>(); containerRegistry.RegisterForNavigation <RouteEditorView>(); ViewModelLocationProvider.Register <RouteEditorView, IRouteEditorViewModel>(); }
public FooterModule(IRegionManager regionManager, IUnityContainer container) { this.regionManager = regionManager; //Im actually not sure if this is the right place to do this.. I couldn't find any advice on the internet //when I looked. I suspect this should go in initialise. ViewModelLocationProvider.Register(typeof(Footer).ToString(), () => container.Resolve <FooterViewModel>()); }
private static void RegisterViewByAttribute(IContainerRegistry containerRegistry, RegisterForNavigationAttribute attr) { if (attr.ViewType is null) { throw new Exception($"Cannot auto register View. No ViewType was specified. Name: '{attr.Name}'. ViewModelType: '{attr.ViewModelType?.Name}'"); } if (attr.RuntimePlatform != null && attr.RuntimePlatform.ToString() != Device.RuntimePlatform) { return; } var name = attr.Name; if (string.IsNullOrEmpty(name)) { name = attr.ViewType.Name; } containerRegistry.RegisterForNavigation(attr.ViewType, name); if (attr.ViewModelType != null) { ViewModelLocationProvider.Register(attr.ViewType.Name, attr.ViewModelType); } }
public void RegisterTypes(IContainerRegistry containerRegistry) { containerRegistry.RegisterForNavigation <MainView>(); ViewModelLocationProvider.Register <ToolMenusContainerView, ToolsMenusContainerViewModel>(); ViewModelLocationProvider.Register <ToolboxesContainerView, ToolboxesContainerViewModel>(); }
public void BindFileBrowserModuleViewModels() { ViewModelLocationProvider.Register <FileBrowserControl, FileBrowserControlViewModel>(); ViewModelLocationProvider.Register <FolderTreeControl, FolderTreeControlViewModel>(); ViewModelLocationProvider.Register <FolderViewControl, FolderViewControlViewModel>(); ViewModelLocationProvider.Register <FolderItemControl, FolderItemControlViewModel>(); }
protected override void ConfigureViewModelLocator() { base.ConfigureViewModelLocator(); AppVM appVM = new AppVM(Container.Resolve <IEventAggregator>()); ViewModelLocationProvider.Register <MainWindow>(() => { return(appVM); }); }
public void RegisterTypes(IContainerRegistry containerRegistry) { ViewModelLocationProvider.Register <MailGroup, MailGroupViewModel>(); containerRegistry.RegisterForNavigation <MailList, MailListViewModel>(); containerRegistry.RegisterSingleton <IMailService, MailService>(); }
protected override void RegisterTypes(IContainerRegistry containerRegistry) { ViewModelLocationProvider.Register(typeof(MainWindow).ToString(), typeof(MainWindowViewModel)); ViewModelLocationProvider.Register(typeof(SplashScreenView).ToString(), typeof(SplashScreenViewModel)); ViewModelLocationProvider.Register(typeof(StudyGridView).ToString(), typeof(StudyGridViewModel)); ViewModelLocationProvider.Register(typeof(StudySearchView).ToString(), typeof(StudySearchViewModel)); ViewModelLocationProvider.Register(typeof(StudyDetailView).ToString(), typeof(StudyDetailViewModel)); ViewModelLocationProvider.Register(typeof(StudyEditorView).ToString(), typeof(StudyEditorViewModel)); ViewModelLocationProvider.Register(typeof(EndpointDescriptorSelectorView).ToString(), typeof(EndpointDescriptorSelectorViewModel)); containerRegistry.Register <IRegistryRepository, ClinicalTrialsRegistryRepository>("ClinicalTrials"); containerRegistry.Register <IPublicationRepository, PubmedPublicationRepository>("Pubmed"); containerRegistry.RegisterSingleton <object, MainLoader>(); containerRegistry.RegisterSingleton <List <EndpointDescriptor>, List <EndpointDescriptor> >(); containerRegistry.Register <IEndpointRepository, MySqlEndpointRepository>(); containerRegistry.Register <object, StudySearchView>("StudySearchView"); containerRegistry.Register <object, StudyGridView>("StudyGridView"); containerRegistry.Register <object, ModelSelectionView>("ModelSelectionView"); containerRegistry.Register <object, InterventionalStudyEditorView>("InterventionalStudyEditorView"); containerRegistry.Register <object, ObservationalStudyEditorView>("ObservationalStudyEditorView"); //containerRegistry.Register<object, StudyEditorView>("StudyGridView"); }
public void RegisterTypes(IContainerRegistry containerRegistry) { containerRegistry.Register <ISettingsViewModel, SettingsViewModel>(); containerRegistry.Register <SettingsNavigationCommand>(); containerRegistry.RegisterForNavigation <SettingsView>(); ViewModelLocationProvider.Register <SettingsView, ISettingsViewModel>(); }
protected override void ConfigureViewModelLocator() { base.ConfigureViewModelLocator(); ViewModelLocationProvider.Register <MainWindow>(() => new MainWindowViewModel(this.MainWindow)); ViewModelLocationProvider.Register <WingcodeMsgDialog, WingcodeMsgDialogViewModel>(); ViewModelLocationProvider.Register <WingcodeDialogBox, WingcodeDialogBoxViewModel>(); }
protected override void RegisterTypes(IContainerRegistry containerRegistry) { containerRegistry.RegisterInstance <ITdsApi>(RestService.For <ITdsApi>( new System.Net.Http.HttpClient(new ApiMessageHandler(new HttpClientHandler(), () => SessionContext.Token)) { BaseAddress = new Uri(Settings.ServerUrl), Timeout = TimeSpan.FromMilliseconds(Settings.TimeoutMs), })); containerRegistry.RegisterDialog <RefuelDialog, RefuelDialogViewModel>(); var container = containerRegistry.GetContainer(); container.RegisterFactory <DbRepository>( c => { var dbFolder = c.Resolve <IDbFolderService>(); return(new DbRepository(dbFolder.GetDbPath("tds.db"))); }, FactoryLifetime.Singleton); containerRegistry.Register <RepeatFailedMethodService>(); ViewModelLocationProvider.Register <LoginPage, LoginPageViewModel>(); ViewModelLocationProvider.Register <OrderListPage, OrderListPageViewModel>(); ViewModelLocationProvider.Register <OrderPage, OrderPageViewModel>(); ViewModelLocationProvider.Register <RefuelDialog, RefuelDialogViewModel>(); }
protected override void RegisterTypes(IContainerRegistry containerRegistry) { containerRegistry.Register <ICharacterCountService, CharacterCountService>(); containerRegistry.Register <IMathService, MathService>(); containerRegistry.Register <IMainWindowViewModel, MainWindowViewModel>(); ViewModelLocationProvider.Register <MainWindow, MainWindowViewModel>(); }
private void OnPluginInterfaceDialogRequested(object sender, DialogRequestedEventArgs e) { if (sender is IEltraNavigoPluginService pluginService) { var dialogView = pluginService.ResolveDialogView(e.ViewModel); if (dialogView != null) { var viewModel = e.ViewModel; var dialogViewName = dialogView.GetType().Name; if (!_containerRegistry.IsRegistered(dialogView.GetType())) { var viewType = dialogView.GetType().ToString(); var viewModelType = e.ViewModel.GetType(); ViewModelLocationProvider.Register(viewType, viewModelType); _containerRegistry.Register(typeof(object), dialogView.GetType(), dialogViewName); } ThreadHelper.RunOnMainThread(() => { Action <IDialogResult> dialogResult = (r) => { e.DialogResult = r; }; _dialogService?.ShowDialog(dialogViewName, e.Parameters, dialogResult); }); } } }
public static void Initialize(IContainerRegistry container, IContainerProvider provider) { container.Register <IDialogService, DialogService>(); container.RegisterDialogWindow <DialogHost>(); container.RegisterDialog <NewDialog, NewDialogViewModel>(Dialog.New.Name); container.RegisterDialog <SelectionDialog, SelectionDialogViewModel>(Dialog.Selection.Name); container.RegisterDialog <SaveDialog, SaveDialogViewModel>(Dialog.Save.Name); container.RegisterDialog <ConfirmationDialog, ConfirmationDialogViewModel>(Dialog.Confirmation.Name); container.RegisterDialog <PrintDialog, PrintDialogViewModel>(Dialog.Print.Name); container.RegisterDialog <AboutDialog, AboutDialogViewModel>(Dialog.About.Name); container.RegisterDialog <CharacterElementDialog, CharacterElementDialogViewModel>(Dialog.CharacterElementSelection.Name); container.RegisterDialog <ApplyTemplateDialog, ApplyTemplateDialogViewModel>(Dialog.ApplyTemplate.Name); ViewModelLocationProvider.Register <MainWindow>(() => provider.Resolve <MainWindowViewModel>()); ViewModelLocationProvider.Register <MainMenu>(() => provider.Resolve <MainMenuViewModel>()); ViewModelLocationProvider.Register <GameObjectEditor>(() => provider.Resolve <GameObjectEditorViewModel>()); ViewModelLocationProvider.Register <GameObjectTree>(() => provider.Resolve <GameObjectTreeViewModel>()); ViewModelLocationProvider.Register <AbilityEditToolbar>(() => provider.Resolve <AbilityEditToolbarViewModel>()); ViewModelLocationProvider.Register <NewDialog>(() => provider.Resolve <NewDialogViewModel>()); ViewModelLocationProvider.Register <SelectionDialog>(() => provider.Resolve <SelectionDialogViewModel>()); ViewModelLocationProvider.Register <SaveDialog>(() => provider.Resolve <SaveDialogViewModel>()); ViewModelLocationProvider.Register <ConfirmationDialog>(() => provider.Resolve <ConfirmationDialogViewModel>()); ViewModelLocationProvider.Register <PrintDialog>(() => provider.Resolve <PrintDialogViewModel>()); ViewModelLocationProvider.Register <AboutDialog>(() => provider.Resolve <AboutDialogViewModel>()); ViewModelLocationProvider.Register <CharacterElementDialog>(() => provider.Resolve <CharacterElementDialogViewModel>()); ViewModelLocationProvider.Register <ApplyTemplateDialog>(() => provider.Resolve <ApplyTemplateDialogViewModel>()); ProxyDataLocator.Register <CharacterElementStorage>(() => provider.Resolve <CharacterElementStorageData>()); ProxyDataLocator.Register <ApplyCharacterTemplate>(() => provider.Resolve <ApplyCharacterTemplateData>()); }
public void Bind() { ViewModelLocationProvider.Register <MainWindow, MainWindowViewModel>(); this.BindCountryBrowserModule(); this.BindSettingsBrowserModule(); }
protected override Task OnInitializeAsync(IActivatedEventArgs args) { TwitterClient.Instance.Initialize(); ViewModelLocationProvider.Register(typeof(MainPage).ToString(), () => new MainPageViewModel(NavigationService)); return(base.OnInitializeAsync(args)); }
protected override void RegisterTypes(IContainerRegistry containerRegistry) { containerRegistry.RegisterSingleton(typeof(CameraProvider)); containerRegistry.RegisterSingleton(typeof(PortProvider)); ViewModelLocationProvider.Register <ShellWindow, MainViewModel>(); }
public void RegisterTypes(IContainerRegistry containerRegistry) { containerRegistry.Register <IAircraftListViewModel, AircraftListViewModel>(); containerRegistry.Register <ShowRemoveConfirmationDialogCommand>(); containerRegistry.RegisterForNavigation <AircraftListView>(); ViewModelLocationProvider.Register <AircraftListView, IAircraftListViewModel>(); }
/// <inheritdoc/> protected override void ConfigureViewModelLocator() { base.ConfigureViewModelLocator(); ViewModelLocationProvider.Register <Views.Timeline.VideoTimelineView, ViewModels.Timeline.VideoTimelineViewModel>(); ViewModelLocationProvider.Register <VideoDetailsView, ViewModels.VideoDetailsViewModel>(); }