Ejemplo n.º 1
0
        private void MultyInvoke()
        {
            Multy multy = new Multy();

            multy.Player1Board.Text = Common.Player1;
            multy.Player2Board.Text = Common.Player2;
            multy.Show();
            Close();
        }
Ejemplo n.º 2
0
 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);
     }
 }