UserMarkerRDI GetFirstURDIMatching(UserMarker um, LogView logView) { if (um == null) { return(null); } UserMarkerRDI baseURDI = m_urdiTree[um.Path]; if (baseURDI == null) { return(null); } foreach (UserMarkerRDI childURDI in baseURDI.Children) { if ((childURDI.DisplayName == um.Name) && (childURDI.m_logView == logView)) { return(childURDI); } } return(null); }
public void SetTracking(LogView logView, bool bAutoTracking) { m_OGLGraphingControl.SetTracking(logView, bAutoTracking); }
//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 }
protected virtual bool IsValid(LogView logView) { return(true); }
protected abstract float GetValue(FrameRecord fr, ViewFrameRecord vfr, LogView logView);
public ZoneHighlighterInstance(ZoneHighlighterRDI zrdi, LogView logView) { ZRDI = zrdi; LogView = logView; Reset(); }
public string GetNameForLogView(LogView logView) { return(logView.Index + "." + m_fr.Index + "." + m_index + " " + m_name); }
public void AddListeningLogView(LogView logView) { LogViews.Add(logView); }
protected override bool IsValid(LogView logView) { return(logView.m_logControl.m_ordiTree.ContainsPath(TrackedPath)); }
protected override void glDraw() { while (true) { KeyValuePair <Image, GLTexture> req; lock (m_thumbnailComplete) { if (m_thumbnailComplete.Count == 0) { break; } req = m_thumbnailComplete[0]; m_thumbnailComplete.RemoveAt(0); } if (req.Key != null) { req.Value.Update((Bitmap)req.Key); req.Key.Dispose(); } } if (m_logViews.Count > 0) { LogView lv = m_logViews[0]; LogData ld = lv.m_logData; if (m_remakeTree) { VirtualBounds = new RectD(0, 0, 1, 1); View = new RectD(0, 0, 1, 1); TreemapNode rootNode = CreateTree(); FrameRecord fr = m_frameRecord; if (fr != null) { lock (ld) { List <RDIElementValue <ProfilerRDI> > children = new List <RDIElementValue <ProfilerRDI> >(); float totalSize = 0; foreach (RDIElementValue <ProfilerRDI> prdiEv in m_logControl.m_prdiTree.GetValueEnumerator(fr)) { float size = prdiEv.m_value; if (size == 0.0f) { continue; } children.Add(prdiEv); totalSize += size; } rootNode.Name = String.Format("{0} MB", totalSize); children.Sort((a, b) => - a.m_value.CompareTo(b.m_value)); foreach (RDIElementValue <ProfilerRDI> ev in children) { float size = ev.m_value; string path = ev.m_rdi.Path; int sep = path.LastIndexOf('/'); GLTexture tex = null; if (path.StartsWith("/TexStrm/")) { string texturepath = path.Substring("/TexStrm/".Length).Replace(".dds", ".tif"); tex = RequestThumbnail(texturepath, -size); } TreemapNode child = CreateChild(rootNode); child.Size = size / totalSize; child.Name = (sep >= 0) ? path.Substring(sep + 1) : path; child.Tag = ev; child.Texture = tex; } } } VirtualBounds = new RectD(0, 0, 1, 1); View = new RectD(0, 0, 1, 1); m_remakeTree = false; } } base.glDraw(); }