Пример #1
0
        static void Main()
        {
            AppDomain.CurrentDomain.UnhandledException += AppDomain_UnhandledException;

            //--------------------------------------------------------
            // Each time the program runs, we try to register a mutex.
            // If it fails, we are already running.
            //--------------------------------------------------------
            if (Program.FirstInstance)
            {
                SanityCheckDirectories();

                log.Debug("Kinovea starting.");
                log.Debug("Application level initialisations.");
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                log.Debug("Show SplashScreen.");
                FormSplashScreen splashForm = new FormSplashScreen();
                splashForm.Show();
                splashForm.Update();

                RootKernel kernel = new RootKernel();
                kernel.Prepare();

                log.Debug("Close splash screen.");
                splashForm.Close();

                log.Debug("Launch.");
                kernel.Launch();
            }
        }
Пример #2
0
        private static void Main()
        {
            AppDomain.CurrentDomain.UnhandledException += AppDomain_UnhandledException;

            Thread.CurrentThread.Name = "Main";

            Assembly assembly = Assembly.GetExecutingAssembly();

            Software.Initialize(assembly.GetName().Version);
            Software.LogInfo();

            Software.SanityCheckDirectories();
            PreferencesManager.Initialize();
            bool firstInstance = Program.FirstInstance;

            if (!firstInstance && !PreferencesManager.GeneralPreferences.AllowMultipleInstances)
            {
                return;
            }

            var args = Environment.GetCommandLineArgs();

            if (args.Length > 1)
            {
                CommandLineArgumentManager.Instance.ParseArguments(args);
            }

            Software.ConfigureInstance();
            if (!string.IsNullOrEmpty(Software.InstanceName) && PreferencesManager.GeneralPreferences.InstancesOwnPreferences)
            {
                PreferencesManager.Initialize();
            }

            log.Debug("Application level initialisations.");
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            log.Debug("Showing SplashScreen.");
            FormSplashScreen splashForm = new FormSplashScreen();

            splashForm.Show();
            splashForm.Update();

            RootKernel kernel = new RootKernel();

            kernel.Prepare();

            log.Debug("Closing splash screen.");
            splashForm.Close();

            log.Debug("Launching.");
            kernel.Launch();
        }
        public KinoveaMainWindow(RootKernel rootKernel)
        {
            log.Debug("Creating main UI window.");

            this.rootKernel = rootKernel;
            InitializeComponent();

            string title = " Clean Hands™";

            if (!string.IsNullOrEmpty(Software.InstanceName))
            {
                title += string.Format(" [{0}]", Software.InstanceName);
            }

            this.Text      = title;
            supervisorView = new SupervisorUserInterface(rootKernel);
            this.Controls.Add(supervisorView);
            supervisorView.Dock = DockStyle.Fill;
            supervisorView.BringToFront();

            IntroAboutForm introForm = new IntroAboutForm();

            introForm.ShowDialog();


            if (introForm.close == false)
            {
                FormSplashScreen splashForm = new FormSplashScreen();

                splashForm.Show();
                splashForm.Update();

                System.Threading.Thread.Sleep(3000);
                splashForm.Hide();
                splashForm.Dispose();
            }
            else
            {
                Application.Exit();
            }
        }
Пример #4
0
        private static void Main()
        {
            AppDomain.CurrentDomain.UnhandledException += AppDomain_UnhandledException;

            Thread.CurrentThread.Name = "Main";

            Assembly assembly = Assembly.GetExecutingAssembly();

            Software.Initialize(assembly.GetName().Version);
            Software.SanityCheckDirectories();
            PreferencesManager.Initialize();
            bool firstInstance = Program.FirstInstance;

            if (!PreferencesManager.GeneralPreferences.AllowMultipleInstances && !firstInstance)
            {
                return;
            }

            Software.LogInfo();

            log.Debug("Application level initialisations.");
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            log.Debug("Showing SplashScreen.");
            FormSplashScreen splashForm = new FormSplashScreen();

            splashForm.Show();
            splashForm.Update();

            RootKernel kernel = new RootKernel(firstInstance);

            kernel.Prepare();

            log.Debug("Closing splash screen.");
            splashForm.Close();

            log.Debug("Launching.");
            kernel.Launch();
        }