Program.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Windows.Forms;
  3. namespace Dongke.IBOSS.PRD.Client.AutoUpgrade
  4. {
  5. static class Program
  6. {
  7. internal static string Parameter
  8. {
  9. get;
  10. set;
  11. }
  12. internal static bool IsPublic
  13. {
  14. get;
  15. set;
  16. }
  17. /// <summary>
  18. /// 应用程序的主入口点。
  19. /// </summary>
  20. [STAThread]
  21. static void Main(string[] args)
  22. {
  23. //Program.IsPublic = !(args != null && args.Length > 0);
  24. //Program.Parameter = (args != null && args.Length > 0) ? args[0] : null;
  25. if (args != null && args.Length > 0)
  26. {
  27. if (args[0] == "IBOSSPRDPublic.exe")
  28. {
  29. Program.IsPublic = true;
  30. }
  31. else
  32. {
  33. Program.IsPublic = false;
  34. }
  35. Program.Parameter = string.Join(" ", args);
  36. }
  37. else
  38. {
  39. Program.IsPublic = false;
  40. }
  41. //MessageBox.Show(Program.Parameter + Program.IsPublic);
  42. Application.EnableVisualStyles();
  43. Application.SetCompatibleTextRenderingDefault(false);
  44. Application.Run(new FrmAutoUpgradeInfomation());
  45. }
  46. }
  47. }