static void Main(string[] arg) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (arg != null && arg.Length > 0) { Application.Run(new FrmMain()); return; } //创建过度页面,并显示 FrmTranslucent.ShowSplashScreen(); try { DapperHelper.InitDB(); FrmMain frmMain = new FrmMain(); frmMain.Shown += new EventHandler(frmMain_Shown); Application.Run(frmMain); } catch (Exception ex) { frmMain_Shown(null, null); } //Application.Run(new Form5()); //return; }
public static void ShowSplashScreen() { if (splashScreen == null) { splashScreen = new FrmTranslucent(); } //splashScreen.Text = "可采储量分析系统" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); //splashScreen.Icon = Properties.Resources.logo; splashScreen.StartPosition = FormStartPosition.CenterScreen; splashScreen.Show(Properties.Resources.index); }