static void AppStartUp(object sender, StartupEventArgs e) { Application.Current.Properties["GodMode"] = false; foreach (string arg in e.Args) { if (arg.ToString() == "/godmode") { Application.Current.Properties["GodMode"] = true; break; } } MainWindow mainWindow = new MainWindow("My firstt", 200, 300); //mainWindow.Title = "My first"; //mainWindow.Height = 200; //mainWindow.Width = 300; mainWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen; mainWindow.Show(); }
private static void AppStartup(object sender, StartupEventArgs e) { // Check the incoming command-line arguments and see if they // specified a flag for /GODMODE. Application.Current.Properties["GodMode"] = false; foreach (string arg in e.Args) { if (arg.ToLower() == "/godmode") { Application.Current.Properties["GodMode"] = true; break; } } MainWindow mainWindow = new MainWindow("My first app!", 200, 300); mainWindow.Show(); }