static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ConfigurationState state = new ConfigurationState(); var isAutoUpdate = state.Get <bool>(StateKeys.IsAutoUpdate); if (isAutoUpdate) { AutoUpdate(); } Logon logon = new Logon(); if (logon.ShowDialog() == DialogResult.OK) { //初始化数据类型 DataTypeManager.InitMappingConfig(); //运行主页面 Application.Run(new Main()); } }