public void ExportProject(Project project, IGUIToolkit guiToolkit) { string proposed_filename = project.Description.Title + ".csv"; // Sanitize proposed filename foreach (char c in InvalidChars) { proposed_filename = proposed_filename.Replace(c.ToString(), ""); } string filename = guiToolkit.SaveFile(Catalog.GetString("Output file"), proposed_filename, Config.HomeDir, "CSV", new string[] { "*.csv" }); if (filename == null) { return; } filename = System.IO.Path.ChangeExtension(filename, ".csv"); try { ProjectToCSV exporter = new ProjectToCSV(project, filename); exporter.Export(); guiToolkit.InfoMessage(Catalog.GetString("Project exported successfully")); } catch (Exception ex) { guiToolkit.ErrorMessage(Catalog.GetString("Error exporting project")); Log.Exception(ex); } }
public NewProjectPanel(Project project) { this.Build (); this.mtoolkit = Config.MultimediaToolkit; this.gtoolkit = Config.GUIToolkit; capturemediafilechooser.FileChooserMode = FileChooserMode.File; capturemediafilechooser.ProposedFileName = String.Format ("Live-LongoMatch-{0}.mp4", DateTime.Now.ToShortDateString ()); notebook1.ShowTabs = false; notebook1.ShowBorder = false; LoadIcons (); GroupLabels (); ConnectSignals (); FillDahsboards (); FillFormats (); LoadTeams (project); if (project == null) { notebook1.Page = firstPage = 0; datepicker1.Date = DateTime.Now; mediafilesetselection1.FileSet = new MediaFileSet (); } else { notebook1.Page = firstPage = 1; this.project = project; projectType = ProjectType.EditProject; resyncEvents = true; SetProjectType (); FillProjectDetails (); } UpdateTitle (); Gdk.Color.Parse ("red", ref red); outputfilelabel.ModifyFg (StateType.Normal, red); urilabel.ModifyFg (StateType.Normal, red); ApplyStyle (); }
public MainWindow(IGUIToolkit guiToolkit) : base(Constants.SOFTWARE_NAME) { this.Build(); this.guiToolKit = guiToolkit; Title = Constants.SOFTWARE_NAME; ConnectMenuSignals(); // Default screen Screen screen = Display.Default.DefaultScreen; // Which monitor is our window on int monitor = screen.GetMonitorAtWindow(this.GdkWindow); // Monitor size Rectangle monitor_geometry = screen.GetMonitorGeometry(monitor); // Resize to a convenient size this.Resize(monitor_geometry.Width * 80 / 100, monitor_geometry.Height * 80 / 100); if (Utils.OS == OperatingSystemID.OSX) { this.Move(monitor_geometry.Width * 10 / 100, monitor_geometry.Height * 10 / 100); } DatabaseManagerCommand = new LimitationCommand(LongoMatchFeature.DatabaseManager.ToString(), () => { App.Current.StateController.MoveToModal(DatabasesManagerState.NAME, null, true); }); }
public void ExportProject(Project project, IGUIToolkit guiToolkit) { string proposed_filename = project.Description.Title + ".csv"; // Sanitize proposed filename foreach (char c in InvalidChars) { proposed_filename = proposed_filename.Replace(c.ToString(), ""); } string filename = guiToolkit.SaveFile (Catalog.GetString ("Output file"), proposed_filename, Config.HomeDir, "CSV", new string[] { "*.csv" }); if (filename == null) return; filename = System.IO.Path.ChangeExtension (filename, ".csv"); try { ProjectToCSV exporter = new ProjectToCSV (project, filename); exporter.Export (); guiToolkit.InfoMessage (Catalog.GetString ("Project exported successfully")); } catch (Exception ex) { guiToolkit.ErrorMessage (Catalog.GetString ("Error exporting project")); Log.Exception (ex); } }
public MainWindow(IGUIToolkit guiToolkit) : base(Constants.SOFTWARE_NAME) { this.Build(); this.guiToolKit = guiToolkit; Title = Constants.SOFTWARE_NAME; projectType = ProjectType.None; ConnectSignals(); ConnectMenuSignals(); // Default screen Screen screen = Display.Default.DefaultScreen; // Which monitor is our window on int monitor = screen.GetMonitorAtWindow(this.GdkWindow); // Monitor size Rectangle monitor_geometry = screen.GetMonitorGeometry(monitor); // Resize to a convenient size this.Resize(monitor_geometry.Width * 80 / 100, monitor_geometry.Height * 80 / 100); if (Utils.RunningPlatform() == PlatformID.MacOSX) { this.Move(monitor_geometry.Width * 10 / 100, monitor_geometry.Height * 10 / 100); } }
public DataBaseManager(string DBDir, IGUIToolkit guiToolkit) { this.DBDir = DBDir; this.guiToolkit = guiToolkit; ConnectSignals(); FindDBS(); }
public static void Start(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit) { Core.guiToolkit = guiToolkit; Core.mainWindow = guiToolkit.MainWindow; StartServices(guiToolkit, multimediaToolkit); BindEvents(Core.mainWindow); }
public MainWindow(IGUIToolkit guiToolkit) : base("LongoMatch") { this.Build(); this.guiToolKit = guiToolkit; projectType = ProjectType.None; timeline = new TimeLineWidget(); downbox.PackStart(timeline, true, true, 0); guTimeline = new GameUnitsTimelineWidget (); downbox.PackStart(guTimeline, true, true, 0); player.SetLogo(System.IO.Path.Combine(Config.ImagesDir(),"background.png")); player.LogoMode = true; player.Tick += OnTick; player.Detach += (sender, e) => DetachPlayer(true); capturer.Visible = false; capturer.Logo = System.IO.Path.Combine(Config.ImagesDir(),"background.png"); capturer.CaptureFinished += (sender, e) => {CloseCaptureProject();}; buttonswidget.Mode = TagMode.Predifined; localPlayersList.Team = Team.LOCAL; visitorPlayersList.Team = Team.VISITOR; ConnectSignals(); ConnectMenuSignals(); if (!Config.useGameUnits) GameUnitsViewAction.Visible = false; }
public PlaylistManager(IGUIToolkit guiToolkit, IRenderingJobsManager videoRenderer) { this.videoRenderer = videoRenderer; this.guiToolkit = guiToolkit; playlistWidget = guiToolkit.MainWindow.Playlist; player = guiToolkit.MainWindow.Player; BindEvents(guiToolkit.MainWindow, guiToolkit.MainWindow.Player); }
public RenderingJobsManager(IMultimediaToolkit multimediaToolkit, IGUIToolkit guiToolkit) { this.guiToolkit = guiToolkit; this.multimediaToolkit = multimediaToolkit; this.stateBar = guiToolkit.RenderingStateBar; jobs = new List<Job> (); pendingJobs = new List<Job> (); }
public static void Start(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit) { Config.MultimediaToolkit = multimediaToolkit; Config.GUIToolkit = guiToolkit; Config.EventsBroker.QuitApplicationEvent += HandleQuitApplicationEvent; RegisterServices(guiToolkit, multimediaToolkit); StartServices(); }
public RenderingJobsManager(IMultimediaToolkit multimediaToolkit, IGUIToolkit guiToolkit) { this.guiToolkit = guiToolkit; this.multimediaToolkit = multimediaToolkit; this.stateBar = guiToolkit.RenderingStateBar; jobs = new List <Job> (); pendingJobs = new List <Job> (); }
public ProjectsManager(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit) { this.multimediaToolkit = multimediaToolkit; this.guiToolkit = guiToolkit; mainWindow = guiToolkit.MainWindow; Player = mainWindow.Player; Capturer = mainWindow.Capturer; ConnectSignals(); }
public EventsManager(IGUIToolkit guiToolkit) { this.guiToolkit = guiToolkit; mainWindow = guiToolkit.MainWindow; player = mainWindow.Player; capturer = mainWindow.Capturer; drawingManager = new VideoDrawingsManager(player); ConnectSignals(); }
public EventsManager(IGUIToolkit guiToolkit, IRenderingJobsManager renderer) { this.guiToolkit = guiToolkit; this.renderer = renderer; mainWindow = guiToolkit.MainWindow; player = mainWindow.Player; capturer = mainWindow.Capturer; drawingManager = new VideoDrawingsManager(player); ConnectSignals(); }
public RenderingJobsManager(IMultimediaToolkit multimediaToolkit, IGUIToolkit guiToolkit) { this.guiToolkit = guiToolkit; this.multimediaToolkit = multimediaToolkit; this.stateBar = guiToolkit.MainWindow.RenderingStateBar; jobs = new List<Job>(); pendingJobs = new List<Job>(); stateBar.Cancel += (sender, e) => CancelCurrentJob(); stateBar.ManageJobs += (sender, e) => ManageJobs(); }
public static MediaFile OpenFile(object parent) { MediaFile mediaFile; IGUIToolkit gui = Config.GUIToolkit; IMultimediaToolkit multimedia = Config.MultimediaToolkit; string filename; filename = gui.OpenFile(Catalog.GetString("Open file"), null, null); if (filename == null) { return(null); } mediaFile = DiscoverFile(filename, parent); if (mediaFile != null) { try { if (multimedia.FileNeedsRemux(mediaFile)) { if (!Config.SupportsFullHD) { string msg = Catalog.GetString("This file is not in a supported format, " + "convert it with the video conversion tool"); throw new Exception(msg); } else { string q = Catalog.GetString("This file needs to be converted into a more suitable format." + "(This step will only take a few minutes)"); if (gui.QuestionMessage(q, null, parent)) { string newFilename = multimedia.RemuxFile(mediaFile, parent); if (newFilename != null) { mediaFile = multimedia.DiscoverFile(newFilename); } else { mediaFile = null; } } else { mediaFile = null; } } } } catch (Exception ex) { gui.ErrorMessage(ex.Message, parent); mediaFile = null; } } return(mediaFile); }
public static void LoadUIBackendsAddins (IGUIToolkit gtoolkit) { foreach (IGUIBackend backend in AddinManager.GetExtensionObjects<IGUIBackend> ()) { try { Log.Information ("Registering UI backend from plugin: " + backend.Name); backend.RegisterElements (gtoolkit); } catch (Exception ex) { Log.Error ("Error registering multimedia backend"); Log.Exception (ex); } } }
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); }
public ProjectsManagerPanel(Project openedProject) { this.openedProject = openedProject; this.DB = Config.DatabaseManager.ActiveDB; this.gkit = Config.GUIToolkit; this.Build(); this.videoFileInfos = new List <VideoFileInfo> (); savebuttonimage.Pixbuf = Misc.LoadIcon("longomatch-project-save", 34); exportbuttonimage.Pixbuf = Misc.LoadIcon("longomatch-project-export", 34); resyncbuttonimage.Pixbuf = Misc.LoadIcon("longomatch-project-resync", 34); deletebuttonimage.Pixbuf = Misc.LoadIcon("longomatch-project-delete", 34); openbuttonimage.Pixbuf = Misc.LoadIcon("longomatch-project-open", 34); // Force tooltips to be translatable as there seems to be a bug in stetic // code generation for translatable tooltips. savebutton.TooltipMarkup = Catalog.GetString("Save"); exportbutton.TooltipMarkup = Catalog.GetString("Export"); openbutton.TooltipMarkup = Catalog.GetString("Open"); deletebutton.TooltipMarkup = Catalog.GetString("Delete"); notebook1.ShowTabs = false; notebook1.ShowBorder = false; projectlistwidget1.SelectionMode = SelectionMode.Multiple; projectlistwidget1.ProjectsSelected += HandleProjectsSelected; projectlistwidget1.Fill(DB.GetAllProjects()); seasonentry.Changed += HandleChanged; competitionentry.Changed += HandleChanged; savebutton.Clicked += HandleSaveClicked; exportbutton.Clicked += HandleExportClicked; resyncbutton.Clicked += HandleResyncClicked; deletebutton.Clicked += HandleDeleteClicked; openbutton.Clicked += HandleOpenClicked; datepicker.ValueChanged += HandleDateChanged; desctextview.Buffer.Changed += HandleChanged; notebook1.Page = 0; panelheader1.Title = Catalog.GetString("PROJECTS MANAGER"); panelheader1.ApplyVisible = false; panelheader1.BackClicked += HandleBackClicked; projectlistwidget1.ShowList = true; // Only visible when multi camera is supported. Indeed periods can be edited in the timeline of the project. resyncbutton.Visible = Config.SupportsMultiCamera; SetStyle(); }
public MainWindow(IGUIToolkit guiToolkit) : base(Constants.SOFTWARE_NAME) { Screen screen; this.Build(); Title = Constants.SOFTWARE_NAME; this.guiToolKit = guiToolkit; projectType = ProjectType.None; timeline = new TimeLineWidget(); downbox.PackStart(timeline, true, true, 0); guTimeline = new GameUnitsTimelineWidget(); downbox.PackStart(guTimeline, true, true, 0); TagSubcategoriesAction.Active = !Config.FastTagging; playercapturer.Mode = PlayerCapturerBin.PlayerOperationMode.Player; playercapturer.SetLogo(System.IO.Path.Combine(Config.ImagesDir, "background.png")); playercapturer.LogoMode = true; playercapturer.Tick += OnTick; playercapturer.Detach += DetachPlayer; playercapturer.Logo = System.IO.Path.Combine(Config.ImagesDir, "background.png"); playercapturer.CaptureFinished += (sender, e) => { CloseCaptureProject(); }; buttonswidget.Mode = TagMode.Predifined; ConnectSignals(); ConnectMenuSignals(); if (!Config.UseGameUnits) { GameUnitsViewAction.Visible = false; } MenuItem parent = ImportProjectActionMenu; parent.Submenu = new Menu(); AddImportEntry(Catalog.GetString("Import file project"), "ImportFileProject", Constants.PROJECT_NAME + " (" + Constants.PROJECT_EXT + ")", "*" + Constants.PROJECT_EXT, Project.Import, false); screen = Display.Default.DefaultScreen; this.Resize(screen.Width * 80 / 100, screen.Height * 80 / 100); postagger.SetMode(false); }
public RenderingJobsManager(IMultimediaToolkit multimediaToolkit, IGUIToolkit guiToolkit) { this.guiToolkit = guiToolkit; this.multimediaToolkit = multimediaToolkit; this.stateBar = guiToolkit.MainWindow.RenderingStateBar; capturer = multimediaToolkit.GetFramesCapturer(); jobs = new List <Job>(); pendingJobs = new List <Job>(); stateBar.Cancel += (sender, e) => CancelCurrentJob(); stateBar.ManageJobs += (sender, e) => ManageJobs(); guiToolkit.MainWindow.ConvertVideoFilesEvent += delegate(List <MediaFile> inputFiles, EncodingSettings encSettings) { ConversionJob job = new ConversionJob(inputFiles, encSettings); AddJob(job); };; }
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(); }
public ProjectsManagerPanel() { this.DB = App.Current.DatabaseManager.ActiveDB; this.gkit = App.Current.GUIToolkit; this.Build(); this.videoFileInfos = new List <VideoFileInfo> (); savebuttonimage.Image = App.Current.ResourcesLocator.LoadIcon("vas-save", 34); exportbuttonimage.Image = App.Current.ResourcesLocator.LoadIcon("lm-export", 34); resyncbuttonimage.Image = App.Current.ResourcesLocator.LoadIcon("lm-project-resync", 34); deletebuttonimage.Image = App.Current.ResourcesLocator.LoadIcon("vas-delete", 34); openbuttonimage.Image = App.Current.ResourcesLocator.LoadIcon("vas-open", 34); // Force tooltips to be translatable as there seems to be a bug in stetic // code generation for translatable tooltips. savebutton.TooltipMarkup = Catalog.GetString("Save"); exportbutton.TooltipMarkup = Catalog.GetString("Export"); openbutton.TooltipMarkup = Catalog.GetString("Open"); deletebutton.TooltipMarkup = Catalog.GetString("Delete"); projectlistwidget1.SelectionMode = SelectionMode.Multiple; projectlistwidget1.ProjectsSelected += HandleProjectsSelected; projectlistwidget1.ProjectSelected += HandleProjectSelected; seasonentry.Changed += HandleChanged; competitionentry.Changed += HandleChanged; savebutton.Clicked += HandleSaveClicked; exportbutton.Clicked += HandleExportClicked; resyncbutton.Clicked += HandleResyncClicked; deletebutton.Clicked += HandleDeleteClicked; openbutton.Clicked += HandleOpenClicked; datepicker.ValueChanged += HandleDateChanged; desctextview.Buffer.Changed += HandleChanged; panelheader1.Title = Title; panelheader1.ApplyVisible = false; panelheader1.BackClicked += HandleBackClicked; projectlistwidget1.ViewMode = ProjectListViewMode.List; // Only visible when multi camera is supported. Indeed periods can be edited in the timeline of the project. resyncbutton.Visible = App.Current.SupportsMultiCamera; SetStyle(); }
public static MediaFile OpenFile(object parent) { MediaFile mediaFile; IGUIToolkit gui = App.Current.GUIToolkit; IMultimediaToolkit multimedia = App.Current.MultimediaToolkit; string filename; filename = App.Current.Dialogs.OpenFile(Catalog.GetString("Open file"), null, null); if (filename == null) { return(null); } mediaFile = DiscoverFile(filename, parent); if (mediaFile != null) { try { if (multimedia.FileNeedsRemux(mediaFile)) { string q = Catalog.GetString("This file needs to be converted into a more suitable format." + "(This step will only take a few minutes)"); if (App.Current.Dialogs.QuestionMessage(q, null, parent).Result) { string newFilename = multimedia.RemuxFile(mediaFile, parent); if (newFilename != null) { mediaFile = multimedia.DiscoverFile(newFilename); } else { mediaFile = null; } } else { mediaFile = null; } } } catch (Exception ex) { App.Current.Dialogs.ErrorMessage(ex.Message, parent); mediaFile = null; } } return(mediaFile); }
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); }
public void ExportProject(Project project, IGUIToolkit guiToolkit) { string filename = guiToolkit.SaveFile(Catalog.GetString("Output file"), null, Config.HomeDir(), "Excel", ".xlsx"); if (filename == null) { return; } filename = System.IO.Path.ChangeExtension(filename, ".xlsx"); try { EPPLUSExporter exporter = new EPPLUSExporter(project, filename); exporter.Export(); guiToolkit.InfoMessage(Catalog.GetString("Project exported successfully")); }catch (Exception ex) { guiToolkit.ErrorMessage(Catalog.GetString("Error exporting project")); Log.Exception(ex); } }
public NewProjectPanel(Project project) { this.Build(); this.mtoolkit = Config.MultimediaToolkit; this.gtoolkit = Config.GUIToolkit; capturemediafilechooser.FileChooserMode = FileChooserMode.File; capturemediafilechooser.ProposedFileName = String.Format("Live-LongoMatch-{0}.mp4", DateTime.Now.ToShortDateString()); notebook1.ShowTabs = false; notebook1.ShowBorder = false; LoadIcons(); GroupLabels(); ConnectSignals(); FillDahsboards(); FillFormats(); LoadTeams(project); if (project == null) { notebook1.Page = firstPage = 0; datepicker1.Date = DateTime.Now; mediafilesetselection1.FileSet = new MediaFileSet(); } else { notebook1.Page = firstPage = 1; this.project = project; projectType = ProjectType.EditProject; resyncEvents = true; SetProjectType(); FillProjectDetails(); } UpdateTitle(); Gdk.Color.Parse("red", ref red); outputfilelabel.ModifyFg(StateType.Normal, red); urilabel.ModifyFg(StateType.Normal, red); ApplyStyle(); }
public MainWindow(IGUIToolkit guiToolkit) : base(Constants.SOFTWARE_NAME) { this.Build (); this.guiToolKit = guiToolkit; Title = Constants.SOFTWARE_NAME; projectType = ProjectType.None; ConnectSignals (); ConnectMenuSignals (); // Default screen Screen screen = Display.Default.DefaultScreen; // Which monitor is our window on int monitor = screen.GetMonitorAtWindow (this.GdkWindow); // Monitor size Rectangle monitor_geometry = screen.GetMonitorGeometry (monitor); // Resize to a convenient size this.Resize (monitor_geometry.Width * 80 / 100, monitor_geometry.Height * 80 / 100); if (Utils.RunningPlatform () == PlatformID.MacOSX) { this.Move (monitor_geometry.Width * 10 / 100, monitor_geometry.Height * 10 / 100); } }
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; }
public void Load(IGUIToolkit toolkit) { throw new NotImplementedException (); }
public EventsManager(IGUIToolkit guiToolkit, IRenderingJobsManager renderer) { this.guiToolkit = guiToolkit; this.renderer = renderer; }
public static void LoadUIBackendsAddins(IGUIToolkit gtoolkit) { foreach (IGUIBackend backend in AddinManager.GetExtensionObjects<IGUIBackend> ()) { try { Log.Information ("Registering UI backend from plugin: " + backend.Name); backend.RegisterElements (gtoolkit); } catch (Exception ex) { Log.Error ("Error registering multimedia backend"); Log.Exception (ex); } } }
/// <summary> /// Helper method to Register & Start all default CoreServices /// </summary> /// <param name="guiToolkit">GUI toolkit.</param> /// <param name="multimediaToolkit">Multimedia toolkit.</param> public static void Start (IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit) { RegisterServices (guiToolkit, multimediaToolkit); StartServices (); }
public PlaylistManager(IGUIToolkit guiToolkit, IRenderingJobsManager videoRenderer) { this.videoRenderer = videoRenderer; this.guiToolkit = guiToolkit; }
public ToolsManager(IGUIToolkit guiToolkit, IDataBaseManager dbManager) { this.guiToolkit = guiToolkit; this.dbManager = dbManager; ProjectImporters = new List<ProjectImporter> (); }
public DataBaseManager(string DBDir, IGUIToolkit guiToolkit) { this.DBDir = DBDir; this.guiToolkit = guiToolkit; }
public void ExportProject(Project project, IGUIToolkit guiToolkit) { string filename = guiToolkit.SaveFile(Catalog.GetString("Output file"), null, Config.HomeDir(), "Excel", ".xlsx"); if (filename == null) return; filename = System.IO.Path.ChangeExtension(filename, ".xlsx"); try { EPPLUSExporter exporter = new EPPLUSExporter(project, filename); exporter.Export(); guiToolkit.InfoMessage(Catalog.GetString("Project exported successfully")); }catch (Exception ex) { guiToolkit.ErrorMessage(Catalog.GetString("Error exporting project")); Log.Exception(ex); } }
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); }
public bool Stop() { multimediaToolkit = null; guiToolkit = null; App.Current.EventsBroker.Unsubscribe<OpenProjectIDEvent> (OpenProjectID); App.Current.EventsBroker.Unsubscribe<OpenNewProjectEvent> (OpenNewProject); App.Current.EventsBroker.Unsubscribe<CloseOpenedProjectEvent> (closeOpenedProjectEventToken); App.Current.EventsBroker.Unsubscribe<SaveProjectEvent> (HandleSaveProject); App.Current.EventsBroker.Unsubscribe<CaptureErrorEvent> (HandleCaptureError); App.Current.EventsBroker.Unsubscribe<CaptureFinishedEvent> (HandleCaptureFinished); App.Current.EventsBroker.Unsubscribe<MultimediaErrorEvent> (HandleMultimediaError); return true; }
public ProjectsManager(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit, TemplatesService ts) { this.multimediaToolkit = multimediaToolkit; this.guiToolkit = guiToolkit; }
public bool Start() { multimediaToolkit = App.Current.MultimediaToolkit; guiToolkit = App.Current.GUIToolkit; App.Current.EventsBroker.Subscribe<OpenProjectIDEvent> (OpenProjectID); App.Current.EventsBroker.Subscribe<OpenNewProjectEvent> (OpenNewProject); closeOpenedProjectEventToken = App.Current.EventsBroker.Subscribe<CloseOpenedProjectEvent> ((e) => { PromptCloseProject (new CloseOpenedProjectEvent ()); }); App.Current.EventsBroker.Subscribe<SaveProjectEvent> (HandleSaveProject); App.Current.EventsBroker.Subscribe<CaptureErrorEvent> (HandleCaptureError); App.Current.EventsBroker.Subscribe<CaptureFinishedEvent> (HandleCaptureFinished); App.Current.EventsBroker.Subscribe<MultimediaErrorEvent> (HandleMultimediaError); return true; }
/// <summary> /// Helper method to Register & Start all default CoreServices /// </summary> /// <param name="guiToolkit">GUI toolkit.</param> /// <param name="multimediaToolkit">Multimedia toolkit.</param> public static void Start(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit) { RegisterServices(guiToolkit, multimediaToolkit); StartServices(); }
public ToolsManager(IGUIToolkit guiToolkit, IDataBaseManager dbManager) { this.guiToolkit = guiToolkit; this.dbManager = dbManager; ProjectImporters = new List <ProjectImporter> (); }
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; }