private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); WMSUserInfo objUser = new WMSUserInfo(); WMSAppInfo objApp = new WMSAppInfo { AppPath = Application.StartupPath, AppConfigFile = "AppConfig.xml" }; App.frmMain mainForm = new App.frmMain(); frmFlash flash = new frmFlash { SktClient = objApp.SvrSocket }; flash.ShowDialog(); objApp.SvrSocket = flash.SktClient; if (!flash.bIsOK) { Application.Exit(); } else if (!Login.UserLogin(objApp, objUser)) { Application.Exit(); } else { objApp.AppTitle = objUser.UnitName + " — 自动化仓库管理系统"; mainForm.UserInfo = objUser; mainForm.AInfo = objApp; mainForm.Text = objApp.AppTitle; Application.Run(mainForm); } }
public frmMain() { InitializeComponent(); frmFlash m_FrmFlash = new frmFlash(); m_FrmFlash.Show(); System.Threading.Thread.Sleep(3000); m_FrmFlash.Close(); DataService.OpenConnection(); }
private void Form1_Load(object sender, EventArgs e) { this.Hide(); frmFlash frm = new frmFlash(); frm.Show(); frm.Update(); System.Threading.Thread.Sleep(5100); frm.Close(); this.Visible = true; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); frmFlash f = new frmFlash(); f.ShowDialog(); if (f.DialogResult == DialogResult.OK) { Application.Run(new frmHome()); } }