Пример #1
0
        public static void StartServices(MainWindow mainWindow)
        {
            RenderingJobsManager videoRenderer;
            ProjectsManager      projectsManager;

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

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

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

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

            /* Start the rendering jobs manager */
            videoRenderer = new RenderingJobsManager(mainWindow.RenderingStateBar);
            mainWindow.RenderPlaylistEvent += (playlist) => {
                videoRenderer.AddJob(RenderingJobsManager.ConfigureRenderingJob(playlist, mainWindow));
            };

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

            projectsManager = new ProjectsManager(mainWindow);
            projectsManager.OpenedProjectChanged += OnOpenedProjectChanged;
        }
Пример #2
0
        public static void RegisterServices(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit)
        {
            App.Current.DependencyRegistry.Register <ITimer, Timer> (1);
            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);

            RegisterService(App.Current.LicenseLimitationsService);

            /* 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);

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

            /* Start the hotkeys manager */
            hkManager = new HotKeysManager();
            RegisterService(hkManager);
            App.Current.HotkeysService = new HotkeysService();
            RegisterService(App.Current.HotkeysService);

            GeneralUIHotkeys.RegisterDefaultHotkeys();
            PlaybackHotkeys.RegisterDefaultHotkeys();
            DrawingToolHotkeys.RegisterDefaultHotkeys();
            LMGeneralUIHotkeys.RegisterDefaultHotkeys();

#if DEVEL
            AppUpdater notifier = new AppUpdater("Fluendo", "http://sparkle.fluendo.lan:8080/longomatch.xml");
#else
            AppUpdater notifier = new AppUpdater("Fluendo", "https://s3.amazonaws.com/oneplay-files/longomatch.xml");
#endif
            RegisterService(notifier);
        }
Пример #3
0
        public static void RegisterServices(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit)
        {
            App.Current.DependencyRegistry.Register <ITimer, Timer> (1);
            App.Current.DependencyRegistry.Register <ISeeker, Seeker> (1);
            App.Current.DependencyRegistry.Register <IStorageManager, CouchbaseManagerLongoMatch> (1);
            App.Current.DependencyRegistry.Register <IFileStorage, LMFileStorage> (1);
            App.Current.DependencyRegistry.Register <IViewModelFactoryService> (new ViewModelFactoryService());
            App.Current.MultimediaToolkit = multimediaToolkit;
            App.Current.GUIToolkit        = guiToolkit;
            App.Current.EventsBroker      = new EventsBroker();
            App.Current.EventsBroker.Subscribe <QuitApplicationEvent> (HandleQuitApplicationEvent);

            if (App.Current.LicenseLimitationsService != null)
            {
                RegisterService(App.Current.LicenseLimitationsService);
            }

            /* 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);

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

            /* Start the hotkeys Service */
            App.Current.HotkeysService = new HotkeysService();
            RegisterService(App.Current.HotkeysService);

            GeneralUIHotkeys.RegisterDefaultHotkeys();
            PlaybackHotkeys.RegisterDefaultHotkeys();
            DrawingToolHotkeys.RegisterDefaultHotkeys();
            LMGeneralUIHotkeys.RegisterDefaultHotkeys();
        }
Пример #4
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);
        }
Пример #5
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;
        }
Пример #6
0
 public MigrationsManager(TemplatesService templates, IDataBaseManager databaseManager)
 {
     this.templates       = templates;
     this.databaseManager = databaseManager;
     currentVersion       = new Version(Constants.DB_MAYOR_VERSION, Constants.DB_MINOR_VERSION);
 }
Пример #7
0
 public ProjectsManager(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit,
                        TemplatesService ts)
 {
     this.multimediaToolkit = multimediaToolkit;
     this.guiToolkit        = guiToolkit;
 }