123456789101112131415161718192021222324252627282930 |
- using Hik.Api;
- using Nancy.Hosting.Self;
- namespace xicheji
- {
- internal static class Program
- {
- #pragma warning disable CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
- public static MainForm MainForm { get; set; }
- #pragma warning restore CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main()
- {
- // To customize application configuration such as set high DPI settings or default font,
- // see https://aka.ms/applicationconfiguration.
- ApplicationConfiguration.Initialize();
- HikApi.Initialize();
- new NancyHost(new Uri($"http://localhost:{ConfigHelper.GetConfig().ServicePort}/")).Start();
- MainForm = new MainForm();
- Application.Run(MainForm);
- }
- }
- }
|