Program.cs 755 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using System.Windows.Forms;
  6. namespace CustomUrlSchemeRegistrationPoC
  7. {
  8. static class Program
  9. {
  10. /// <summary>
  11. /// 应用程序的主入口点。
  12. /// </summary>
  13. [STAThread]
  14. static void Main(string[] args)
  15. {
  16. if (args.Length != 0)
  17. {
  18. MessageBox.Show(string.Join(Environment.NewLine, args.Select((p, i) => $"args[{i}]= {p}")), "Command line Args");
  19. return;
  20. }
  21. Application.EnableVisualStyles();
  22. Application.SetCompatibleTextRenderingDefault(false);
  23. Application.Run(new UriPocForm());
  24. }
  25. }
  26. }