private void MultyInvoke() { Multy multy = new Multy(); multy.Player1Board.Text = Common.Player1; multy.Player2Board.Text = Common.Player2; multy.Show(); Close(); }
private void bConnect_Click(object sender, RoutedEventArgs e) { try { remoteIp = IPAddress.Parse(tbIP.Text); remoteEP = new IPEndPoint(remoteIp, Port); localIp = Dns.GetHostAddresses(Dns.GetHostName()).Where(x => x.AddressFamily == AddressFamily.InterNetwork).Last(); Send(Common.Login, "/" + localIp.ToString()); Multy multy = new Multy(); multy.Player1Board.Text = Common.Player1; multy.Player2Board.Text = Common.Player2; multy.Show(); Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }