public void ShowDialog() { if (!LCY_DBTools.DBTool.TestConnString(LCY_DBTools.DBTool.GetConnString())) { return; } if (UserType == LCY_Database.UserType.NONE) { using (FrmLogon f = new FrmLogon()) { if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) { UserType = f.GetUserType(); } else { return; } } } using (FrmUpload f = new FrmUpload(UserType)) { f.ShowDialog(); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); #if Release if (!ReadKey()) { MessageBox.Show("对不起试用版已经过期!请尽快付费!"); return; } FrmLogon logon = new FrmLogon(); if (logon.ShowDialog() == DialogResult.OK) { logon.Close(); Application.Run(new FrmMain()); } #else Application.Run(new FrmMain()); //Application.Run(new FrmTest()); //Application.Run(new Form1()); #endif }