示例#1
0
        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);
        }
示例#2
0
        public PacketViewTab(string file)
        {
            InitializeComponent();

            Text = Path.GetFileName(file);

            packetViewer = PacketReaderFactory.Create(Path.GetExtension(file));
            packets = packetViewer.ReadPackets(file).ToList();
            OpcodeDB.Load(packetViewer.Build, GetConnectionString());

            PacketView.VirtualMode = true;
            PacketView.VirtualListSize = packets.Count;
            PacketView.EnsureVisible(0);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
        public Parser(IPacketReader reader)
        {
            foreach (var packet in reader.ReadPackets())
            {
                var gr   = packet.CreateReader();
                var code = packet.Code;
                if (code == OpCodes.SMSG_COMPRESSED_UPDATE_OBJECT)
                {
                    code = OpCodes.SMSG_UPDATE_OBJECT;
                    Decompress(ref gr);
                }
                if (code == OpCodes.SMSG_UPDATE_OBJECT)
                {
                    ParseRest(gr);
                    CheckPacket(gr);
                }

                gr.Close();
            }
        }
示例#6
0
文件: Parser.cs 项目: fine/wowtools
        public Parser(IPacketReader reader)
        {
            foreach (var packet in reader.ReadPackets())
            {
                var gr = packet.CreateReader();
                var code = packet.Code;
                if (code == OpCodes.SMSG_COMPRESSED_UPDATE_OBJECT)
                {
                    code = OpCodes.SMSG_UPDATE_OBJECT;
                    Decompress(ref gr);
                }
                if (code == OpCodes.SMSG_UPDATE_OBJECT)
                {
                    ParseRest(gr);
                    CheckPacket(gr);
                }

                gr.Close();
            }
        }
示例#7
0
        public PacketViewTab(string file)
        {
            InitializeComponent();

            Text = Path.GetFileName(file);

            packetViewer = PacketReaderFactory.Create(Path.GetExtension(file));

            string connectionString = String.Format("Server={0};Port={1};Uid={2};Pwd={3};Database={4};character set=utf8;Connection Timeout=10",
                    Settings.Default.Host,
                    Settings.Default.Port,
                    Settings.Default.User,
                    Settings.Default.Pass,
                    Settings.Default.OpcodeDBName);
            packets = packetViewer.ReadPackets(file).ToList();

            OpcodeDB.Load(packetViewer.Build, connectionString);

            PacketView.VirtualMode = true;
            PacketView.VirtualListSize = packets.Count;
            PacketView.EnsureVisible(0);
        }
示例#8
0
        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;

            _statusLabel.Text = String.Format("Done. Client Build: {0}", packetViewer.Build);
        }