public FrmLogin() { try { string filename = Application.StartupPath + "\\ConfigServer.reg"; m_Instance = this; InitializeComponent(); timer2.Enabled = true; panel1.Focus(); textBox1.Focus(); string data=lic.FileReadWrite.ReadFile(filename); if(data!=string.Empty) { string[] p = data.Split('@'); StaticClass.ipServer = p[0]; StaticClass.portSever = p[1]; } } catch (Exception) { m_Instance = this; InitializeComponent(); timer2.Enabled = true; panel1.Focus(); textBox1.Focus(); } }
public FrmLogin() { m_Instance = this; StaticClass.RPServer = new Server(); StaticClass.RPServer.Database_name = StaticClass.databaseName; StaticClass.RPServer.Mode = StaticClass.mode; StaticClass.RPServer.Password = StaticClass.password; StaticClass.RPServer.Server_name = StaticClass.serverName; StaticClass.RPServer.UserName = StaticClass.userName; InitializeComponent(); StaticClass.frmbanhangMain = new FrmBanHang(); StaticClass.frmbanhangMain.formLogin = this; timer2.Enabled = true; panel1.Focus(); textBox1.Select(); }
public static FrmLogin GetInstance() { if (m_Instance == null) m_Instance = new FrmLogin(); return m_Instance; }