示例#1
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.Singleton<IFreeletics, Freeletics>();
            container.Singleton<ISpeechService, SpeechService>();

            container
                .PerRequest<LoadingViewModel>()
                .PerRequest<MyWeekViewModel>()
                .PerRequest<PeopleViewModel>()
                .PerRequest<WorkoutViewModel>()
                .PerRequest<TrainingViewModel>()
                .PerRequest<WorkoutDetailViewModel>()
                .PerRequest<ExercisesViewModel>()
                .PerRequest<ExerciesSeparatorViewModel>()
                .PerRequest<LeaderViewModel>()
                .PerRequest<LetsGoViewModel>()
                .PerRequest<AboutViewModel>()
                .PerRequest<FreeTrainingViewModel>()
                .PerRequest<FreeWorkoutViewModel>()
                .PerRequest<RunViewModel>()
                .PerRequest<MediaPlayerViewModel>();
        }
示例#2
0
        protected override void Configure()
        {
            CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;

            if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
            {
                var statusBar = StatusBar.GetForCurrentView();
                statusBar.BackgroundColor = (Color) Current.Resources["SystemAccentColor"];
                statusBar.BackgroundOpacity = 1;
                statusBar.ForegroundColor = (Color) Current.Resources["SystemAltHighColor"];
            }

            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.Singleton<SelfwinApp>();
            container.Singleton<IAppNavigation, SelfwinNavigation>();

            container.Singleton<ShellViewModel>();
            container.PerRequest<AllItemsViewModel>();
            container.PerRequest<ReadItemViewModel>();

            container.PerRequest<AllTagsViewModel>();
            container.PerRequest<AllSourcesViewModel>();
            container.PerRequest<SettingsViewModel>();
        }
示例#3
0
        protected override void Configure()
        {
            base.Configure();

            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _kernel = new StandardKernel();

            _kernel.Bind<IEventAggregator>().To<EventAggregator>().InSingletonScope();
            _kernel.Bind<IRegionService>().To<RegionService>().InSingletonScope();
            _kernel.Bind<ISubjectDataService>().To<SubjectDataService>().InSingletonScope();
            _kernel.Bind<ISubjectFilterService>().To<SubjectFilterService>().InSingletonScope();
            _kernel.Bind<IComputeService>().To<ComputeService>().InSingletonScope();

            _kernel.Bind<MainMenuViewModel>().To<MainMenuViewModel>().InSingletonScope();

            _kernel.Bind<RegionsViewModel>().To<RegionsViewModel>();
            _kernel.Bind<SubjectsViewModel>().To<SubjectsViewModel>().InSingletonScope();
            _kernel.Bind<PermutationViewModel>().To<PermutationViewModel>().InSingletonScope();
            _kernel.Bind<NBSmConfigViewModel>().To<NBSmConfigViewModel>();

            _kernel.Bind<RunExperimentViewModel>().To<RunExperimentViewModel>().InSingletonScope();

            _kernel.Bind<GlobalStrengthViewModel>().To<GlobalStrengthViewModel>().InSingletonScope();
            _kernel.Bind<IntermodalViewModel>().To<IntermodalViewModel>();
            _kernel.Bind<IntraSummaryViewModel>().To<IntraSummaryViewModel>();
            _kernel.Bind<NodalStrengthDataTypeViewModel>().To<NodalStrengthDataTypeViewModel>();
            _kernel.Bind<NodalStrengthViewModel>().To<NodalStrengthViewModel>();
            _kernel.Bind<EdgeSignificanceViewModel>().To<EdgeSignificanceViewModel>().InSingletonScope();
        }
示例#4
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.Singleton<IDicomFileReaderService, DicomFileReaderService>().PerRequest<ShellViewModel>();
        }
 public void ContainerPreRegist(WinRTContainer container)
 {
     container.RegisterWinRTServices();
     container.RegisterSharingService();
     container
         .PerRequest<MainViewModel>();
 }
示例#6
0
 /// <summary>
 /// Override to configure the framework and setup your IoC container.
 /// </summary>
 protected override void Configure()
 {
     container = new WinRTContainer();
     container.RegisterWinRTServices();
     container.PerRequest<MainPageViewModel>();
     container.PerRequest<DefineQuizViewModel>();
 }
示例#7
0
        protected override void Configure()
        {
            ViewModelLocator.AddNamespaceMapping("Hubb.App.UWP.Views", "Hubb.Core.ViewModels");
            ViewLocator.AddNamespaceMapping("Hubb.Core.ViewModels", "Hubb.App.UWP.Views");

            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.Instance<IGitHubClient>(new GitHubClient(new ProductHeaderValue("hubb-uwp", "1.0.0")));

            container
                .Singleton<IAppNavigationService, AppNavigationService>()
                .Singleton<IAuthenticationService, AuthenticationService>()
                .Singleton<IRepositoryService, RepositoryService>();

            container
                .PerRequest<LoginViewModel>()
                .PerRequest<RepositorySearchViewModel>();

            Coroutine.Completed += (s, e) =>
            {
                if (e.Error == null)
                    return;

                Debug.Write(e.Error.Message);
            };

            ConventionManager.AddElementConvention<AutoSuggestBox>(AutoSuggestBox.TextProperty, "Text", "QuerySubmitted");
        }
示例#8
0
		protected override async void Configure()
		{
			container = new WinRTContainer();
			container.RegisterWinRTServices();
			container.Singleton<LoggingManager>();
			container.Singleton<IAppSettings, ApplicationSettings>();
			container.Singleton<TimerService>();
			container.Singleton<ThermostatManager>();

			var types = GetType().GetTypeInfo().Assembly.GetTypes()
				.Where(t => t.Namespace == "Sannel.House.Controller.ViewModels");
			foreach (var type in types)
			{
				var typeInfo = type.GetTypeInfo();
				if (!typeInfo.IsAbstract)
				{
					var sa = typeInfo.GetCustomAttribute<SingletonAttribute>();
					if(sa != null)
					{
						container.RegisterSingleton(type, type.FullName, type);
					}
					else
					{
						container.RegisterPerRequest(type, type.FullName, type);
					}
				}
			}
		}
示例#9
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.PerRequest<ShellViewModel>();
        }
示例#10
0
 protected override void Configure()
 {
     _container = new WinRTContainer();
     _container.RegisterWinRTServices();
     _container.PerRequest<MainPageViewModel>();
     _container.PerRequest<SecondPageViewModel>();
 }
示例#11
0
        protected override void Configure()
        {
            LogManager.GetLog = t => new DebugLog(t);

            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.RegisterPerRequest(typeof(IMessageService), null, typeof(DefaultMessageService));

            _container.RegisterInstance(typeof(IResourceLoader), null, new DefaultResourceLoader());
            _container.RegisterSingleton(typeof(IGitHubService), null, typeof(GhService));

            _container
                .PerRequest<MainViewModel>()
                    .PerRequest<NewsViewModel>()
                    .PerRequest<RepositoriesViewModel>()
                    .PerRequest<FollowersViewModel>()
                    .PerRequest<FollowingViewModel>()
                    .PerRequest<OrgsListViewModel>()
                .PerRequest<RepositoryViewModel>()
                    .PerRequest<RepositoryCommitsViewModel>()
                    .PerRequest<RepositoryIssuesViewModel>()
                    .PerRequest<RepositoryInfoViewModel>()
                    .PerRequest<RepositoryContentsViewModel>()
                .PerRequest<OrgViewModel>()
                    .PerRequest<MembersViewModel>()
                .PerRequest<AboutViewModel>()
                .PerRequest<AuthorizeViewModel>()
                .PerRequest<HtmlUrlViewModel>();
        }
 protected override void Configure()
 {
     container = new WinRTContainer();
     container.RegisterWinRTServices();
     container.PerRequest<ITalao, Talao>();
     container.PerRequest<IMultasRealizadas, MultasRealizadas>();
 }
示例#13
0
		protected override void Configure()
		{
			container = new WinRTContainer();
			container.RegisterWinRTServices();
			

			container.Singleton<IAppSettings, ApplicationSettings>();
			container.PerRequest<IDataContext, LocalDataContext>();
			container.Singleton<TimerService>();
			container.Singleton<IThermostatService, ThermostatService>();
			container.Singleton<IServerSource, ServerDataContext>();
			container.PerRequest<ISyncService, SyncService>();


			// ViewModels
			container.Singleton<ShellViewModel>();
			container.PerRequest<ConfigureViewModel>();
			container.PerRequest<BootViewModel>();
			container.PerRequest<HomeViewModel>();

			//container.Singleton<MainViewModel>();
			//container.Singleton<HomeViewModel>();
			//container.Singleton<SettingsViewModel>();
			//container.Singleton<WeatherViewModel>();
			//container.Singleton<SettingsDevicesViewModel>();
			//container.Singleton<SettingsWUndergroundViewModel>();
			//container.Singleton<TemperatureViewModel>();
			//container.Singleton<TimerService>();
			//container.Singleton<SyncService>();
		}
示例#14
0
        protected override void Configure()
        {
            // set logger
            // TODO: demo customization only
            LogManager.GetLog = type => new DebugLog();

            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            // all are singleton, so they won't be recreated
            _container.Singleton<MainViewModel>()
                .Singleton<PatternsViewModel>()
                .Singleton<SoundViewModel>()
                .Singleton<BingoCardViewModel>()
                .Singleton<BallCallsViewModel>()
                .Singleton<PlayerInfoViewModel>()
                .PerRequest<PatternCountViewModel>();

            // need this to allow sharing
            _container.RegisterSharingService();

            // avoid static class
            _container.RegisterInstance(typeof(Bookkeeper), "Bookkeeper", new Bookkeeper(_container.GetInstance<IEventAggregator>()));

            PrepareSettings();
        }
示例#15
0
        protected override void Configure()
        {
            _container = new WinRTContainer();

            _container.RegisterWinRTServices();
            _container.PerRequest<IRssService, RssService>();
            _container.PerRequest<MainViewModel>();
        }
示例#16
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container
               .Singleton<ICredentialsService, SettingsCredentialsService>();
        }
示例#17
0
        protected override void Configure()
        {
            base.Configure();

            _container = new WinRTContainer(RootFrame);
            _container.RegisterWinRTServices();
            _container.RegisterSingleton(typeof(IUiService), null, typeof(UiService));
        }
示例#18
0
        protected override void Configure()
        {
            LogManager.GetLog = type => new DebugLog();

            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.Singleton<HomePageViewModel>();
        }
示例#19
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.UseShell();
            _container.UseApplets();
            _eventAggregator = _container.GetInstance<IEventAggregator>();
        }
示例#20
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.PerRequest<MainPageViewModel>();
            _container.PerRequest<CategoryDetailViewModel>();
            _container.Singleton<ICategoriesService, CategoriesService>();
        }
示例#21
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            //_container.PerRequest<ShellViewModel>();

            _eventAggregator = _container.GetInstance<IEventAggregator>();
        }
        protected override void Configure()
        {
            base.Configure();

            container = new WinRTContainer(RootFrame);
            container.RegisterWinRTServices();

            container.PerRequest<SettingsViewModel>();
            container.PerRequest<DialogViewModel>();
        }
示例#23
0
        protected override void Configure()
        {
            MessageBinder.SpecialValues.Add("$clickeditem", c => ((ItemClickEventArgs)c.EventArgs).ClickedItem);

            container = new WinRTContainer();

            container.RegisterWinRTServices();

            container.PerRequest<MainViewModel>();
        }
示例#24
0
        protected override void Configure()
        {
            ViewModelLocator.AddNamespaceMapping("Hello.Xamarin.Windows.Views", "Hello.Xamarin.Core.ViewModels");

            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container
                .PerRequest<LoginViewModel>();
        }
示例#25
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.Singleton<MainPageViewModel>();
            _container.Singleton<Screen1ViewModel>();
            _container.Singleton<Screen2ViewModel>();
            _container.Singleton<Screen3ViewModel>();
        }
        protected override void Configure()
        {
            _container = new WinRTContainer();

            _container.RegisterWinRTServices();

            _container.PerRequest<MainPageViewModel>();

            _container.RegisterSingleton(typeof(IPageNavigationService), "IPageNavigationService", typeof(PageNavigationService));
            _container.RegisterSingleton(typeof(IUserNotificationService), "IUserNotificationService", typeof(UserNotificationService));
        }
示例#27
0
        protected override void Configure()
        {
            container = new WinRTContainer();

            container.RegisterWinRTServices();

            container.PerRequest<MainPageViewModel>();

            ConfigureWindow();
            ConfigureHardware();
        }
示例#28
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.PerRequest<MyPageViewModel>();

            _container.PerRequest<AboutViewModel>();
            var settings = _container.RegisterSettingsService();

            settings.RegisterCommand<AboutViewModel>("About");
        }
示例#29
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.PerRequest<LoginViewModel>();
            _container.PerRequest<DashboardViewModel>();
            _container.PerRequest<OrderCandidateViewModel>();
            _container.PerRequest<TypeOfPaymentViewModel>();
            _container.PerRequest<CashPaymentViewModel>();
            _container.PerRequest<FinalizePaymentViewModel>();
        }
示例#30
0
        protected override void Configure()
        {
            MessageBinder.SpecialValues.Add("$clickeditem", c => ((ItemClickEventArgs)c.EventArgs).ClickedItem);

            container = new WinRTContainer();

            container.RegisterWinRTServices();

            container.PerRequest<MainViewModel>();
            container.RegisterSingleton(typeof(IDialogService),null,typeof(DialogService));

            PrepareViewFirst();
        }