private void OpenMenu_Click(object sender, EventArgs e) { if (_openDialog.ShowDialog() != DialogResult.OK) { return; } textBox1.Clear(); textBox2.Clear(); _list.Items.Clear(); _listCache.Clear(); _statusLabel.Text = "Loading..."; var file = _openDialog.FileName; packetViewer = PacketReaderFactory.Create(Path.GetExtension(file)); if (!Loaded()) { return; } packets = packetViewer.ReadPackets(file).ToList(); _list.VirtualMode = true; _list.VirtualListSize = packets.Count; _list.EnsureVisible(0); _statusLabel.Text = String.Format("Done. Client Build: {0}", packetViewer.Build); }
public PacketViewTab(string file) { InitializeComponent(); Text = Path.GetFileName(file); packetViewer = PacketReaderFactory.Create(Path.GetExtension(file)); packets = packetViewer.ReadPackets(file).ToList(); _list.VirtualMode = true; _list.VirtualListSize = packets.Count; _list.EnsureVisible(0); }