/// <summary> /// /// </summary> /// <param name="sender">The object sender of the event.</param> /// <param name="e"></param> private void App_Startup(object sender, StartupEventArgs e) { Trace.WriteLine("Starting Application Base. Please wait..."); // Start application base manager. ApplicationBase.Debug(); // Initialize application preferences. InitializePreferences(); // Application is running // Process command line args bool startMinimized = false; for (int i = 0; i != e.Args.Length; ++i) { if (e.Args[i] == "/StartMinimized") { startMinimized = true; } } // Create main application window, starting minimized if specified MainWindow mainWindow = new MainWindow(); if (startMinimized) { mainWindow.WindowState = WindowState.Minimized; } mainWindow.Show(); }
/// <summary> /// Method called at the start up of the application. /// </summary> /// <param name="sender">The object sender of the event.</param> /// <param name="e">Strart up event arguments.</param> private void App_Startup(object sender, StartupEventArgs e) { Trace.TraceInformation(Local.Properties.Logs.WaitingApplicationStart); // Start application base manager. ApplicationBase.Debug(); // Initialize application preferences. InitializePreferences(); // Initialize application options. InitializeOptions(); // Add Theme to Application UI Parmeters. //ApplicationBase.UI.AddParameter("ApplicationTheme", "Dark"); // Application is running // Process command line args bool startMinimized = false; for (int i = 0; i != e.Args.Length; ++i) { if (e.Args[i] == "/StartMinimized") { startMinimized = true; } } // Create main application window, starting minimized if specified MainWindow mainWindow = new MainWindow(); if (startMinimized) { mainWindow.WindowState = WindowState.Minimized; } string ws = ApplicationBase.UI.AddParameter("WindowState", "Maximized"); switch (ws) { case "Maximized": mainWindow.WindowState = WindowState.Maximized; break; case "Minimized": mainWindow.WindowState = WindowState.Minimized; break; case "Normal": mainWindow.WindowState = WindowState.Normal; break; } mainWindow.Show(); }