private void ChatButton_Click(object sender, RoutedEventArgs e) { if (TShockChatWindowInstance == null) { TShockChatWindowInstance = new TShockChatWindow(); TShockChatWindowInstance.Closed += TShockChatWindowInstance_Closed; } TShockChatWindowInstance.Show(); TShockChatWindowInstance.Activate(); }
private void TShockChatWindowInstance_Closed(object sender, EventArgs e) { TShockChatWindowInstance = null; }