private void Btn_ShowPacketEditor_Click(object sender, RoutedEventArgs e) { if (PacketEditor != null && PacketEditor.IsVisible) { return; } PacketEditor = new PacketEditor(); PacketEditor.Show(); }