static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); LoginForm loginForm = new LoginForm(); Application.Run(loginForm); if (loginForm.DialogResult == DialogResult.OK) { SGSClient sgsClientForm = new SGSClient(); sgsClientForm.clientSocket = loginForm.clientSocket; sgsClientForm.strName = loginForm.strName; sgsClientForm.ShowDialog(); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); LoginForm loginForm = new LoginForm(); Application.Run(loginForm); if (loginForm.DialogResult == DialogResult.OK) { SGSClient sgsClientForm = new SGSClient(); //sgsClientForm.clientSocket = loginForm.clientSocket; //Aqui le pasaba la referencia... //sgsClientForm.strName = loginForm.strName; sgsClientForm.ShowDialog(); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); LoginForm loginForm = new LoginForm(); Application.Run(loginForm); if (loginForm.DialogResult == DialogResult.OK) { SGSClient sgsClientForm = new SGSClient(loginForm.strName, loginForm.epServer); sgsClientForm.clientSocket = loginForm.clientSocket; sgsClientForm.strName = loginForm.strName; sgsClientForm.epServer = loginForm.epServer; sgsClientForm.ShowDialog(); } }