private void timer1_Tick(object sender, EventArgs e) { if (timer1.Interval == 4000) { try { if (!IsPath) { timer1.Stop(); RegistrationProcess.frmServerConnect Obj = new RegistrationProcess.frmServerConnect(); Obj.ClientDBName = "IMS_Client_2"; //Obj.exeName = System.Diagnostics.Process.GetCurrentProcess().ProcessName; this.Hide(); Obj.BringToFront(); Obj.Show(); } else if (CheckReg()) { timer1.Stop(); frmLogin Obj = new frmLogin(); this.Hide(); Obj.BringToFront(); Obj.Show(); //login window } else { timer1.Stop(); if (i == 0) { RegistrationProcess.frmCustomerRegister reg = new RegistrationProcess.frmCustomerRegister(); //reg.exeName = System.Diagnostics.Process.GetCurrentProcess().ProcessName; this.Hide(); reg.BringToFront(); reg.Show(); } } } catch { timer1.Enabled = false; timer1.Stop(); this.Close(); } } }
private void timer1_Tick(object sender, EventArgs e) { if (timer1.Interval == 4000) { try { if (!IsPath) { timer1.Stop(); RegistrationProcess.frmServerConnect Obj = new RegistrationProcess.frmServerConnect(); Obj.ClientDBName = "IMS"; this.Hide(); Obj.BringToFront(); Obj.Show(); } else if (CheckReg()) { timer1.Stop(); //Login Obj = new Login() MessageBox.Show("Welcome Login"); //login window } else { timer1.Stop(); if (i == 0) { RegistrationProcess.frmCustomerRegister reg = new RegistrationProcess.frmCustomerRegister(); this.Hide(); reg.BringToFront(); reg.Show(); } } } catch { timer1.Enabled = false; timer1.Stop(); this.Close(); } } }