示例#1
0
        public void LogControl_DragDrop(object sender, DragEventArgs e)
        {
            LogControl sourceLogControl = GetDragEventSourceLogControl(e);
            LogRange   sourceLogRange   = GetDragEventSourceLogRange(e);

            if (sourceLogControl != null || sourceLogRange != null)
            {
                foreach (LogView logView in m_logViews)
                {
                    logView.SetSingleOrdiColour(RGB.RandomHueRGB());
                }

                foreach (Control lliControl in logListTableLayoutPanel.Controls)
                {
                    LogListItem lli = (LogListItem)lliControl;
                    lli.UpdateContents();
                }

                logListTableLayoutPanel.SuspendLayout();
                {
                    if (sourceLogControl != null)
                    {
                        foreach (LogView logView in sourceLogControl.m_logViews)
                        {
                            FrameRecordRange frr      = logView.m_logData == logView.m_baseLogData ? null : logView.m_logData.FrameRecordRange;
                            LogRange         logRange = new LogRange(logView.m_baseLogData, frr);
                            AddNewLogRange(logRange);
                        }
                    }
                    else if (sourceLogRange != null)
                    {
                        AddNewLogRange(sourceLogRange);
                    }
                }
                logListTableLayoutPanel.ResumeLayout();

                m_statoscopeForm.SetSessionInfoList(this);

                RefreshItemInfoPanel();
                UpdateControls(0);
                SetUMTreeViewNodeColours();

                foreach (LogView logView in m_logViews)
                {
                    // this is required as in calculating value stats in UpdateControls(), an OnPaint could happen and use invalid data
                    logView.DeleteDisplayListsEndingIn(".MA");
                    logView.DeleteDisplayListsEndingIn(".LM");
                }
            }
            else
            {
                m_statoscopeForm.StatoscopeForm_DragDrop(sender, e);
            }
        }
示例#2
0
        void SerializeInLogViewStates(SerializeState serializeState)
        {
            if (serializeState.LogViewStates == null)
            {
                return;
            }

            for (int i = 0; i < m_logViews.Count; i++)
            {
                LogView logView = m_logViews[i];
                LogViewSerializeState lvss;

                lock (logView.m_logData)
                {
                    if (i < serializeState.LogViewStates.Length)
                    {
                        lvss = serializeState.LogViewStates[i];

                        if ((m_logViews.Count > 1) && (lvss.SingleORDIColour != null))
                        {
                            logView.m_singleOrdiColour = lvss.SingleORDIColour;
                        }
                    }
                    else
                    {
                        lvss = serializeState.LogViewStates.Last();
                    }

                    if (!(logView.m_logData is SocketLogData))                          // this is only a temporary quick fix - fixing this properly will take some time
                    {
                        UserMarkerRDI    startURDI = GetFirstURDIMatching(lvss.StartUM, logView);
                        UserMarkerRDI    endURDI   = GetFirstURDIMatching(lvss.EndUM, logView);
                        FrameRecordRange frr       = logView.GetFrameRecordRange();
                        int startIdx = (startURDI != null) ? startURDI.m_uml.m_fr.Index : frr.StartIdx;
                        int endIdx   = (endURDI != null) ? endURDI.m_uml.m_fr.Index : frr.EndIdx;

                        logView.SetFrameRecordRange(Math.Min(startIdx, endIdx), Math.Max(startIdx, endIdx));

                        logView.m_startUM = (startURDI != null) ? startURDI.DisplayUserMarker : null;
                        logView.m_endUM   = (endURDI != null) ? endURDI.DisplayUserMarker : null;
                    }

                    foreach (Control lliControl in logListTableLayoutPanel.Controls)
                    {
                        LogListItem lli = (LogListItem)lliControl;
                        lli.UpdateContents();
                    }

                    SetUMTreeViewNodeColours();
                }
            }
        }
示例#3
0
        void AddNewLogRange(LogRange logRange)
        {
            LogView newLogView = new LogView(this, logRange);

            newLogView.SetSingleOrdiColour(RGB.RandomHueRGB());
            m_logViews.Add(newLogView);

            LogListItem logListItem = new LogListItem(newLogView);

            logListTableLayoutPanel.Controls.Add(logListItem);

            AddZoneHighlighters(newLogView);
        }
示例#4
0
        //bool m_nonNumberEntered;

        public LogControl(List <LogRange> logRanges, StatoscopeForm statoscopeForm)
        {
            m_statoscopeForm = statoscopeForm;

            InitializeComponent();
            InitializeDisplayScales();

            if (components == null)
            {
                components = new Container();
            }

            intervalPath.Text = "";

            Dock = DockStyle.Fill;

            m_ordiTree = new OverviewRDI();
            m_prdiTree = new ProfilerRDI();
            m_urdiTree = new UserMarkerRDI();
            m_trdiTree = new TargetLineRDI();
            m_zrdiTree = new ZoneHighlighterRDI();

            m_ordiTreeView = new ORDICheckboxTreeView(this, m_ordiTree);
            m_prdiTreeView = new PRDICheckboxTreeView(this, m_prdiTree);
            m_urdiTreeView = new URDICheckboxTreeView(this, m_urdiTree);
            m_trdiTreeView = new TRDICheckboxTreeView(this, m_trdiTree);
            m_zrdiTreeView = new ZRDICheckboxTreeView(this, m_zrdiTree);

            InitializeItemInfoControls();

            foreach (LogRange logRange in logRanges)
            {
                LogView logView = new LogView(this, logRange);

                components.Add(logView);
                m_logViews.Add(logView);
            }

            m_intervalControl         = new IntervalControl();
            m_intervalControl.Dock    = DockStyle.Fill;
            m_intervalControl.Visible = false;

            m_intervalControl.Tree = m_logViews[0].m_logData.IntervalTree;

            m_intervalControl.ViewChanged           += new EventHandler(m_intervalControl_ViewChanged);
            m_intervalControl.ActiveIntervalChanged += new EventHandler(m_intervalControl_ActiveIntervalChanged);

            intervalTreemapTableLayoutPanel.Controls.Add(m_intervalControl, 0, 0);

            m_treemapControl         = new ProfilerTreemapControl(this);
            m_treemapControl.Dock    = DockStyle.Fill;
            m_treemapControl.Visible = false;

            m_treemapControl.SelectionChanged += new EventHandler(m_treemapControl_SelectionChanged);

            intervalTreemapTableLayoutPanel.Controls.Add(m_treemapControl, 0, 1);

            m_OGLGraphingControl                    = new OpenGLGraphingControl(this);
            m_OGLGraphingControl.Dock               = DockStyle.Fill;
            m_OGLGraphingControl.SelectionChanged  += new EventHandler(m_OGLGraphingControl_SelectionChanged);
            m_OGLGraphingControl.SelectedHighlight += new EventHandler(m_OGLGraphingControl_SelectedHighlight);

            displayTableLayoutPanel.Controls.Add(m_OGLGraphingControl, 0, 1);

            logListTableLayoutPanel.SuspendLayout();

            foreach (LogView logView in m_logViews)
            {
                if (m_logViews.Count > 1)
                {
                    logView.SetSingleOrdiColour(RGB.RandomHueRGB());
                }

                LogListItem logListItem = new LogListItem(logView);
                logListTableLayoutPanel.Controls.Add(logListItem);
            }

            logListTableLayoutPanel.ResumeLayout();

            m_spikeFinder = new SpikeFinder(this);

            overviewTabPage.Controls.Add(new CTVControl(m_ordiTreeView));
            functionProfileTabPage.Controls.Add(new CTVControl(m_prdiTreeView));
            userMarkersTabPage.Controls.Add(new CTVControl(m_urdiTreeView));
            targetLinesTabPage.Controls.Add(new CTVControl(m_trdiTreeView, new TargetLineCTVControlPanel(m_trdiTreeView)));
            spikeFinderTabPage.Controls.Add(m_spikeFinder);
            zoneHighlightersTabPage.Controls.Add(new CTVControl(m_zrdiTreeView, new ZoneHighlighterCTVControlPanel(m_zrdiTreeView)));

            //m_nonNumberEntered = false;

            InitializeTargetLines();
            InitializeZoneHighlighters();

            UpdateControls(0);

            m_OGLGraphingControl.FitViewToFrameRecords();

            AutoEnableTargetLines();
            //CreateSummaryTabPage();	// this will be replaced with a much better Dr Statoscope feature later
        }