private void Logcheck() { String s; NetworkStream clStream = cl.GetStream(); while (true) { if (logged == false) { String un = flogin.uname; String up = flogin.upass; if (un != "" && up != "") { name = un; s = "login~" + un + "~" + up; ASCIIEncoding enc = new ASCIIEncoding(); byte[] buf = enc.GetBytes(s); clStream.Write(buf, 0, buf.Length); clStream.Flush(); flogin.upass = ""; flogin.uname = ""; } } else { break; } } flogin.Invoke(flogin.dsc, null); fmain = new Mainchat(name, flist, dsm); fmain.ShowDialog(); Environment.Exit(0); }
private void Logcheck() { String s; NetworkStream clStream = cl.GetStream(); while (true) { if (logged == false) { String un = flogin.uname; String up = flogin.upass; if (un != "" && up != "") { name = un; s = "login~" + un + "~" + up; ASCIIEncoding enc = new ASCIIEncoding(); byte[] buf = enc.GetBytes(s); clStream.Write(buf, 0, buf.Length); clStream.Flush(); flogin.upass = ""; flogin.uname = ""; } } else { break; } } flogin.Invoke(flogin.dsc, null); fmain = new Mainchat(name, flist,dsm); fmain.ShowDialog(); Environment.Exit(0); }