예제 #1
0
파일: Program.cs 프로젝트: newhuaszh/WPF
        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();
        }
예제 #2
0
        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();
        }