public Main(string[] parameter) { initPhase = true; InitializeComponent(); CreateHandle(); // check Language-buttons switch (Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName) { case "de": germanMenuItem.Checked = true; break; default: englishMenuItem.Checked = true; break; } // Load Player Task t = new Task(() => { PlayerStore.Instance.ToString(); }); t.Start(); // Load welcomepage try { infoWebBrowser.Navigate(Resource.MainWelcomePageUrl); } catch { } manager = new PluginManager(); try { manager.LoadSettings(); } catch (Exception ex) { ExceptionViewer problems = new ExceptionViewer(ex); problems.ShowDialog(this); } // Set Window-Position WindowState = Settings.Default.windowState; Location = Settings.Default.windowPosition; Size = Settings.Default.windowSize; manager.SearchForPlugins(); timer.Enabled = true; // Forward startparameter foreach (PluginItem plugin in manager.ProducerPlugins) { plugin.Producer.StartupParameter(parameter); } foreach (PluginItem plugin in manager.ConsumerPlugins) { plugin.Consumer.StartupParameter(parameter); } foreach (string p in parameter) { if (p.ToUpper() == "/START") { directstart = true; } } initPhase = false; }