Пример #1
0
        protected override void Configure()
        {
            container = new PhoneContainer();

            // Language display initialization
            InitializeLanguage();
            if (!Execute.InDesignMode)
            {
                container.RegisterPhoneServices(RootFrame);
            }

            container.Singleton <MainPageViewModel>();
            container.Singleton <ServerViewModel>();
            container.PerRequest <ThreadListViewModel>();
            container.PerRequest <PostViewModel>();
            container.Singleton <IUserService, UserViewModel>();

            container.Singleton <IIndicator, Indicator>();
            container.Singleton <IErrorMsg, ErrorMsg>();
            //container.Singleton<IResourceService, ApplicationResourceService>();
            container.Singleton <IResourceService, NetResourceService>();
            container.Singleton <IDataService, DataService>();
            container.Singleton <IStorageHelper, IsolatedStorageHelper>();
            container.Singleton <IParserFactory, DZParserFactory>();
            container.Singleton <IOrientationHelper, OrientationHelper>();

            GalaSoft.MvvmLight.Threading.DispatcherHelper.Initialize();
            ImageTools.IO.Decoders.AddDecoder <ImageTools.IO.Gif.GifDecoder>();

#if WP8
            RootFrame.Navigating += RootFrame_Navigating;
            RootFrame.Navigated  += RootFrame_Navigated;
#endif
            AddCustomConventions();
        }
Пример #2
0
 private void RegisterServices()
 {
     _container.PerRequest <ILog, DebugLog>();
     _container.PerRequest <IStorageService, StorageService>();
     _container.Singleton <ISocialNetworkService, GooglePlusService>();
     _container.Singleton <IImagePicker, ImagePicker>();
     _container.Singleton <INotificationsService, NotificationsService>();
     _container.Singleton <IInputService, InputService>();
 }
Пример #3
0
        protected override void Configure() {
            container = new PhoneContainer(RootFrame);

            container.RegisterPhoneServices();
            container.PerRequest<MainPageViewModel>();
            container.PerRequest<PivotPageViewModel>();
            container.PerRequest<TabViewModel>();

            AddCustomConventions();
        }
Пример #4
0
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);

            container.RegisterPhoneServices();
            container.PerRequest <MainPageViewModel>();
            container.PerRequest <PivotPageViewModel>();
            container.PerRequest <TabViewModel>();

            AddCustomConventions();
        }
Пример #5
0
        protected override void Configure() {
            container = new PhoneContainer();

            if (!Execute.InDesignMode)
                container.RegisterPhoneServices(RootFrame);

            container.PerRequest<MainPageViewModel>();
            container.PerRequest<MessageViewModel, MessageViewModel>();
            container.PerRequest<DialogViewModel, DialogViewModel>();

            AddCustomConventions();
        }
 protected override void Configure()
 {
     container = new PhoneContainer();
     if (!Execute.InDesignMode)
     {
         container.RegisterPhoneServices(RootFrame);
     }
     container.PerRequest <MainPageViewModel>();
     container.PerRequest <IGoogleApiService, GoogleApiService>();
     container.PerRequest <PizzernatorDataContext>();
     container.PerRequest <RestaurantPreviewViewModel>();
 }
        protected override void Configure()
        {
            _container = new PhoneContainer();

            if (!Execute.InDesignMode)
            {
                _container.RegisterPhoneServices(RootFrame);
            }

            _container.PerRequest <HomeViewModel>();
            _container.PerRequest <QuestionDetailViewModel>();
        }
Пример #8
0
        protected override void Configure()
        {
            container = new PhoneContainer();
            if (!Execute.InDesignMode)
            {
                container.RegisterPhoneServices(RootFrame);
            }

            container.PerRequest <MainViewModel>();
            container.PerRequest <AddNewLocalizationViewModel>();
            container.PerRequest <WeatherViewModel>();

            AddCustomConventions();
        }
Пример #9
0
        protected override void Configure()
        {
            _container = new PhoneContainer();

            if (!Execute.InDesignMode)
            {
                _container.RegisterPhoneServices(RootFrame);
                _container.PerRequest <MainViewModel>();
                _container.PerRequest <NewListViewModel>();
                _container.PerRequest <NewListItemsViewModel>();
            }

            AddCustomConventions();
        }
Пример #10
0
        protected override void Configure()
        {
            container = new PhoneContainer();

            if (!Execute.InDesignMode)
            {
                container.RegisterPhoneServices(RootFrame);
            }

            container.PerRequest <MainPageViewModel>();
            container.PerRequest <MessageViewModel, MessageViewModel>();
            container.PerRequest <DialogViewModel, DialogViewModel>();

            AddCustomConventions();
        }
Пример #11
0
 protected override void Configure()
 {
     container = new PhoneContainer(RootFrame);
     container.RegisterPhoneServices();
     container.PerRequest <IDataContextWrapper, DataContextWrapper <ClientsManagerDataContext> >();
     container.PerRequest <ClientsListViewModel>();
     container.PerRequest <ClientEditViewModel>();
     container.PerRequest <GroupsListViewModel>();
     container.PerRequest <GroupAddViewModel>();
     container.PerRequest <GroupAddClientViewModel>();
     container.PerRequest <PhotoViewModel>();
     container.PerRequest <SkyDriveFolderChooserViewModel>();
     container.PerRequest <ClientsCriteriaListViewModel>();
     container.PerRequest <ClientsCriteriaViewModel>();
 }
Пример #12
0
        protected override void Configure()
        {
            _container = new PhoneContainer();

            _container.RegisterPhoneServices(RootFrame);

            RegisterNavigation();
            RegisterServices();

            _container.PerRequest <MainPageViewModel>();
            _container.PerRequest <UserProfilePageViewModel>();
            _container.PerRequest <PhotosPageViewModel>();

            AddCustomConventions();

            InteractionEffectManager.AllowedTypes.Add(typeof(Border));
        }
Пример #13
0
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);

            container.RegisterPhoneServices();
            container.PerRequest <LoginViewModel>();
            container.PerRequest <GroupListViewModel>();
            container.PerRequest <GroupDetailsViewModel>();
            container.PerRequest <AddDebtViewModel>();
            container.PerRequest <MainPanoramaPageViewModel>();
            container.AllTypesOf <IPage>(Assembly.GetExecutingAssembly());

            container.Singleton <RegistrationService>();
            container.Singleton <WalleetServiceClient>();

            AddCustomConventions();
        }
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);

            container.RegisterPhoneServices();
            container.PerRequest <MainViewModel>();
            container.PerRequest <DetailsViewModel>();
            container.PerRequest <PhotoShareViewModel>();
            container.PerRequest <ITalao, Talao>();
            container.RegisterSingleton(typeof(IMultasRealizadas), null, typeof(MultasRealizadas));
            container.Instance <IObjectStorageHelper <ListaDeMultasRealizadas> >(new ObjectStorageHelper <ListaDeMultasRealizadas>());
            AddCustomConventions();
#if DEBUG
            //LogManager.GetLog = type => new DebugLogger(type);
#endif
            MapeiaRootFrame();
        }
Пример #15
0
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);

            if (!Execute.InDesignMode)
            {
                container.RegisterPhoneServices();
            }

            container.PerRequest <MainPageViewModel>();
            container.PerRequest <ArPageViewModel>();
            container.PerRequest <EarlierPageViewModel>();
            container.PerRequest <ReadArticlePageViewModel>();
            container.PerRequest <SettingsPageViewModel>();

            AddCustomConventions();
        }
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);
            container.RegisterPhoneServices();

            container.PerRequest <MainPageViewModel>();

            Caliburn.Micro.WP71.Recipes.ExternalModules.ExternalModuleLoader.Initialize();
        }
Пример #17
0
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);
            container.RegisterPhoneServices();

            container.PerRequest <MainPageViewModel>();

            ViewLocator.NameTransformer.AddRule(typeof(File).FullName, typeof(FileView).FullName);
            ViewLocator.NameTransformer.AddRule(typeof(Folder).FullName, typeof(FolderView).FullName);
        }
Пример #18
0
        protected override void Configure()
        {
            container = new PhoneContainer();
            container.RegisterPhoneServices(RootFrame);
            container.Singleton <IMessageService, MessageService>();

            //NOTE: don't register anything from the module assemblies here
            container.PerRequest <MainPageViewModel>();

            //NOTE: install the conventions
            ModuleConventions.Install();
        }
Пример #19
0
        protected override async void Configure()
        {
            container = new PhoneContainer(RootFrame);
            container.RegisterPhoneServices();

            container
            .Singleton <IBookedFlightsService, BookedFlightsService>();

            container
            .PerRequest <MenuViewModel>()
            .PerRequest <FlightSearchViewModel>()
            .PerRequest <BookingsViewModel>();

            await VoiceCommandService.InstallCommandSetsFromFileAsync(new Uri("ms-appx:///resources/commands.xml"));
        }
        protected override void Configure()
        {
            if (RootFrame == null)
                return;

            container = new PhoneContainer();

            container.RegisterPhoneServices(RootFrame);

            // View Models
            container.PerRequest<MainViewModel>();

            // Services

            AddCustomConventions();
        }
Пример #21
0
        protected override void Configure()
        {
            _container = new PhoneContainer(RootFrame);

            _container.RegisterPhoneServices();

            _container.PerRequest <MainPageViewModel>();
            _container.PerRequest <TagsPivotPageViewModel>();
            _container.PerRequest <AccountDetailsPageViewModel>();
            _container.PerRequest <AccountProviderSelectPageViewModel>();

            _container.PerRequest <AccountProviderIconViewModel>();
            _container.PerRequest <AccountViewModel>();
            _container.PerRequest <TagViewModel>();

            _container.PerRequest <AccountFieldBase>();

            AddCustomConventions();
        }
Пример #22
0
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);

            BlobCache.ApplicationName = "TestApp";

            var localPath = Path.Combine(ApplicationData.Current.LocalFolder.Path, "settings.db");

            //var roamingPath = Path.Combine(ApplicationData.Current.RoamingFolder.Path, "settings.db");
            //var secretPath = Path.Combine(ApplicationData.Current.RoamingFolder.Path, "secret.db");

            BlobCache.LocalMachine = new SqlitePersistentBlobCache(localPath);
            //BlobCache.UserAccount = new SqlitePersistentBlobCache(localPath);
            //BlobCache.Secure = new Akavache.Sqlite3.EncryptedBlobCache(localPath);

            container.RegisterPhoneServices();
            container.PerRequest <MainPageViewModel>();

            AddCustomConventions();
        }
Пример #23
0
        protected override void Configure()
        {
            container = new PhoneContainer();

            if (!Execute.InDesignMode)
            {
                container.RegisterPhoneServices(RootFrame);
            }

            container
            .PerRequest <MenuViewModel>()
            .PerRequest <BindingsViewModel>()
            .PerRequest <ActionsViewModel>()
            .PerRequest <CoroutineViewModel>()
            .PerRequest <ExecuteViewModel>()
            .PerRequest <EventAggregationViewModel>()
            .PerRequest <DesignTimeViewModel>()
            .PerRequest <ConductorViewModel>()
            .PerRequest <BubblingViewModel>();
        }
Пример #24
0
        protected override void Configure()
        {
            _container = new PhoneContainer();
            if (!Execute.InDesignMode)
            {
                _container.RegisterPhoneServices(RootFrame);
            }

            _container.PerRequest <MainPageViewModel>();
            _container.PerRequest <PivotPageViewModel>();
            _container.PerRequest <PanoramaPageViewModel>();
            _container.PerRequest <Item1ViewModel>();
            _container.PerRequest <Item2ViewModel>();
            _container.PerRequest <Item3ViewModel>();
            _container.PerRequest <Item4ViewModel>();

            AddCustomConventions();

            if (Debugger.IsAttached)
            {
                LogManager.GetLog = type => new DebugLogger(type);
            }
        }
Пример #25
0
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);

            container.RegisterPhoneServices();

            // services
            container.RegisterSingleton(typeof(IAppSettings), "AppSettings", typeof(AppSettings));
            container.RegisterSingleton(typeof(INavigationManager), "NavigationManager", typeof(NavigationManager));
            container.RegisterSingleton(typeof(IMessageService), "MessageService", typeof(MessageService));

            container.Instance <IProgressService>(new ProgressService(RootFrame));
            container.PerRequest <IFlowdockContext, LoggedInFlowdockContext>();
            container.PerRequest <IFlowStreamingConnection, FlowStreamingConnection>();


            // viewmodels
            container.PerRequest <LoginViewModel>();
            container.PerRequest <LobbyViewModel>();
            container.PerRequest <FlowViewModel>();
            container.PerRequest <UsersViewModel>();
            container.PerRequest <MessageThreadViewModel>();
        }
Пример #26
0
        private void RegisterViews()
        {
            _phoneContainer.PerRequest <MainPageViewModel>();
            _phoneContainer.PerRequest <ReadPageViewModel>();
            _phoneContainer.PerRequest <ContentsPageViewModel>();
            _phoneContainer.PerRequest <CatalogsViewModel>();
            _phoneContainer.PerRequest <UserLibraryViewModel>();
            _phoneContainer.PerRequest <UserLibraryPageViewModel>();
            _phoneContainer.PerRequest <AddCatalogPageViewModel>();
            _phoneContainer.PerRequest <CatalogPageViewModel>();
            _phoneContainer.PerRequest <CopsPageViewModel>();
            _phoneContainer.PerRequest <CatalogSearchPageViewModel>();
            _phoneContainer.PerRequest <AllCatalogsSearchPageViewModel>();
            _phoneContainer.PerRequest <SearchPageViewModel>();
            _phoneContainer.PerRequest <WebBrowserPageViewModel>();
            _phoneContainer.PerRequest <AuthorizationPageViewModel>();

            //settings
            _phoneContainer.PerRequest <SettingsPivotViewModel>();
            _phoneContainer.PerRequest <GeneralViewModel>();
            _phoneContainer.PerRequest <FormattingViewModel>();
            _phoneContainer.PerRequest <AboutViewModel>();

            _phoneContainer.PerRequest <LockScreenSettingPageViewModel>();
            _phoneContainer.PerRequest <OrientationSettingPageViewModel>();
            _phoneContainer.PerRequest <FontSettingPageViewModel>();
            _phoneContainer.PerRequest <MenuSettingPageViewModel>();
            _phoneContainer.PerRequest <MarginsSettingPageViewModel>();
            _phoneContainer.PerRequest <ThemeSettingPageViewModel>();
            _phoneContainer.PerRequest <CSSSettingPageViewModel>();
            _phoneContainer.PerRequest <HyphenationSettingPageViewModel>();
            _phoneContainer.PerRequest <FlippingSettingPageViewModel>();
            _phoneContainer.PerRequest <ScreenBrightnessPageViewModel>();

            //bookmarks
            _phoneContainer.PerRequest <BookmarksPivotViewModel>();
            _phoneContainer.PerRequest <ThisBookBookmarksViewModel>();
            _phoneContainer.PerRequest <AllBooksBookmarksViewModel>();
            _phoneContainer.PerRequest <BookmarkSearchPageViewModel>();

            _phoneContainer.PerRequest <SearchInBookPageViewModel>();
            _phoneContainer.PerRequest <BookInfoPageViewModel>();
            _phoneContainer.PerRequest <EditBookPageViewModel>();

            _phoneContainer.PerRequest <DownloadListPageViewModel>();
        }
Пример #27
0
        private static void RegisterViewModels(PhoneContainer container)
        {
            container.PerRequest <LoginPageViewModel>();
            container.PerRequest <ServerPickerPageViewModel>();
            container.PerRequest <ServersPageViewModel>();
            container.PerRequest <MainPageViewModel>();

            container.PerRequest <OverviewViewModel>();
            container.PerRequest <HostGroupsPageViewModel>();
            container.PerRequest <HostsPageViewModel>();
            container.PerRequest <HostTriggersPageViewModel>();
            container.PerRequest <EventsPageViewModel>();

            container.PerRequest <TimelineViewModel>();
            container.PerRequest <TimelinePageViewModel>();

            container.PerRequest <TriggersViewModel>();
            container.PerRequest <TriggersPageViewModel>();

            container.PerRequest <AboutPageViewModel>();
            container.Singleton <PushSettingsPageViewModel>();
            container.PerRequest <GraphsPageViewModel>();
            container.PerRequest <GraphPageViewModel>();
            container.PerRequest <DataPageViewModel>();
            container.PerRequest <PeriodPageViewModel>();
            container.PerRequest <CustomPeriodPageViewModel>();

            container.PerRequest <FavoritesViewModel>();
            container.PerRequest <FavoritesPageViewModel>();
            container.PerRequest <ViewModels.FavoritesHub.TriggersViewModel>();
            container.PerRequest <ViewModels.FavoritesHub.GraphsViewModel>();
        }
Пример #28
0
        protected override void Configure()
        {
            _container = new PhoneContainer();

            if (!DesignerProperties.IsInDesignTool)
            {
                _container.RegisterPhoneServices(RootFrame);
            }

            _container.PerRequest <SecretContactDetailsViewModel>();
            _container.PerRequest <SecretMediaViewModel>();
            _container.PerRequest <SecretContactViewModel>();


            _container.Singleton <ShellViewModel>();
            _container.Singleton <DialogsViewModel>();
            _container.Singleton <ContactsViewModel>();

            _container.Singleton <LogViewModel>();
#if DEBUG
            _container.Singleton <DebugViewModel>();
            _container.Singleton <LongPollViewModel>();
            _container.Singleton <PerformanceViewModel>();
#endif
            _container.PerRequest <EncryptionKeyViewModel>();
            _container.PerRequest <AboutViewModel>();
            _container.PerRequest <CacheViewModel>();
            _container.PerRequest <StartupViewModel>();
            _container.PerRequest <SignInViewModel>();
            _container.PerRequest <SignUpViewModel>();
            _container.PerRequest <ConfirmViewModel>();
            _container.PerRequest <ContactViewModel>();
            _container.PerRequest <ContactDetailsViewModel>();
            _container.PerRequest <ContactInfoViewModel>();
            _container.PerRequest <ChatViewModel>();
            _container.PerRequest <AddChatParticipantViewModel>();
            _container.PerRequest <AddChannelManagerViewModel>();
            _container.PerRequest <AddSecretChatParticipantViewModel>();
            _container.PerRequest <EditChatViewModel>();
            _container.PerRequest <EditContactViewModel>();
            _container.PerRequest <EditCurrentUserViewModel>();
            _container.PerRequest <EditUsernameViewModel>();
            _container.PerRequest <EditPhoneNumberViewModel>();
            _container.PerRequest <ChangePhoneNumberViewModel>();
            _container.PerRequest <ChatDetailsViewModel>();
            _container.PerRequest <MediaViewModel <TLUserBase> >();
            _container.PerRequest <MediaViewModel <TLChatBase> >();
            _container.PerRequest <MediaViewModel <IInputPeer> >();
            _container.PerRequest <FullMediaViewModel>();
            _container.PerRequest <LinksViewModel <TLUserBase> >();
            _container.PerRequest <LinksViewModel <TLChatBase> >();
            _container.PerRequest <LinksViewModel <IInputPeer> >();
            _container.PerRequest <FilesViewModel <TLUserBase> >();
            _container.PerRequest <FilesViewModel <TLChatBase> >();
            _container.PerRequest <FilesViewModel <IInputPeer> >();
            _container.PerRequest <MusicViewModel <TLUserBase> >();
            _container.PerRequest <MusicViewModel <TLChatBase> >();
            _container.PerRequest <MusicViewModel <IInputPeer> >();
            _container.PerRequest <ImageViewerViewModel>();
            _container.PerRequest <AnimatedImageViewerViewModel>();
            _container.PerRequest <DecryptedImageViewerViewModel>();
            _container.PerRequest <ProfilePhotoViewerViewModel>();
            _container.PerRequest <ShareViewModel>();
            _container.PerRequest <DialogDetailsViewModel>();
            _container.PerRequest <SecretDialogDetailsViewModel>();
            _container.PerRequest <CreateDialogViewModel>();
            _container.PerRequest <CreateBroadcastViewModel>();
            _container.PerRequest <CreateChannelViewModel>();
            _container.PerRequest <CreateChannelStep1ViewModel>();
            _container.PerRequest <CreateChannelStep2ViewModel>();
            _container.PerRequest <CreateChannelStep3ViewModel>();
            _container.PerRequest <ChooseParticipantsViewModel>();
            _container.PerRequest <SettingsViewModel>();
            _container.PerRequest <NotificationsViewModel>();
            _container.PerRequest <BlockedContactsViewModel>();
            _container.PerRequest <ChooseBackgroundViewModel>();
            _container.PerRequest <ChooseAttachmentViewModel>();
            _container.PerRequest <AskQuestionConfirmationViewModel>();
            _container.PerRequest <AddChatParticipantConfirmationViewModel>();
            _container.PerRequest <MapViewModel>();
            _container.PerRequest <SearchShellViewModel>();
            _container.PerRequest <SearchDialogsViewModel>();
            _container.PerRequest <SearchMessagesViewModel>();
            _container.PerRequest <DialogSearchMessagesViewModel>();
            _container.PerRequest <SearchContactsViewModel>();
            _container.PerRequest <SearchFilesViewModel>();
            _container.PerRequest <SearchLinksViewModel>();
            _container.PerRequest <SearchMusicViewModel>();
            _container.PerRequest <SearchViewModel>();
            _container.PerRequest <ShareContactViewModel>();
            _container.PerRequest <VideoPlayerViewModel>();
            _container.PerRequest <LastSeenViewModel>();
            _container.PerRequest <PrivacySecurityViewModel>();
            _container.PerRequest <AccountSelfDestructsViewModel>();
            _container.PerRequest <AllowUsersViewModel>();
            _container.PerRequest <ChooseTTLViewModel>();
            _container.PerRequest <ChooseNotificationSpanViewModel>();
            _container.PerRequest <MessageViewerViewModel>();
            _container.PerRequest <FastDialogDetailsViewModel>();

            _container.PerRequest <PasscodeViewModel>();
            _container.PerRequest <ChangePasscodeViewModel>();
            _container.PerRequest <EnterPasscodeViewModel>();
            _container.PerRequest <LockscreenViewModel>();

            _container.PerRequest <ConfirmPasswordViewModel>();
            _container.PerRequest <PasswordViewModel>();
            _container.PerRequest <ChangePasswordViewModel>();
            _container.PerRequest <ChangePasswordHintViewModel>();
            _container.PerRequest <ChangePasswordEmailViewModel>();
            _container.PerRequest <EnterPasswordViewModel>();
            _container.PerRequest <PasswordRecoveryViewModel>();

            //_container.PerRequest<FastDialogDetailsViewModel>();

            _container.PerRequest <SessionsViewModel>();

#if WP81
            _container.PerRequest <EditVideoViewModel>();
#endif
            _container.Singleton <ChooseCountryViewModel>();
            _container.PerRequest <VideoCaptureViewModel>();
            _container.PerRequest <PrivacyStatementViewModel>();
            _container.PerRequest <ChooseDialogViewModel>();
            _container.PerRequest <SnapshotsViewModel>();
            _container.PerRequest <UsernameHintsViewModel>();
            _container.PerRequest <HashtagHintsViewModel>();
            _container.PerRequest <UserActionViewModel>();
            _container.PerRequest <ImageEditorViewModel>();
#if WP8
            _container.PerRequest <MultiImageEditorViewModel>();
#endif
            _container.PerRequest <InviteLinkViewModel>();
            _container.PerRequest <SearchVenuesViewModel>();
            _container.PerRequest <StickersViewModel>();
            _container.PerRequest <SecretChatDebugViewModel>();
            _container.PerRequest <CommandHintsViewModel>();
            _container.PerRequest <DialogSearchMessagesViewModel>();
            _container.PerRequest <ChannelAdministratorsViewModel>();
            _container.PerRequest <ChannelMembersViewModel>();
            _container.PerRequest <ChannelIntroViewModel>();
            _container.PerRequest <AddAdminsViewModel>();

            _container.Singleton <ITelegramEventAggregator, TelegramEventAggregator>();
            _container.Singleton <IConnectionService, ConnectionService>();
            _container.Singleton <ICommonErrorHandler, CommonErrorHandler>();
            _container.Singleton <IMTProtoService, MTProtoService>();
            _container.Singleton <IStateService, StateService>();
            _container.Singleton <ITransport, HttpTransport>();
            _container.Singleton <ICacheService, InMemoryCacheService>();
            _container.Singleton <IUpdatesService, UpdatesService>();
            _container.Singleton <IFileManager, FileManager>();
            _container.Singleton <IVideoFileManager, VideoFileManager>();
            _container.Singleton <IEncryptedFileManager, EncryptedFileManager>();
            _container.Singleton <IUploadFileManager, UploadFileManager>();
            _container.Singleton <ITransportService, TransportService>();

            _container.Singleton <IDeviceInfoService, PhoneInfoService>();
            _container.Singleton <IExtendedDeviceInfoService, PhoneInfoService>();

#if WP81 && WNS_PUSH_SERVICE
            _container.Singleton <IPushService, WNSPushService>();
#else
            _container.Singleton <IPushService, PushService>();
#endif
            _container.Singleton <IUploadVideoFileManager, UploadVideoFileManager>();
            _container.Singleton <IDocumentFileManager, DocumentFileManager>();
            _container.Singleton <IAudioFileManager, AudioFileManager>();
            _container.Singleton <IUploadAudioFileManager, UploadAudioFileManager>();
            _container.Singleton <IUploadDocumentFileManager, UploadDocumentFileManager>();



            SetupViewLocator();

            // avoid xaml ui designer crashes
            if (Caliburn.Micro.Execute.InDesignMode)
            {
                return;
            }

            StartBugsenseAsync();
            AddCustomConventions();
        }
Пример #29
0
        private void RegisterServices(PhoneContainer container)
        {
            container.RegisterHandler(typeof(IGlobalBusyIndicatorManager), string.Empty,
                                      c => GlobalBusyIndicatorManager.Create((PhoneApplicationPage)RootFrame.Content));

            container.Singleton <IServiceConfiguration, ServiceConfiguration>();
            container.Singleton <IWebConfiguration, WebConfiguration>();
            container.PerRequest <IApplicationConfiguration, ApplicationConfiguration>();

            container.PerRequest <IRequestBodyBuilder, RequestBodyBuilder>();
            container.PerRequest <IWebChannel, ZabbixWebChannel>();

            container.PerRequest <IUserProxyServer, ZabbixUserProxyServer>();
            container.PerRequest <IUserManagmentFacade, UserManagmentFacade>();
            container.PerRequest <IHostGroupProxyServer, ZabbixHostGroupProxyServer>();
            container.PerRequest <IHostProxyServer, ZabbixHostProxyServer>();
            container.PerRequest <ITriggerProxyServer, ZabbixTriggerProxyServer>();
            container.PerRequest <IEventProxyServer, ZabbixEventProxyServer>();
            container.PerRequest <IServerChecker, ZabbixServerChecker>();
            container.PerRequest <IGraphsProxyServer, ZabbixGraphsProxyServer>();
            container.PerRequest <IDataProxyServer, ZabbixDataProxyServer>();

            container.PerRequest <IDeviceManagementService, DeviceManagementService>();
            container.Singleton <IPushChannelService, PushChannelService>();

            container.Singleton <IApplicationSettings, ApplicationSettings>();
            container.PerRequest <ISettingsStorage, SettingsStorage>();
            container.PerRequest <IErrorHandler, ErrorHandler>();
            container.PerRequest <IErrorReporter, ErrorReporter>();
            container.PerRequest <IMessagingService, MessagingService>();
            container.PerRequest <IDeviceInformationManager, DeviceInformationManager>();
            container.PerRequest <INetworkStateManager, NetworkStateManager>();

            container.Singleton <IFavoritesStorage <Trigger>, FavoritesStorage <Trigger> >();
            container.Singleton <IFavoritesStorage <Graph>, FavoritesStorage <Graph> >();
            container.PerRequest <IIsolatedStorageFactory, IsolatedStorageFactory>();

            container.Singleton <IAnalyticsService, FlurryAnalytics>();

            var navigationServiceResolver = new NavigationServiceResolver(RootFrame);

            container.RegisterInstance(typeof(INavigationServiceResolver), null, navigationServiceResolver);

            container.Singleton <AnaliticsNavigationPageLogger>();
            container.GetInstance(typeof(AnaliticsNavigationPageLogger), null);
        }
Пример #30
0
 protected override void ConfigureContainer(PhoneContainer container)
 {
     container.PerRequest <AnotherViewModel>();
 }
Пример #31
0
 private void RegisterViewModels()
 {
     _container.PerRequest <LoginPageViewModel>();
 }
Пример #32
0
        protected override void Configure()
        {
            container = new PhoneContainer();

            container.RegisterPhoneServices(RootFrame);

            container.Instance <IProgressService>(new ProgressService(RootFrame));

            container.Singleton <IAnalyticsService, AnalyticsService>();
            container.Singleton <ITivoConnectionService, TivoConnectionService>();
            container.Singleton <IScheduledRecordingsService, ScheduledRecordingsService>();

            container.PerRequest <SettingsPageViewModel>();
            container.PerRequest <MainPageViewModel>();
            container.PerRequest <ShowContainerShowsPageViewModel>();
            container.PerRequest <CollectionDetailsPageViewModel>();
            container.PerRequest <ShowDetailsPageViewModel>();
            container.PerRequest <PersonDetailsPageViewModel>();

            container.PerRequest <MyShowsViewModel>();
            container.PerRequest <ChannelListViewModel>();
            container.PerRequest <ToDoListViewModel>();
            container.PerRequest <SearchViewModel>();
            container.PerRequest <IndividualShowViewModel>();
            container.PerRequest <OfferViewModel>();
            container.PerRequest <RecordingViewModel>();
            container.PerRequest <ShowContainerViewModel>();
            container.PerRequest <LazyRecordingFolderItemViewModel>();
            container.PerRequest <PersonItemViewModel>();
            container.PerRequest <CollectionItemViewModel>();
            container.PerRequest <CreditsViewModel>();
            container.PerRequest <PersonContentViewModel>();
            container.PerRequest <UpcomingOffersViewModel>();

            AddCustomConventions();
        }
Пример #33
0
 protected override void Configure(PhoneContainer container)
 {
     container.PerRequest <MyPageViewModel>();
     container.PerRequest <FeaturePageViewModel>();
 }