示例#1
0
文件: Main.cs 项目: pascalfr/MPfm
		public static void Main(string[] args)
        {
            // Add view implementations to IoC
            Application.Init();
            Bootstrapper.GetContainer().Register<NavigationManager, GtkNavigationManager>().AsSingleton();
            Bootstrapper.GetContainer().Register<ISyncDeviceSpecifications, LinuxSyncDeviceSpecifications>().AsSingleton();
            Bootstrapper.GetContainer().Register<IAppConfigProvider, XmlAppConfigProvider>().AsSingleton();
            Bootstrapper.GetContainer().Register<ICloudService, DropboxCoreService>().AsSingleton();
			Bootstrapper.GetContainer().Register<ISplashView, SplashWindow>().AsMultiInstance();
			Bootstrapper.GetContainer().Register<IMainView, MainWindow>().AsMultiInstance();
			Bootstrapper.GetContainer().Register<IUpdateLibraryView, UpdateLibraryWindow>().AsMultiInstance();
			Bootstrapper.GetContainer().Register<IDesktopPreferencesView, PreferencesWindow>().AsMultiInstance();
			Bootstrapper.GetContainer().Register<IDesktopEffectsView, EffectsWindow>().AsMultiInstance();
			Bootstrapper.GetContainer().Register<IPlaylistView, PlaylistWindow>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISyncView, SyncWindow>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISyncMenuView, SyncMenuWindow>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISyncDownloadView, SyncDownloadWindow>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISyncCloudView, SyncCloudWindow>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISyncWebBrowserView, SyncWebBrowserWindow>().AsMultiInstance();
			
			// Create and start navigation manager
			navigationManager = Bootstrapper.GetContainer().Resolve<NavigationManager>();
			navigationManager.CreateSplashView();
			Application.Run();
		}
示例#2
0
文件: App.xaml.cs 项目: pascalfr/MPfm
        //protected override void OnStartup(StartupEventArgs e)
        protected void App_Startup(object sender, StartupEventArgs e)
        {
            Tracing.Log("App - OnStartup");
            CheckForOtherInstances();
            RegisterIoC();

            AppConfigManager.Instance.Load();
            Tracing.Log("App - OnStartup - isFirstRun: {0}", AppConfigManager.Instance.Root.IsFirstRun);
            _navigationManager = Bootstrapper.GetContainer().Resolve<NavigationManager>();            
            if (AppConfigManager.Instance.Root.IsFirstRun)
                _navigationManager.CreateFirstRunView();
            else
                _navigationManager.CreateSplashView();
        }
示例#3
0
		public override void FinishedLaunching(NSObject notification)
		{
            Bootstrapper.GetContainer().Register<ISyncDeviceSpecifications, MacSyncDeviceSpecifications>().AsSingleton();   
            Bootstrapper.GetContainer().Register<IAppConfigProvider, XmlAppConfigProvider>().AsSingleton();
            Bootstrapper.GetContainer().Register<IMemoryGraphicsContextFactory, MemoryGraphicsContextFactory>().AsSingleton();
            Bootstrapper.GetContainer().Register<IDisposableImageFactory, DisposableImageFactory>().AsSingleton();
            Bootstrapper.GetContainer().Register<ICloudService, DropboxCoreService>().AsSingleton();   
            Bootstrapper.GetContainer().Register<IWaveFormCacheService, WaveFormCacheService>().AsSingleton();   
            Bootstrapper.GetContainer().Register<IWaveFormRenderingService, WaveFormRenderingService>().AsSingleton();   
            Bootstrapper.GetContainer().Register<NavigationManager, MacNavigationManager>().AsSingleton();
            Bootstrapper.GetContainer().Register<ISplashView, SplashWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<IMainView, MainWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<IUpdateLibraryView, UpdateLibraryWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<IPlaylistView, PlaylistWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ICloudConnectView, CloudConnectWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<IDesktopEffectsView, EffectsWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<IDesktopPreferencesView, PreferencesWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<IStartResumePlaybackView, StartResumePlaybackWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ILibraryBrowserView, MainWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISongBrowserView, MainWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<IEditSongMetadataView, EditSongMetadataWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ILoopsView, MainWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ILoopDetailsView, MainWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISegmentDetailsView, MainWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<IMarkersView, MainWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<IMarkerDetailsView, MainWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISyncView, SyncWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISyncMenuView, SyncMenuWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISyncDownloadView, SyncDownloadWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISyncCloudView, SyncCloudWindowController>().AsMultiInstance();
            Bootstrapper.GetContainer().Register<ISyncWebBrowserView, SyncWebBrowserWindowController>().AsMultiInstance();

            // Create and start navigation manager
            _navigationManager = Bootstrapper.GetContainer().Resolve<NavigationManager>();
            _navigationManager.CreateSplashView();
        }