예제 #1
0
 /// <summary>
 /// Manejador del inicio de la ventana del chat.
 /// Cierra la ventana de selección de comunicaciones y crea la nueva ventana.
 /// </summary>
 /// <param name="source">Fuente del evento.</param>
 /// <param name="e">Argumentos del evento.</param>
 void ventanaComunicaciones_OnInicioComunicacion(object source, MascotaVirtual.Comunicaciones.IComunicaciones e)
 {
     chat = new MascotaVirtual.Comunicaciones.ChatSeleccion();
     chat.OnVentanaCerrada  += new MascotaVirtual.Comunicaciones.ChatSeleccion.ManejadorVentanaCerrada(chat_OnVentanaCerrada);
     chat.OnPasoIntercambio += new MascotaVirtual.Comunicaciones.ChatSeleccion.ManejadorPasoIntercambio(chat_OnPasoIntercambio);
     chat.OnPasoJuego       += new ChatSeleccion.ManejadorPasoJuego(chat_OnPasoJuego);
     chat.SetComunicador(e);
     chat.Iniciar();
     chat.Enabled = true;
     chat.Show();
     ventanaComunicaciones.Dispose();
     ventanaComunicaciones = null;
 }
예제 #2
0
 /// <summary>
 /// Manejador del cierre de la ventana del chat.
 /// Cierra la ventana.
 /// </summary>
 /// <param name="source">Fuente del evento.</param>
 /// <param name="e">Argumentos del evento.</param>
 void chat_OnVentanaCerrada(object source, EventArgs e)
 {
     chat.Dispose();
     chat = null;
 }