protected override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainPageViewModel>(); container.PerRequest<ItemViewModel>(); }
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(); }
protected override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.Singleton<ExceptionViewModel>(); container.Singleton<ConnectionQueryViewModel>(); container.Singleton<DepartureViewModel>(); container.Singleton<FavoriteStationsViewModel>(); container.Singleton<SearchStationsViewModel>(); container.Singleton<NearbyStationsViewModel>(); container.Singleton<MainPageViewModel>(); container.Singleton<SettingsViewModel>(); container.Singleton<HistoryViewModel>(); container.Singleton<SearchViewModel>(); container.PerRequest<ConnectionViewModel>(); container.PerRequest<DetailViewModel>(); container.Singleton<StationsViewModel>(); container.PerRequest<MessageViewModel>(); container.PerRequest<DialogViewModel>(); AddCustomConventions(); }
protected override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainPageViewModel>(); container.PerRequest<ItemViewModel>(); #region GUID Generation and PushNotification Channel Establishing if (IsolatedStorageSettings.ApplicationSettings.Contains("DeviceId")) { phoneId = (Guid)IsolatedStorageSettings.ApplicationSettings["DeviceId"]; } else { phoneId = Guid.NewGuid(); IsolatedStorageSettings.ApplicationSettings["DeviceId"] = phoneId; } //manager = new NotificationManager(); //manager.SetupNotificationChannel(); #endregion if (IsolatedStorageSettings.ApplicationSettings.Contains("Username") && IsolatedStorageSettings.ApplicationSettings.Contains("Password")) { username = (string)IsolatedStorageSettings.ApplicationSettings["Username"]; password = (string)IsolatedStorageSettings.ApplicationSettings["Password"]; loggedIn = true; } }
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(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainPageViewModel>(); container.PerRequest<SettingsViewModel>(); AddCustomConventions(); }
protected override void Configure() { container = new PhoneContainer(); container.RegisterPhoneServices(RootFrame); container.PerRequest<MainPageViewModel>(); container.PerRequest<ItemViewModel>(); container.PerRequest<IFileStorageService, PhoneFileStorageService>(); container.PerRequest<IGoogleAnalytics, GoogleAnalyticsWrapper>(); }
protected override void Configure() { container = new PhoneContainer(); if (!Execute.InDesignMode) container.RegisterPhoneServices(RootFrame); container.PerRequest<MainPageViewModel>(); container.PerRequest<Page2ViewModel>(); AddCustomConventions(); }
protected override void Configure() { _container = new PhoneContainer(); // register Coding4FunWindowManager BEFORE calling RegisterPhoneServices _container.Singleton<IWindowManager, Coding4FunWindowManager>(); _container.RegisterPhoneServices(RootFrame); _container.PerRequest<MainPageViewModel>(); _container.PerRequest<DialogViewModel>(); }
protected override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainPageViewModel>(); container.PerRequest<SpeakViewModel>(); container.PerRequest<ListenViewModel>(); container.PerRequest<DownloadPanoramaItemViewModel>(); AddCustomConventions(); }
protected override void Configure() { _phoneContainer = new PhoneContainer(); _phoneContainer.RegisterPhoneServices(RootFrame); _phoneContainer.PerRequest<MainPageViewModel>(); _phoneContainer.PerRequest<PledgeViewModel>(); _phoneContainer.PerRequest<ChallengeViewModel>(); _phoneContainer.PerRequest<CharitiesViewModel>(); ConventionManager.AddElementConvention<BindableAppBarMenuItem>(Control.IsEnabledProperty, "DataContext", "Click"); ConventionManager.AddElementConvention<BindableAppBarButton>(Control.IsEnabledProperty, "DataContext", "Click"); ConventionManager.AddElementConvention<DatePicker>(DateTimePickerBase.ValueProperty, "Value", "SelectedDate"); }
protected override void Configure() { if (Execute.InDesignMode) return; container = new PhoneContainer(); container.RegisterPhoneServices(RootFrame); container.PerRequest<MainPageViewModel>(); container.PerRequest<SettingsPageViewModel>(); AddCustomConventions(); PhoneService.Launching += new EventHandler<LaunchingEventArgs>(PhoneService_Launching); PhoneService.Activated += new EventHandler<ActivatedEventArgs>(PhoneService_Activated); }
protected override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainPageViewModel>(); container.Singleton<SettingsPageViewModel>(); container.PerRequest<TFSDataServiceContext>(); container.PerRequest<RecentProjectsViewModel>(); container.PerRequest<AllProjectsViewModel>(); AddCustomConventions(); }
protected override void Configure() { _container = new PhoneContainer(); if (!Execute.InDesignMode) { _container.RegisterPhoneServices(RootFrame); _container.PerRequest<MainViewModel>(); _container.PerRequest<NewListViewModel>(); _container.PerRequest<NewListItemsViewModel>(); } AddCustomConventions(); }
protected override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainPageViewModel>(); container.PerRequest<SettingsViewModel>(); container.PerRequest<BabyFeedSettings>(); container.PerRequest<DataHelper>(); //container.PerRequest<PivotPageViewModel>(); //container.PerRequest<TabViewModel>(); AddCustomConventions(); }
protected override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainPageViewModel>(); container.PerRequest<RegistrationViewModel>(); container.PerRequest<RiddleListViewModel>(); container.RegisterSingleton(typeof(RegistrationService), null, typeof(RegistrationService)); container.RegisterSingleton(typeof(IApplicationConfiguration), "IApplicationConfiguration", typeof(ApplicationStagingConfiguration)); AddCustomConventions(); }
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>(); }
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() { RootFrame.Background = GetColorFromHex("#FFF6F6EF"); // used for transitions container = new PhoneContainer(RootFrame); RootFrame.Background = GetColorFromHex("#FFF6F6EF"); // used for transitions container.RegisterPhoneServices(); container.PerRequest<MainViewModel>(); container.PerRequest<PostListViewModel>(); container.PerRequest<PostViewModel>(); container.PerRequest<AboutViewModel>(); container.PerRequest<SettingsViewModel>(); AddCustomConventions(); }
protected override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainPageViewModel>(); container.PerRequest<ApplicationLifeCycleViewModel>(); // get the caliburn phone service to handle even more lifecycle hooks var phoneService = container.GetInstance(typeof(IPhoneService), null) as IPhoneService; phoneService.Resurrecting += this.phoneService_Resurrecting; phoneService.Continuing += this.phoneService_Continuing; AddCustomConventions(); }
protected override void Configure() { container = new PhoneContainer(); container.RegisterPhoneServices(RootFrame); container.Singleton<MainViewModel>(); container.Singleton<StationsViewModel>(); container.PerRequest<HostPageViewModel>(); container.Singleton<FavoritesViewModel>(); container.Singleton<InfoViewModel>(); container.Singleton<NavigationStartViewModel>(); container.Singleton<NavigationViewModel>(); container.Singleton<DebugLog>(); container.Singleton<SystemConfigViewModel>(); container.Singleton<StationMapViewModel>(); container.Singleton<AboutViewModel>(); container.Singleton<RentTimerViewModel>(); container.Singleton<CityContextViewModel>(); container.Singleton<VersionHistoryViewModel>(); container.Singleton<AppInfoViewModel>(); #if DEBUG && !ANALYTICS container.Singleton<IAnalyticsService, NullAnalyticsService>(); container.Singleton<ILoggingService, NullLoggingService>(); //Caliburn.Micro.LogManager.GetLog = type => new DebugLog(type); #else container.Singleton<IAnalyticsService, AnalyticsService>(); container.Singleton<ILoggingService, LoggingService>(); #endif 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(); }
protected override void Configure() { Container = new PhoneContainer(); SettingsManager.ApplyDefaultsToAnyUnsetValues(); Container.RegisterPhoneServices(RootFrame); Container.PerRequest<MainPageViewModel>(); Container.PerRequest<SettingsPageViewModel>(); Container.PerRequest<EditSettingPageViewModel>(); ConventionManager.AddElementConvention<BindableAppBarButton>( Control.IsEnabledProperty, "DataContext", "Click"); ConventionManager.AddElementConvention<BindableAppBarMenuItem>( Control.IsEnabledProperty, "DataContext", "Click"); AddCustomConventions(); }
protected override void Configure() { _container = new PhoneContainer(); _container.RegisterPhoneServices(RootFrame); _container.PerRequest<HomePageViewModel>(); }
protected override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainPageViewModel>(); Caliburn.Micro.WP71.Recipes.ExternalModules.ExternalModuleLoader.Initialize(); }
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); }
protected override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainPageViewModel>(); container.Instance<IProgressService>(new ProgressService(RootFrame)); AddCustomConventions(); }
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(); }
protected override void Configure() { container = new PhoneContainer(); if (!Execute.InDesignMode) container.RegisterPhoneServices(RootFrame); container.Singleton<MainPageViewModel>(); container.Singleton<GamePageViewModel>(); // works around issue with storage handler // see: https://caliburnmicro.codeplex.com/workitem/340 container.Singleton<AddPlayerPageViewModel>(); container.PerRequest<PinPickerViewModel>(); container.PerRequest<AboutPageViewModel>(); container.PerRequest<ChangelogPageViewModel>(); AddCustomConventions(); EnableDebugging(); HandleFastResume(); #if DEBUG LogManager.GetLog = type => new DebugLogger(type); #else BugSenseHandler.Instance.InitAndStartSession(Application, Resources.AppSecrets.BugSenseApiKey); BugSenseHandler.Instance.UnhandledException += (sender, args) => { if (Debugger.IsAttached) { Debugger.Break(); } else { MessageBox.Show( "An error report will be sent so we can improve the app, please try running the app again!", "An error occurred", MessageBoxButton.OK); } }; LogManager.GetLog = type => new BugSenseLogger(type); #endif }
protected async override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainViewModel>(); container.PerRequest<IDbService,DbService>(); container.RegisterInstance(typeof(SQLiteAsyncConnection), "SQLiteAsyncConnection", new SQLiteAsyncConnection(Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "TestDb.sqlite"))); AddCustomConventions(); SQLiteAsyncConnection connection = (SQLiteAsyncConnection)container.GetInstance(typeof(SQLiteAsyncConnection), "SQLiteAsyncConnection"); //connection.DropTableAsync<Product>(); await connection.CreateTableAsync<Product>(); await connection.InsertAsync(new Product { Name = "Product 1", Serial = "123456" }); await connection.InsertAsync(new Product { Name = "Product 2", Serial = "123456" }); }