Advertisement
Guest User

lmao x us

a guest
Aug 19th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. using System.Windows; // Application, StartupEventArgs, WindowState
  2.  
  3. namespace SDKSample
  4. {
  5. public partial class App : Application
  6. {
  7. void App_Startup(object sender, StartupEventArgs e)
  8. {
  9. // Application is running
  10. // Process command line args
  11. bool startMinimized = false;
  12. for (int i = 0; i != e.Args.Length; ++i)
  13. {
  14. if (e.Args[i] == "/StartMinimized")
  15. {
  16. startMinimized = true;
  17. }
  18. }
  19.  
  20. // Create main application window, starting minimized if specified
  21. MainWindow mainWindow = new MainWindow();
  22. if (startMinimized)
  23. {
  24. mainWindow.WindowState = WindowState.Minimized;
  25. }
  26. mainWindow.Show();
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement