Ejemplo n.º 1
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>();
        }
Ejemplo n.º 2
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.Singleton <INotesService, NotesService>();
            _container.Singleton <INotesProvider, NotesProvider>();
            _container.Singleton <ILocalStorage, LocalStorage>();
            _container.Singleton <AppNavigationService>();
            _container.Singleton <IInteractionService, InteractionService>();
            _container.Handler <IAppNavigationService>(cnt => cnt.GetInstance <AppNavigationService>());


            _container.PerRequest <ShellViewModel>();
            _container.PerRequest <ShowNotesViewModel>();
            _container.PerRequest <CreateNoteViewModel>();
            _container.PerRequest <FavoriteNotesViewModel>();

            var config = new TypeMappingConfiguration
            {
                DefaultSubNamespaceForViews      = "Notes.Views",
                DefaultSubNamespaceForViewModels = "Notes.Core.ViewModels"
            };

            ViewLocator.ConfigureTypeMappings(config);
            ViewModelLocator.ConfigureTypeMappings(config);
        }
Ejemplo n.º 3
0
        protected override void Configure()
        {
            LogManager.GetLog = t => new DebugLog(t);

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

            container.RegisterSharingService();

            var settingsService = container.RegisterSettingsService();

            settingsService.RegisterFlyoutCommand <SampleSettingsViewModel>("Custom");
            settingsService.RegisterUriCommand("View Website", new Uri("http://caliburnmicro.codeplex.com"));

            container
            .PerRequest <ActionsViewModel>()
            .PerRequest <BindingsViewModel>()
            .PerRequest <CoroutineViewModel>()
            .PerRequest <ExecuteViewModel>()
            .PerRequest <MenuViewModel>()
            .PerRequest <NavigationTargetViewModel>()
            .PerRequest <NavigationViewModel>()
            .PerRequest <SampleSettingsViewModel>()
            .PerRequest <SearchViewModel>()
            .PerRequest <SettingsViewModel>()
            .PerRequest <SetupViewModel>()
            .PerRequest <ShareSourceViewModel>()
            .PerRequest <ShareTargetViewModel>()
            .PerRequest <ConventionsViewModel>()
            .PerRequest <HubViewModel>();

            // We want to use the Frame in OnLaunched so set it up here

            PrepareViewFirst();
        }
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.Singleton <IDicomFileReaderService, DicomFileReaderService>().PerRequest <ShellViewModel>();
        }
Ejemplo n.º 5
0
 protected override void Configure()
 {
     _container = new WinRTContainer();
     _container.RegisterWinRTServices();
     _container.Singleton <IE.Mobile.Forms.App>();
     _container.PerRequest <IPlayAudio, AudioService>();
 }
Ejemplo n.º 6
0
        protected override void Configure()
        {
            var config = new TypeMappingConfiguration
            {
                DefaultSubNamespaceForViews      = "UIUniversal.Views",
                DefaultSubNamespaceForViewModels = "UIUniversal.ViewModels"
            };

            ViewLocator.ConfigureTypeMappings(config);
            ViewModelLocator.ConfigureTypeMappings(config);

            _container = new WinRTContainer();

            _container.RegisterWinRTServices();
            _container.PerRequest <MainPageViewModel>();
            AddCustomConventions();

            var isStatusBarPresent = ApiInformation.IsTypePresent(typeof(StatusBar).ToString());

            if (isStatusBarPresent)
            {
                StatusBar statusBar = StatusBar.GetForCurrentView();

                // Hide the status bar
                statusBar.HideAsync();
            }
        }
Ejemplo n.º 7
0
        protected override void Configure()
        {
            // This configures the framework to map between MainViewModel and MainPage
            // Normally it would map between MainPageViewModel and MainPage
            var config = new TypeMappingConfiguration
            {
                IncludeViewSuffixInViewModelNames = false
            };

            ViewLocator.ConfigureTypeMappings(config);
            ViewModelLocator.ConfigureTypeMappings(config);

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

            _container.PerRequest <ShellViewModel>();
            _container.PerRequest <MainViewModel>();
            _container.PerRequest <BlankViewModel>();
            _container.PerRequest <WebViewViewModel>();
            _container.PerRequest <MediaPlayerViewModel>();
            _container.PerRequest <MasterDetailViewModel>();
            _container.PerRequest <ContentGridDetailViewModel>();
            _container.PerRequest <ContentGridViewModel>();
            _container.PerRequest <CameraViewModel>();
            _container.PerRequest <InkSmartCanvasViewModel>();
            _container.PerRequest <ImageGalleryDetailViewModel>();
            _container.PerRequest <ImageGalleryViewModel>();
            _container.PerRequest <SettingsViewModel>();
            _container.PerRequest <SchemeActivationSampleViewModel>();
        }
Ejemplo n.º 8
0
        protected override void Configure()
        {
            _container = new WinRTContainer();

            _container.RegisterWinRTServices();
            _container.PerRequest <MainViewModel>();
        }
Ejemplo n.º 9
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.RegisterSharingService();

            container.RegisterSettingsService()
            .RegisterFlyoutCommand <SampleSettingsViewModel>("Custom");

            container
            .PerRequest <ActionsViewModel>()
            .PerRequest <BindingsViewModel>()
            .PerRequest <CoroutineViewModel>()
            .PerRequest <ExecuteViewModel>()
            .PerRequest <MenuViewModel>()
            .PerRequest <NavigationTargetViewModel>()
            .PerRequest <NavigationViewModel>()
            .PerRequest <SampleSettingsViewModel>()
            .PerRequest <SearchViewModel>()
            .PerRequest <SettingsViewModel>()
            .PerRequest <SetupViewModel>()
            .PerRequest <ShareSourceViewModel>()
            .PerRequest <ShareTargetViewModel>();
        }
Ejemplo n.º 10
0
        public override void ConfigureContainer(WinRTContainer container)
        {
            container
            .PerRequest <LoggedOutApplicationMode>()
            .PerRequest <LoggedInApplicationMode>();

            container
            .Singleton <ICentronService, CentronService>()
            .Singleton <IHelpdeskGroupsService, HelpdeskGroupsService>()
            .Singleton <IQueryExecutor, QueryExecutor>()
            .Singleton <IQueryCache, QueryCache>()
            .Singleton <ICommandQueue, CommandQueue>()
            .Singleton <IScriptEngine, ScriptEngine>();

            container
            .PerRequest <IQueryHandler <HelpdeskGroupQuery, IList <HelpdeskPreview> >, HelpdeskGroupQueryHandler>()
            .PerRequest <IQueryHandler <SearchCustomersQuery, IList <CustomerPreview> >, SearchCustomersQueryHandler>()
            .PerRequest <IQueryHandler <HelpdeskTypesQuery, IList <HelpdeskType> >, HelpdeskTypesQueryHandler>()
            .PerRequest <IQueryHandler <HelpdeskStatesQuery, IList <HelpdeskState> >, HelpdeskStatesQueryHandler>();

            container
            .PerRequest <ICommandHandler <ChangeHelpdeskStateCommand, Unit>, ChangeHelpdeskStateCommandHandler>();

            var scriptEngine = container.GetInstance <IScriptEngine>();

            scriptEngine.AddGlobalMethod("contains", (Func <string, string, bool>)((s1, s2) => (s1 ?? string.Empty).IndexOf(s2, StringComparison.OrdinalIgnoreCase) >= 0));
        }
Ejemplo n.º 11
0
        protected override void Configure()
        {
            base.Configure();

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

            this.container.PerRequest <StartViewModel>();
            this.container.PerRequest <DisconnectedViewModel>();
            this.container.PerRequest <NameEntryViewModel>();
            this.container.PerRequest <SignedInGreetingViewModel>();
            this.container.PerRequest <SignedOutFarewellViewModel>();
            this.container.PerRequest <SignOutViewModel>();
            this.container.PerRequest <ToastService>();

            this.container.Singleton <MessageBrokerService>();
            this.container.Singleton <MessageOrchestratorService>();
            this.container.Singleton <TokenHolderService>();
            this.container.Singleton <SignInService>();
            this.container.Singleton <SoundEffectsService>();

            // TODO: Move this hardcoded URI to somesort of configuration file
            var serviceBase = new Uri("http://SignInKioskWebApi");

            this.container.RegisterHandler(typeof(SignInApiWrapper), null, c => new SignInApiWrapper(serviceBase));
            this.container.RegisterHandler(typeof(TokenHolderApiWrapper), null, c => new TokenHolderApiWrapper(serviceBase));
            this.container.RegisterHandler(typeof(ToastNotifier), null, c => ToastNotificationManager.CreateToastNotifier());

            this.eventAggregator = this.container.GetInstance <IEventAggregator>();
        }
Ejemplo n.º 12
0
 protected override void Configure()
 {
     container = new WinRTContainer();
     container.RegisterWinRTServices();
     container.PerRequest <ITalao, Talao>();
     container.PerRequest <IMultasRealizadas, MultasRealizadas>();
 }
Ejemplo n.º 13
0
 public ShellViewModel(WinRTContainer container, IDialogWindowManager dialogWindowManager, IUserNotificationService userNotificationService, IEventAggregator eventAggregator)
 {
     _container               = container;
     _dialogWindowManager     = dialogWindowManager;
     _userNotificationService = userNotificationService;
     _eventAggregator         = eventAggregator;
 }
Ejemplo n.º 14
0
        public ShellViewModel(
            WinRTContainer container,
            IEventAggregator eventAggregator,
            UserSessionService userSessionService
            )
        {
            this.PropertyChanged     += ShellViewModel_PropertyChanged;
            this._container           = container;
            this._eventAggregator     = eventAggregator;
            this.userSessionService   = userSessionService;
            this.CollapsedPanelLength = 0;

            this.NavMenuItems = new List <NavMenuItem>
            {
                new NavMenuItem {
                    Icon = Symbol.Home, Title = "Home", TargetViewModel = typeof(PivotViewModel)
                }
                //new NavMenuItem { Icon = Symbol.Home, Title = "Home", TargetViewModel = typeof(EventListViewModel) },
                //new NavMenuItem { Icon = Symbol.Calendar, Title = "Events", TargetViewModel = typeof(EventListViewModel) }
            };
            this._selectedNavMenuItem = this.NavMenuItems.First();
            // Register a handler for BackRequested events and set the
            // visibility of the Back button
            SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;
        }
Ejemplo n.º 15
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");
        }
        public static void RegisterSqliteEncryption(ref WinRTContainer container)
        {
            //Initialize the Db directory, including access
            string directoryPath = Path.Combine(ApplicationData.Current.LocalFolder.Path, "CryptoCoinLocalData");

            if (!Directory.Exists(directoryPath))
            {
                Directory.CreateDirectory(directoryPath);
            }

            string dbPath = Path.Combine(directoryPath, $"{AppInformation.AppName}.db3");

            if (!File.Exists(dbPath))
            {
                File.Create(dbPath);
            }

            SQLitePCL.Batteries_V2.Init(); //This is to enforce encryption of the database

            var options = new SQLiteConnectionString(dbPath, false,
                                                     key: SecurityConstants.SQLCipherKey.HashPassword(),
                                                     preKeyAction: db => db.Execute("PRAGMA cipher_default_use_hmac = OFF;PRAGMA hexkey=\"0x0102030405060708090a0b0c0d0e0f10\""),
                                                     postKeyAction: db => db.Execute("PRAGMA kdf_iter = 128000;"));

            try { container.Instance <IDatabase>(new Database(new SQLiteConnection(options))); } catch { } //Register the Sqlite dependency into the iOC Container for dependency injection
        }
Ejemplo n.º 17
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _eventAggregator = _container.GetInstance <IEventAggregator>();
        }
Ejemplo n.º 18
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.Singleton <Guard.Bug.App>();
        }
Ejemplo n.º 19
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.Singleton <IWeatherService, WeatherService>();
            _container.Singleton <IWeatherProvider, WeatherProvider>();
            _container.Singleton <AppNavigationService>();
            _container.Singleton <IInteractionService, InteractionService>();
            _container.Handler <IAppNavigationService>(cnt => cnt.GetInstance <AppNavigationService>());

            _container.PerRequest <ShellViewModel>();
            _container.PerRequest <HomeViewModel>();
            _container.PerRequest <SecondPageViewModel>();
            _container.PerRequest <ThirdPageViewModel>();


            var config = new TypeMappingConfiguration
            {
                DefaultSubNamespaceForViews      = "Weather.UWP.Views",
                DefaultSubNamespaceForViewModels = "Weather.Core.ViewModels"
            };

            ViewLocator.ConfigureTypeMappings(config);
            ViewModelLocator.ConfigureTypeMappings(config);
        }
Ejemplo n.º 20
0
        protected override void Configure()
        {
            var config = new TypeMappingConfiguration
            {
                DefaultSubNamespaceForViews      = "Client.Views",
                DefaultSubNamespaceForViewModels = "Common.ViewModels"
            };

            ViewLocator.ConfigureTypeMappings(config);
            ViewModelLocator.ConfigureTypeMappings(config);

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

            // Register the ViewModels
            container.PerRequest <MainViewModel>();

            MessageBinder.SpecialValues.Add("$account", context =>
            {
                if (context == null || context.EventArgs == null)
                {
                    return(null);
                }

                return
                (((ItemClickEventArgs)context.EventArgs).ClickedItem as AccountViewModel);
            });
        }
Ejemplo n.º 21
0
        protected override void Configure()
        {
            _container = new WinRTContainer();

            _container.RegisterWinRTServices();

            _container.PerRequest <MainViewModel>();
            _container.PerRequest <AboutViewModel>();
            _container.PerRequest <AugmentedViewModel>();
            _container.PerRequest <CurrentMapViewModel>();
            _container.PerRequest <LocationListViewModel>();
            _container.PerRequest <SignUpViewModel>();
            _container.PerRequest <SignInViewModel>();
            _container.PerRequest <ResetPasswordViewModel>();
            _container.PerRequest <AddPointOfInterestViewModel>();
            _container.PerRequest <CreatePointOfInterestViewModel>();
            _container.Singleton <IPointOfInterestService, PointOfInterestService>();
            _container.Singleton <ILocationService, LocationService>();
            _container.Singleton <IAccountService, AccountService>();
            _container.Singleton <IHttpService, HttpService>();
            _container.Singleton <IUserDataStorageService, UserDataStorageService>();
            IoC.GetInstance = GetInstance;

            HideStatusBar();
        }
Ejemplo n.º 22
0
        protected override void Configure()
        {
            var baseGetLog = LogManager.GetLog;

            LogManager.GetLog = t => t == typeof(ViewModelBinder) ? new DebugLog(t) : baseGetLog(t);

            ConfigureSpecialValues();

            container = new WinRTContainer();

            container.RegisterWinRTServices();

            container
            .Singleton <ISchemeStorageService, SchemeStorageService>()
            .Singleton <IWindowManager, WindowManager>()
            .Singleton <IBitmapService, BitmapService>()
            .Singleton <ITileService, TileService>()
            .Singleton <IAppSettingsService, AppSettingsService>();

            container
            .PerRequest <SchemeListViewModel>()
            .PerRequest <EditSchemeViewModel>();

            container.RegisterSharingService();

#if WINDOWS_PHONE_APP
            var statusBar = StatusBar.GetForCurrentView();

            statusBar.HideAsync();
#endif

            var tileService = container.GetInstance <ITileService>();

            tileService.Initialise();
        }
        public INavigationService CreateNavigationService(WinRTContainer container)
        {
            var navigationService = container.RegisterNavigationService(shellFrame);

            navigationViewHeaderBehavior.Initialize(navigationService);
            return(navigationService);
        }
Ejemplo n.º 24
0
        protected override void Configure()
        {
            base.Configure();

            container = new WinRTContainer(RootFrame);
            container.RegisterWinRTServices();
        }
Ejemplo n.º 25
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.RegisterSharingService();

            container.RegisterSettingsService()
                .RegisterFlyoutCommand<SampleSettingsViewModel>("Custom");

            container
                .PerRequest<ActionsViewModel>()
                .PerRequest<BindingsViewModel>()
                .PerRequest<CoroutineViewModel>()
                .PerRequest<ExecuteViewModel>()
                .PerRequest<MenuViewModel>()
                .PerRequest<NavigationTargetViewModel>()
                .PerRequest<NavigationViewModel>()
                .PerRequest<SampleSettingsViewModel>()
                .PerRequest<SearchViewModel>()
                .PerRequest<SettingsViewModel>()
                .PerRequest<SetupViewModel>()
                .PerRequest<ShareSourceViewModel>()
                .PerRequest<ShareTargetViewModel>();
        }
Ejemplo n.º 26
0
        protected override void Configure()
        {
            LogManager.GetLog = t => new DebugLog(t);

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

            container.RegisterSharingService();

            var settingsService = container.RegisterSettingsService();
                
            settingsService.RegisterFlyoutCommand<SampleSettingsViewModel>("Custom");
            settingsService.RegisterUriCommand("View Website", new Uri("http://caliburnmicro.codeplex.com"));

            container
                .PerRequest<ActionsViewModel>()
                .PerRequest<BindingsViewModel>()
                .PerRequest<CoroutineViewModel>()
                .PerRequest<ExecuteViewModel>()
                .PerRequest<MenuViewModel>()
                .PerRequest<NavigationTargetViewModel>()
                .PerRequest<NavigationViewModel>()
                .PerRequest<SampleSettingsViewModel>()
                .PerRequest<SearchViewModel>()
                .PerRequest<SettingsViewModel>()
                .PerRequest<SetupViewModel>()
                .PerRequest<ShareSourceViewModel>()
                .PerRequest<ShareTargetViewModel>()
                .PerRequest<ConventionsViewModel>()
                .PerRequest<HubViewModel>();

            // We want to use the Frame in OnLaunched so set it up here

            PrepareViewFirst();
        }
Ejemplo n.º 27
0
        protected override void Configure()
        {
            // This configures the framework to map between MainViewModel and MainPage
            // Normally it would map between MainPageViewModel and MainPage
            var config = new TypeMappingConfiguration
            {
                IncludeViewSuffixInViewModelNames = false
            };

            ViewLocator.ConfigureTypeMappings(config);
            ViewModelLocator.ConfigureTypeMappings(config);

            _container = new WinRTContainer();
            _container.RegisterWinRTServices();
            _container.PerRequest <FunctionOptimizationGaService>();

            _container.EnablePropertyInjection = true;

            _container.PerRequest <ShellViewModel>();
            _container.PerRequest <MainViewModel>();
            _container.PerRequest <ContentGridDetailViewModel>();
            _container.PerRequest <ContentGridViewModel>();
            _container.PerRequest <ChartViewModel>();
            _container.PerRequest <SettingsViewModel>();
            _container.PerRequest <MutationSettingsViewModel>();
            _container.PerRequest <PopulationSettingsViewModel>();
            _container.PerRequest <CrossoverSettingsViewModel>();
            _container.PerRequest <SelectionSettingsViewModel>();
            _container.PerRequest <RunnersSetViewModel>();
            _container.PerRequest <RunnerInstanceViewModel>();
            _container.PerRequest <ProfileViewModel>();
        }
Ejemplo n.º 28
0
        protected override void Configure()
        {
            // This configures the framework to map between MainViewModel and MainPage
            // Normally it would map between MainPageViewModel and MainPage
            var config = new TypeMappingConfiguration
            {
                IncludeViewSuffixInViewModelNames = false
            };

            ViewLocator.ConfigureTypeMappings(config);
            ViewModelLocator.ConfigureTypeMappings(config);

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

            _container.PerRequest <ShellViewModel>();
            _container.PerRequest <MainViewModel>();
            _container.PerRequest <ContentGridDetailViewModel>();
            _container.PerRequest <ContentGridViewModel>();
            _container.PerRequest <MediaPlayerViewModel>();
            _container.PerRequest <DataGridViewModel>();
            _container.PerRequest <ChartViewModel>();
            _container.PerRequest <TabbedPivotViewModel>();
            _container.PerRequest <ImageGalleryDetailViewModel>();
            _container.PerRequest <ImageGalleryViewModel>();
            _container.PerRequest <SettingsViewModel>();
        }
Ejemplo n.º 29
0
        protected override void Configure()
        {
            base.Configure();

            _container = new WinRTContainer(RootFrame);
            _container.RegisterWinRTServices();
            _container.RegisterSingleton(typeof(IUiService), null, typeof(UiService));
        }
Ejemplo n.º 30
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            RegisterViewModels();
            RegisterServices();
        }
Ejemplo n.º 31
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container
            .Singleton <ICredentialsService, SettingsCredentialsService>();
        }
Ejemplo n.º 32
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            //TODO: Register your view models at the container
            container.PerRequest<FaultedSensorsViewModel>();
        }
Ejemplo n.º 33
0
//}]}

        public ActivationService(WinRTContainer container, Type defaultNavItem, Lazy<UIElement> shell = null)
        {
//^^
//{[{
            AltLeftKeyboardAccelerator = BuildKeyboardAccelerator(VirtualKey.Left, VirtualKeyModifiers.Menu);
            BackKeyboardAccelerator = BuildKeyboardAccelerator(VirtualKey.GoBack);
//}]}
        }
Ejemplo n.º 34
0
        protected override void Configure()
        {
            _container = new WinRTContainer();

            _container.RegisterWinRTServices();

            // Make sure to register your containers here
            _container.PerRequest<ViewModels.IShellViewModel, ViewModels.ShellViewModel>();
        }
Ejemplo n.º 35
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container
                .PerRequest<ShellViewModel>()
                .PerRequest<DeviceViewModel>();

            _eventAggregator = _container.GetInstance<IEventAggregator>();
        }
Ejemplo n.º 36
0
        protected override void Configure()
        {
            MessageBinder.SpecialValues.Add("$clickeditem", c => ((ItemClickEventArgs)c.EventArgs).ClickedItem);

            ViewModelLocator.AddNamespaceMapping("Caliburn.Micro.HelloPortable.Views", "Caliburn.Micro.HelloPortable.Portable.ViewModels");
           
            
            container = new WinRTContainer();

            container.RegisterWinRTServices();

            container.PerRequest<MainViewModel>();

            PrepareViewFirst();
        }
Ejemplo n.º 37
0
        protected override void Configure()
        {
            MessageBinder.SpecialValues.Add("$clickeditem", c => ((ItemClickEventArgs)c.EventArgs).ClickedItem);

            var gitHubClient = new GitHubClient(
                new ProductHeaderValue("Caliburn.Micro.State", "1.0"),
                new InMemoryCredentialStore(Credentials.Anonymous));

            _container = new WinRTContainer();

            _container.RegisterWinRTServices();

            _container.Instance<IGitHubClient>(gitHubClient);

            _container
                .PerRequest<RepositorySearchViewModel>()
                .PerRequest<RepositoryDetailsViewModel>();
        }