You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
2.5 KiB

1 year ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. using System.Windows.Forms;
  7. using System.Windows.Forms.VisualStyles;
  8. namespace CircleViewer
  9. {
  10. static class Program
  11. {
  12. /// <summary>
  13. /// The main entry point for the application.
  14. /// </summary>
  15. [STAThread]
  16. static void Main(string[] args)
  17. {
  18. if (args.Length > 1)
  19. {
  20. if (string.Compare(args[0], "protect", StringComparison.CurrentCultureIgnoreCase) == 0)
  21. {
  22. if (File.Exists(args[1]))
  23. {
  24. ProtectCmd cmd = new ProtectCmd();
  25. Boolean b = cmd.Process(args[1]).Result;
  26. }
  27. }
  28. if (string.Compare(args[0], "details", StringComparison.CurrentCultureIgnoreCase) == 0)
  29. {
  30. if (File.Exists(args[1]))
  31. {
  32. //Register Syncfusion license for WinForm, File formats, asp.net core and Xamarin
  33. Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("NTk3ODAxQDMxMzkyZTM0MmUzMGUwSmdnR0h1cEJxajFlUWU2UTkrZ3IwMUwzQlNRaU1FV0dmMmpzQlA3Mms9;NTk3ODAyQDMxMzkyZTM0MmUzMExlNW9vY2xNYWtGTWxpYms0VkNzYS9uNWNoa3pIcU9SOHBENFkxZmdLUW89;NTk3ODAzQDMxMzkyZTM0MmUzMFl2andNWXNiTVBMSDhzZUlBRVZLSWgxOC84Q3lBa0NLNWNGc2FhSE8wYTg9;NTk3ODA0QDMxMzkyZTM0MmUzMGtxeEpnSWZ4RzhFamVaTlBINUhaTERVMWRNczNCQVdXRXVzdEl5S3BHM0k9");
  34. DetailsCmd cmd = new DetailsCmd();
  35. cmd.Display(args[1]);
  36. }
  37. }
  38. }
  39. else
  40. {
  41. //Register Syncfusion license for WinForm, File formats, asp.net core and Xamarin
  42. Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("NTk3ODAxQDMxMzkyZTM0MmUzMGUwSmdnR0h1cEJxajFlUWU2UTkrZ3IwMUwzQlNRaU1FV0dmMmpzQlA3Mms9;NTk3ODAyQDMxMzkyZTM0MmUzMExlNW9vY2xNYWtGTWxpYms0VkNzYS9uNWNoa3pIcU9SOHBENFkxZmdLUW89;NTk3ODAzQDMxMzkyZTM0MmUzMFl2andNWXNiTVBMSDhzZUlBRVZLSWgxOC84Q3lBa0NLNWNGc2FhSE8wYTg9;NTk3ODA0QDMxMzkyZTM0MmUzMGtxeEpnSWZ4RzhFamVaTlBINUhaTERVMWRNczNCQVdXRXVzdEl5S3BHM0k9");
  43. Application.EnableVisualStyles();
  44. Application.SetHighDpiMode(HighDpiMode.SystemAware);
  45. Application.SetCompatibleTextRenderingDefault(false);
  46. Application.Run(new Form1());
  47. }
  48. }
  49. }
  50. }