private void ApplySpecificStructToPacket(object sender, RoutedEventArgs e) { if (PacketListView.SelectedIndex == -1) { return; } var view = new StructSelectView(_db.ServerZoneIpcType); view.ShowDialog(); var item = (PacketEntry)PacketListView.Items[PacketListView.SelectedIndex]; StructListView.Items.Clear(); try { string structText = null; structText = item.Direction == "S" ? _db.GetServerZoneStruct(view.GetSelectedOpCode()) : _db.GetClientZoneStruct(view.GetSelectedOpCode()); var structProvider = new Struct(); var structEntries = structProvider.Parse(structText, item.Data); foreach (var entry in structEntries.Item1) { StructListView.Items.Add(entry); } if (_mainWindow.ShowObjectMapCheckBox.IsChecked) { new ExtendedErrorView("Object map for " + item.Name, structEntries.Item2.Print(), "FFXIVMon Reborn").ShowDialog(); } } catch (Exception exc) { new ExtendedErrorView($"[XivMonTab] Struct error! Could not get struct for {item.Name} - {item.Message}", exc.ToString(), "Error").ShowDialog(); } UpdateInfoLabel(); }