Exemple #1
0
        private void LogInitialConfiguration()
        {
            CommandLineArgumentManager am = CommandLineArgumentManager.Instance();

            log.Debug("Initial configuration:");
            log.Debug("InputFile : " + am.InputFile);
            log.Debug("SpeedPercentage : " + am.SpeedPercentage.ToString());
            log.Debug("StretchImage : " + am.StretchImage.ToString());
            log.Debug("HideExplorer : " + am.HideExplorer.ToString());
        }
Exemple #2
0
 private void SupervisorUserInterface_Load(object sender, EventArgs e)
 {
     if (CommandLineArgumentManager.Instance().HideExplorer || !m_PrefManager.ExplorerVisible)
     {
         CollapseExplorer();
     }
     else
     {
         ExpandExplorer(true);
     }
     m_bInitialized = true;
 }
Exemple #3
0
        private void IdleDetector(object sender, EventArgs e)
        {
            log.Debug("Application is idle in ScreenManagerUserInterface.");

            // This is a one time only routine.
            Application.Idle -= new EventHandler(this.IdleDetector);

            // Launch file.
            string filePath = CommandLineArgumentManager.Instance().InputFile;

            if (filePath != null && File.Exists(filePath))
            {
                m_ScreenManagerUIContainer.DropLoadMovie(filePath, -1);
            }
        }
Exemple #4
0
        public void Prepare()
        {
            // Prepare the right strings before we open the curtains.
            log.Debug("Setting current ui culture.");
            Thread.CurrentThread.CurrentUICulture = PreferencesManager.Instance().GetSupportedCulture();
            RefreshUICulture();
            CheckLanguageMenu();
            CheckTimecodeMenu();

            m_ScreenManager.Prepare();
            LogInitialConfiguration();
            if (CommandLineArgumentManager.Instance().InputFile != null)
            {
                m_ScreenManager.PrepareScreen();
            }
        }
Exemple #5
0
        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;
        }