public RootKernel(bool firstInstance) { CommandLineArgumentManager.Instance.ParseArguments(Environment.GetCommandLineArgs()); VideoTypeManager.LoadVideoReaders(); CameraTypeManager.LoadCameraManagers(); ToolManager.LoadTools(); BuildSubTree(); mainWindow = new KinoveaMainWindow(this, firstInstance); NotificationCenter.RecentFilesChanged += NotificationCenter_RecentFilesChanged; NotificationCenter.FullScreenToggle += NotificationCenter_FullscreenToggle; NotificationCenter.StatusUpdated += (s, e) => statusLabel.Text = e.Status; NotificationCenter.PreferenceTabAsked += NotificationCenter_PreferenceTabAsked; log.Debug("Plug sub modules at UI extension points (Menus, ToolBars, StatusBAr, Windows)."); ExtendMenu(mainWindow.menuStrip); ExtendToolBar(mainWindow.toolStrip); ExtendStatusBar(mainWindow.statusStrip); ExtendUI(); log.Debug("Register global services offered at Root level."); Services.FormsHelper.SetMainForm(mainWindow); }
public RootKernel() { log.Debug("Loading video readers."); List <Type> videoReaders = new List <Type>(); videoReaders.Add(typeof(Video.Bitmap.VideoReaderBitmap)); videoReaders.Add(typeof(Video.FFMpeg.VideoReaderFFMpeg)); videoReaders.Add(typeof(Video.GIF.VideoReaderGIF)); videoReaders.Add(typeof(Video.SVG.VideoReaderSVG)); videoReaders.Add(typeof(Video.Synthetic.VideoReaderSynthetic)); VideoTypeManager.LoadVideoReaders(videoReaders); log.Debug("Loading camera managers."); List <Type> cameraManagers = new List <Type>(); cameraManagers.Add(typeof(Camera.Basler.CameraManagerBasler)); cameraManagers.Add(typeof(Camera.Daheng.CameraManagerDaheng)); cameraManagers.Add(typeof(Camera.DirectShow.CameraManagerDirectShow)); cameraManagers.Add(typeof(Camera.FrameGenerator.CameraManagerFrameGenerator)); cameraManagers.Add(typeof(Camera.HTTP.CameraManagerHTTP)); cameraManagers.Add(typeof(Camera.IDS.CameraManagerIDS)); CameraTypeManager.LoadCameraManagers(cameraManagers); log.Debug("Loading tools."); ToolManager.LoadTools(); BuildSubTree(); mainWindow = new KinoveaMainWindow(this); NotificationCenter.RecentFilesChanged += NotificationCenter_RecentFilesChanged; NotificationCenter.FullScreenToggle += NotificationCenter_FullscreenToggle; NotificationCenter.StatusUpdated += (s, e) => statusLabel.Text = e.Status; NotificationCenter.PreferenceTabAsked += NotificationCenter_PreferenceTabAsked; log.Debug("Plug sub modules at UI extension points (Menus, Toolbars, Statusbar, Windows)."); ExtendMenu(mainWindow.menuStrip); ExtendToolBar(mainWindow.toolStrip); ExtendStatusBar(mainWindow.statusStrip); ExtendUI(); log.Debug("Register global services offered at Root level."); Services.FormsHelper.SetMainForm(mainWindow); }
public RootKernel() { // Store Kinovea's version from the assembly. Version v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; PreferencesManager.ReleaseVersion = String.Format("{0}.{1}.{2}", v.Major, v.Minor, v.Build); // Set type of release (Experimental vs Production) PreferencesManager.ExperimentalRelease = true; // Display some system infos in the log. log.Info(String.Format("Kinovea version : {0}, ({1})", PreferencesManager.ReleaseVersion, PreferencesManager.ExperimentalRelease?"Experimental":"Production")); log.Info(".NET Framework Version : " + Environment.Version.ToString()); log.Info("OS Version : " + System.Environment.OSVersion.ToString()); log.Info("Primary Screen : " + SystemInformation.PrimaryMonitorSize.ToString()); log.Info("Virtual Screen : " + SystemInformation.VirtualScreen.ToString()); // Since it is the very first call, it will both instanciate and import. // Previous calls were done on static prioperties, no instanciation. PreferencesManager pm = PreferencesManager.Instance(); // Initialise command line parser and get the arguments. CommandLineArgumentManager am = CommandLineArgumentManager.Instance(); am.InitializeCommandLineParser(); string[] args = Environment.GetCommandLineArgs(); am.ParseArguments(args); BuildSubTree(); MainWindow = new KinoveaMainWindow(this); log.Debug("Plug sub modules at UI extension points (Menus, ToolBars, StatusBAr, Windows)."); ExtendMenu(MainWindow.menuStrip); ExtendToolBar(MainWindow.toolStrip); ExtendStatusBar(MainWindow.statusStrip); ExtendUI(); log.Debug("Register global services offered at Root level."); DelegatesPool dp = DelegatesPool.Instance(); dp.UpdateStatusBar = DoUpdateStatusBar; dp.MakeTopMost = DoMakeTopMost; }