示例#1
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewVisualizationForm frm = new NewVisualizationForm();

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                multiStreamView.Visible = false;

                multiStreamView.Clear();

                List <VisualSession>     visSessions  = new List <VisualSession>(sessions.Length);
                List <VisualTransaction> transactions = new List <VisualTransaction>();

                foreach (IPSession session in sessions)
                {
                    foreach (SessionVisualizer vis in frm.GetSelectedVisualizers())
                    {
                        transactions.AddRange(vis.GetTransactions(session));
                    }

                    if (transactions.Count > 0)
                    {
                        VisualSession vs = new VisualSession(session);

                        transactions.AddRange(StreamVisualizationManager.TCPEventsVis.GetTransactions(session));

                        vs.Transactions.AddRange(transactions);

                        vs.TransactionsCreated();

                        visSessions.Add(vs);

                        transactions.Clear();
                    }
                }

                foreach (VisualSession session in visSessions)
                {
                    session.SessionsCreated();
                }

                multiStreamView.Sessions = visSessions.ToArray();

                multiStreamView.Visible = true;
                multiStreamView.Focus();

                exportToXMLToolStripMenuItem.Enabled        = (visSessions.Count > 0);
                submitToRepositoryToolStripMenuItem.Enabled = (visSessions.Count > 0);
            }
        }
示例#2
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewVisualizationForm frm = new NewVisualizationForm();

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                multiStreamView.Visible = false;

                multiStreamView.Clear();

                List<VisualSession> visSessions = new List<VisualSession>(sessions.Length);
                List<VisualTransaction> transactions = new List<VisualTransaction>();

                foreach (IPSession session in sessions)
                {
                    foreach (SessionVisualizer vis in frm.GetSelectedVisualizers())
                    {
                        transactions.AddRange(vis.GetTransactions(session));
                    }

                    if (transactions.Count > 0)
                    {
                        VisualSession vs = new VisualSession(session);

                        transactions.AddRange(StreamVisualizationManager.TCPEventsVis.GetTransactions(session));

                        vs.Transactions.AddRange(transactions);

                        vs.TransactionsCreated();

                        visSessions.Add(vs);

                        transactions.Clear();
                    }
                }

                foreach (VisualSession session in visSessions)
                {
                    session.SessionsCreated();
                }

                multiStreamView.Sessions = visSessions.ToArray();

                multiStreamView.Visible = true;
                multiStreamView.Focus();

                exportToXMLToolStripMenuItem.Enabled = (visSessions.Count > 0);
                submitToRepositoryToolStripMenuItem.Enabled = (visSessions.Count > 0);
            }
        }