コード例 #1
0
        private void viewPacketsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConnectionHistoryEntry entry = GetSelectedEntry();

            if (entry != null)
            {
                LogPacket[] packets = _document.Packets.GetPacketsForNetwork(entry.NetId);
                if (packets.Length > 0)
                {
                    PacketLogViewerForm frm = new PacketLogViewerForm(packets[0], packets);

                    components.Add(frm);

                    frm.Show();
                }
                else
                {
                    MessageBox.Show(this, Properties.Resources.ConnectionHistoryControl_NoPackets,
                        Properties.Resources.MessageBox_ErrorString, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
コード例 #2
0
ファイル: PacketLogControl.cs プロジェクト: michyer/canape
        private void ShowLog(IList<LogPacket> ps)
        {
            PacketLogViewerForm frm = new PacketLogViewerForm(_packets[listLogPackets.SelectedIndices[0]], ps);

            components.Add(frm);

            frm.ReadOnly = ReadOnly;
            frm.Show();
        }