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(); } }
public CommandSwitchUICulture(RootKernel kernel, Thread thread, CultureInfo ci, CultureInfo oldCi) { this.oldCi = oldCi; this.ci = ci; this.thread = thread; this.kernel = kernel; }
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(LaunchSettingsManager.Name) && PreferencesManager.GeneralPreferences.InstancesOwnPreferences) { PreferencesManager.Initialize(); } log.Debug("Application level initialisations."); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); log.Debug("Showing SplashScreen."); //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(); //introForm.btnAgreement.Click += onClick; }
public SupervisorUserInterface(RootKernel _RootKernel) { rootKernel = _RootKernel; InitializeComponent(); initialized = false; // Get Explorer values from settings. oldSplitterDistance = PreferencesManager.GeneralPreferences.ExplorerSplitterDistance; NotificationCenter.LaunchOpenDialog += NotificationCenter_LaunchOpenDialog; }
public KinoveaMainWindow(RootKernel _RootKernel) { log.Debug("Create main UI window."); mRootKernel = _RootKernel; InitializeComponent(); this.Text = " Kinovea"; SupervisorControl = new SupervisorUserInterface(mRootKernel); this.Controls.Add(SupervisorControl); SupervisorControl.Dock = DockStyle.Fill; SupervisorControl.BringToFront(); }
public KinoveaMainWindow(RootKernel rootKernel) { log.Debug("Create main UI window."); this.rootKernel = rootKernel; InitializeComponent(); this.Text = " Kinovea"; supervisorView = new SupervisorUserInterface(rootKernel); this.Controls.Add(supervisorView); supervisorView.Dock = DockStyle.Fill; supervisorView.BringToFront(); }
public SupervisorUserInterface(RootKernel _RootKernel) { RootKernel = _RootKernel; InitializeComponent(); m_bInitialized = false; // Get Explorer values from settings. m_PrefManager = PreferencesManager.Instance(); m_iOldSplitterDistance = m_PrefManager.ExplorerSplitterDistance; // Services offered here DelegatesPool dp = DelegatesPool.Instance(); dp.OpenVideoFile = DoOpenVideoFile; }
public KinoveaMainWindow(RootKernel _RootKernel) { mRootKernel = _RootKernel; InitializeComponent(); // Window title Text = " Kinovea"; SupervisorControl = new SupervisorUserInterface(mRootKernel); this.Controls.Add(SupervisorControl); SupervisorControl.Dock = DockStyle.Fill; SupervisorControl.BringToFront(); //log.Debug("Register Application Idle handler"); //Application.Idle += new EventHandler(Application_Idle); }
public KinoveaMainWindow(RootKernel rootKernel) { log.Debug("Creating main UI window."); this.rootKernel = rootKernel; InitializeComponent(); string title = " Kinovea"; 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(); }
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(); } }
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(); }
public KinoveaMainWindow(RootKernel rootKernel, bool firstInstance) { log.Debug("Create main UI window."); this.rootKernel = rootKernel; InitializeComponent(); string title = " Kinovea"; if (!firstInstance) { // Add random characters at the end of the window title so it can be identified by automation scripts. string id = Guid.NewGuid().ToString().Substring(0, 4); title += " [" + id + "]"; } this.Text = title; supervisorView = new SupervisorUserInterface(rootKernel); this.Controls.Add(supervisorView); supervisorView.Dock = DockStyle.Fill; supervisorView.BringToFront(); }
public KinoveaMainWindow(RootKernel rootKernel) { log.Debug("Creating main UI window."); this.rootKernel = rootKernel; InitializeComponent(); string title = "Kinovea"; if (!string.IsNullOrEmpty(Software.InstanceName)) { title += string.Format(" [{0}]", Software.InstanceName); } this.Text = title; this.FormClosing += KinoveaMainWindow_FormClosing; supervisorView = new SupervisorUserInterface(rootKernel); this.Controls.Add(supervisorView); supervisorView.Dock = DockStyle.Fill; supervisorView.BringToFront(); log.DebugFormat("Restoring window state: {0}, window rectangle: {1}", PreferencesManager.GeneralPreferences.WindowState, PreferencesManager.GeneralPreferences.WindowRectangle); if (Screen.AllScreens.Any(screen => screen.WorkingArea.IntersectsWith(PreferencesManager.GeneralPreferences.WindowRectangle))) { // The screen it was on is still here, move it to this screen and then restore the state. this.StartPosition = FormStartPosition.Manual; this.DesktopBounds = PreferencesManager.GeneralPreferences.WindowRectangle; this.WindowState = PreferencesManager.GeneralPreferences.WindowState; } else { this.WindowState = FormWindowState.Maximized; } EnableCopyData(); }