Program.cs 789 B

12345678910111213141516171819202122232425262728
  1. using Hik.Api;
  2. using Nancy.Hosting.Self;
  3. namespace xicheji
  4. {
  5. internal static class Program
  6. {
  7. public static MainForm MainForm { get; set; }
  8. /// <summary>
  9. /// The main entry point for the application.
  10. /// </summary>
  11. [STAThread]
  12. static void Main()
  13. {
  14. // To customize application configuration such as set high DPI settings or default font,
  15. // see https://aka.ms/applicationconfiguration.
  16. ApplicationConfiguration.Initialize();
  17. HikApi.Initialize();
  18. new NancyHost(new Uri($"http://localhost:{ConfigHelper.GetConfig().ServicePort}/")).Start();
  19. MainForm = new MainForm();
  20. Application.Run(MainForm);
  21. }
  22. }
  23. }