private void MetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (!disconnected) { Server.Send(ChatMessage.CloseRequest(), zombie); } FunctionManager.MessageReceived -= OnMessageReceived; ChatOpenedZombies.Remove(zombie); }