Program.cs 780 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.IO;
  3. using System.Windows.Forms;
  4. namespace LibraryEditor
  5. {
  6. internal static class Program
  7. {
  8. public static string openFileWith { get; set; } = string.Empty;
  9. /// <summary>
  10. /// The main entry point for the application.
  11. /// </summary>
  12. [STAThread]
  13. private static void Main(string[] args)
  14. {
  15. if (args.Length == 1)
  16. {
  17. FileInfo file = new FileInfo(args[0]);
  18. if (file.Exists)
  19. {
  20. openFileWith = args[0];
  21. }
  22. }
  23. Application.EnableVisualStyles();
  24. Application.SetCompatibleTextRenderingDefault(false);
  25. Application.Run(new LMain());
  26. }
  27. }
  28. }