1234567891011121314151617181920212223242526272829303132333435 |
- using System;
- using System.Linq;
- using System.Net;
- using System.Windows.Forms;
- namespace BsWidget
- {
- internal static class Program
- {
- internal static string Host = "127.0.0.1";
- internal static bool NoPerf = false;
- /// <summary>
- /// 应用程序的主入口点。
- /// </summary>
- [STAThread]
- private static void Main(string[] args)
- {
- if (args.Length > 0)
- {
- if (IPAddress.TryParse(args[0], out _))
- {
- Host = args[0];
- }
- }
- if (args.Any(p => p.ToLower() == "--no-perf")) NoPerf = true;
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new MainForm());
- }
- }
- }
|