Beispiel #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>();
        }
Beispiel #2
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.PerRequest<ShellViewModel>();
        }
Beispiel #3
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>();
        }
Beispiel #4
0
 protected override void Configure()
 {
     _container = new WinRTContainer();
     _container.RegisterWinRTServices();
     _container.PerRequest<MainPageViewModel>();
     _container.PerRequest<SecondPageViewModel>();
 }
 public void ContainerPreRegist(WinRTContainer container)
 {
     container.RegisterWinRTServices();
     container.RegisterSharingService();
     container
         .PerRequest<MainViewModel>();
 }
Beispiel #6
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();
        }
Beispiel #7
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.Singleton<IDicomFileReaderService, DicomFileReaderService>().PerRequest<ShellViewModel>();
        }
Beispiel #8
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>();
 }
Beispiel #9
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();
        }
Beispiel #10
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");
        }
 protected override void Configure()
 {
     container = new WinRTContainer();
     container.RegisterWinRTServices();
     container.PerRequest<ITalao, Talao>();
     container.PerRequest<IMultasRealizadas, MultasRealizadas>();
 }
Beispiel #12
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>();
		}
Beispiel #13
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);
					}
				}
			}
		}
Beispiel #14
0
        private void ConfigureContainer()
        {
            //Common
            this._container = new WinRTContainer();
            this._container.RegisterWinRTServices();

            //ViewModels
            this._container
                .Singleton<ShellViewModel>()
                .PerRequest<WelcomeViewModel>()
                .PerRequest<AddTransactionViewModel>()
                .PerRequest<AllTransactionsViewModel>();

            //ShellStates
            this._container
                .PerRequest<LoggedOutApplicationState>()
                .PerRequest<LoggedInApplicationState>()
                .PerRequest<OpenBudgetApplicationState>();

            //Services
            this._container
                .Singleton<ISettings, InMemorySettings>()
                .Singleton<IDropboxAuthenticationService, DropboxAuthenticationService>()
                .Singleton<ISessionStateService, SessionStateService>();
        }
Beispiel #15
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>();
        }
Beispiel #16
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

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

            _container = new WinRTContainer(RootFrame);
            _container.RegisterWinRTServices();
            _container.RegisterSingleton(typeof(IUiService), null, typeof(UiService));
        }
Beispiel #18
0
        protected override void Configure()
        {
            _container = new WinRTContainer();

            _container.RegisterWinRTServices();
            _container.PerRequest<IRssService, RssService>();
            _container.PerRequest<MainViewModel>();
        }
		public ConfigureViewModel(IAppSettings settings, IServerSource source, WinRTContainer container, INavigationService service, IEventAggregator eventAggregator) : base(container, service, eventAggregator)
		{
			this.settings = settings;
			serverUrl = settings.ServerUrl;
			username = settings.Username;
			password = settings.Password;
			server = source;
		}
        protected override void Configure()
        {
            containerForFramwork = new WinRTContainer();
            ContainerPreRegist(containerForFramwork);

            container = containerForFramwork;

            PrepareViewFirst();
        }
Beispiel #21
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

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

            _container.UseShell();
            _container.UseApplets();
            _eventAggregator = _container.GetInstance<IEventAggregator>();
        }
Beispiel #23
0
        protected override void Configure()
        {
            LogManager.GetLog = type => new DebugLog();

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

            _container.Singleton<HomePageViewModel>();
        }
Beispiel #24
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>();
        }
        public MediaHubViewModel(WinRTContainer container, IEventAggregator eventAggregator)
        {
            this.container = container;

            Servers = new BindableCollection<MediaServerViewModel>();

            PlayTo = new PlayToViewModel(eventAggregator);

            PlayTo.ConductWith(this);
        }
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.Singleton<MainPageViewModel>();
            _container.Singleton<Screen1ViewModel>();
            _container.Singleton<Screen2ViewModel>();
            _container.Singleton<Screen3ViewModel>();
        }
        public LoggedInApplicationState(WinRTContainer container, ISavvyNavigationService navigationService, ILoadingService loadingService, ISessionStateService sessionStateService)
        {
            this._container = container;
            this._navigationService = navigationService;
            this._loadingService = loadingService;
            this._sessionStateService = sessionStateService;

            this._refreshItem = new NavigationItemViewModel(async () => await this.RefreshAsync()) { Label = "Refresh", Symbol = Symbol.Refresh };
            this._logoutItem = new NavigationItemViewModel(this.Logout) { Label = "Logout", Symbol = Symbol.LeaveChat };
        }
        protected override void Configure()
        {
            ViewModelLocator.AddNamespaceMapping("Hello.Xamarin.Windows.Views", "Hello.Xamarin.Core.ViewModels");

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

            container
                .PerRequest<LoginViewModel>();
        }
Beispiel #30
0
        protected override void Configure()
        {
            MessageBinder.SpecialValues.Add("$clickeditem", c => ((ItemClickEventArgs)c.EventArgs).ClickedItem);

            container = new WinRTContainer();

            container.RegisterWinRTServices();

            container.PerRequest<MainViewModel>();
        }