Inheritance: PlaylistController, IService
Exemple #1
0
        public static void RegisterServices(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit)
        {
            ts = new TemplatesService(new FileStorage(Config.DBDir));
            RegisterService(ts);
            Config.TeamTemplatesProvider       = ts.TeamTemplateProvider;
            Config.CategoriesTemplatesProvider = ts.CategoriesTemplateProvider;

            /* Start DB services */
            dbManager = new DataBaseManager(Config.DBDir, guiToolkit);
            RegisterService(dbManager);
            Config.DatabaseManager = dbManager;

            /* Start the rendering jobs manager */
            videoRenderer = new RenderingJobsManager(multimediaToolkit, guiToolkit);
            RegisterService(videoRenderer);
            Config.RenderingJobsManger = videoRenderer;

            projectsManager = new ProjectsManager(guiToolkit, multimediaToolkit, ts);
            RegisterService(projectsManager);

            /* State the tools manager */
            toolsManager = new ToolsManager(guiToolkit, dbManager);
            RegisterService(toolsManager);
            ProjectsImporter = toolsManager;

            /* Start the events manager */
            eManager = new EventsManager(guiToolkit, videoRenderer);
            RegisterService(eManager);

            /* Start the hotkeys manager */
            hkManager = new HotKeysManager();
            RegisterService(hkManager);

            /* Start playlists manager */
            plManager = new PlaylistManager(Config.GUIToolkit, videoRenderer);
            RegisterService(plManager);

            /* Start the Update Notifier */
            updatesNotifier = new UpdatesNotifier();
            RegisterService(updatesNotifier);
        }
Exemple #2
0
        public static void StartServices(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit)
        {
            ProjectsManager projectsManager;

            /* Start TemplatesService */
            ts = new TemplatesService(Config.TemplatesDir);
            Core.mainWindow.TemplatesService = ts;

            /* Start DB services */
            dbManager = new DataBaseManager(Config.DBDir, guiToolkit);
            dbManager.SetActiveByName(Config.CurrentDatabase);

            /* Start Migration */
            MigrationsManager migration = new MigrationsManager(ts, dbManager);

            migration.StartMigration();

            /* Start the rendering jobs manager */
            videoRenderer = new RenderingJobsManager(multimediaToolkit, guiToolkit);

            /* Start the events manager */
            eManager = new EventsManager(guiToolkit, videoRenderer);

            /* Start the hotkeys manager */
            hkManager = new HotKeysManager(guiToolkit.MainWindow);
            hkManager.newMarkEvent += eManager.OnNewTag;

            /* Start Game Units manager */
            guManager = new GameUnitsManager(mainWindow, mainWindow.Player);

            /* Start playlists manager */
            plManager = new PlaylistManager(guiToolkit, videoRenderer);

            projectsManager = new ProjectsManager(guiToolkit, multimediaToolkit);
            projectsManager.OpenedProjectChanged += OnOpenedProjectChanged;
        }
Exemple #3
0
        public static void StartServices(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit)
        {
            ProjectsManager projectsManager;

            /* Start TemplatesService */
            ts = new TemplatesService(Config.configDirectory);
            Core.mainWindow.TemplatesService = ts;

            /* Start DB services */
            db = new DataBase(Path.Combine(Config.DBDir(),Constants.DB_FILE));

            /* Start the events manager */
            eManager = new EventsManager(guiToolkit);

            /* Start the hotkeys manager */
            hkManager = new HotKeysManager(guiToolkit.MainWindow);
            hkManager.newMarkEvent += eManager.OnNewTag;

            /* Start the rendering jobs manager */
            videoRenderer = new RenderingJobsManager(multimediaToolkit, guiToolkit);

            /* Start Game Units manager */
            guManager = new GameUnitsManager(mainWindow, mainWindow.Player);

            /* Start playlists manager */
            plManager = new PlaylistManager(guiToolkit, videoRenderer);

            projectsManager = new ProjectsManager(guiToolkit, multimediaToolkit);
            projectsManager.OpenedProjectChanged += OnOpenedProjectChanged;
        }
        public void Setup()
        {
            mockGuiToolkit = new Mock<IGUIToolkit> ();
            App.Current.GUIToolkit = mockGuiToolkit.Object;
            App.Current.JobsManager = mockVideoRenderer.Object;
            mockDiaklogs = new Mock<IDialogs> ();
            App.Current.Dialogs = mockDiaklogs.Object;

            plmanager = new PlaylistManager ();
            plmanager.Start ();
            plmanager.Player = mockPlayerController.Object;

            OpenProject (new ProjectLongoMatch ());
            playlistElementLoaded = false;

            et = App.Current.EventsBroker.Subscribe<PlaylistElementLoadedEvent> ((e) => playlistElementLoaded = true);
        }
		public static void RegisterServices (IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit)
		{
			App.Current.DependencyRegistry.Register<IStorageManager, CouchbaseManagerLongoMatch> (1);
			App.Current.DependencyRegistry.Register<IFileStorage, LMFileStorage> (1);
			App.Current.MultimediaToolkit = multimediaToolkit;
			App.Current.GUIToolkit = guiToolkit;
			App.Current.EventsBroker = new EventsBroker ();
			App.Current.EventsBroker.Subscribe<QuitApplicationEvent> (HandleQuitApplicationEvent);

			/* Start DB services */
			dbManager = new DataBaseManager ();
			RegisterService (dbManager);

			ts = new TemplatesService ();
			RegisterService (ts);

			/* Start the rendering jobs manager */
			jobsManagerVM = new JobsManagerVM {
				Model = new RangeObservableCollection<Job> ()
			};
			App.Current.JobsManager = jobsManagerVM;
			RenderingJobsController jobsController = new RenderingJobsController (jobsManagerVM);
			RegisterService (jobsController);

			projectsManager = new ProjectsManager ();
			RegisterService (projectsManager);

			/* State the tools manager */
			toolsManager = new ToolsManager ();
			RegisterService (toolsManager);
			ProjectsImporter = toolsManager;

			/* Start the events manager */
			eManager = new EventsManager ();
			RegisterService (eManager);

			RegisterService (new CoreEventsManager ());

			/* Start the hotkeys manager */
			hkManager = new HotKeysManager ();
			RegisterService (hkManager);

			/* Start playlists hotkeys manager */
			plManager = new PlaylistManager ();
			RegisterService (plManager);
		}