/// <summary> /// Abre una ventana de chat /// </summary> private void OpenChatWindow(ContactNodeViewModel nodeContact) { if (nodeContact != null) { OpenChatWindow(nodeContact.GetConnectionNode()?.Connection, nodeContact.Contact, null); } }
/// <summary> /// Elimina un contacto /// </summary> private void DeleteContact(ContactNodeViewModel nodeContact) { if (nodeContact != null && BauMessengerViewModel.Instance.ControllerWindow.ShowQuestion($"¿Realmente desea eliminar el contacto {nodeContact.Contact.FullJid}?")) { JabberConnection connection = nodeContact.GetConnectionNode()?.Connection; if (connection == null) { BauMessengerViewModel.Instance.ControllerWindow.ShowMessage("No se encuentra la conexión del contacto"); } else { connection.DeleteContact(nodeContact.Contact); } } }