private void HighlightButton_Click(object sender, EventArgs e) { ListView.SelectedListViewItemCollection si = m_listView.SelectedItems; ProfilerRDI prdiTree = m_logControl.m_prdiTree; foreach (ProfilerRDI prdi in prdiTree.GetEnumerator(ERDIEnumeration.OnlyDrawnLeafNodes)) { prdi.Displayed = false; CheckTreeNodes(prdi.Path, false); } foreach (ListViewItem item in si) { if (prdiTree.ContainsPath(item.Text)) { prdiTree[item.Text].Displayed = true; CheckTreeNodes(item.Text, true); } } m_logControl.SetFrameLengths(); m_logControl.m_prdiTreeView.Refresh(); m_logControl.InvalidateGraphControl(); }
void m_listView_MouseDoubleClick(object sender, MouseEventArgs e) { if (m_listView.SelectedItems.Count > 0) { ListViewItem selectedItem = m_listView.SelectedItems[0]; TreeNode fpTreeNode = m_logControl.m_prdiTreeView.TreeNodeHierarchy[selectedItem.Name]; ProfilerRDI prdi = (ProfilerRDI)fpTreeNode.Tag; m_logControl.SelectTreeViewTabPage("functionProfileTabPage"); m_logControl.m_prdiTreeView.SelectedRDINode = prdi; } }
//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 }
public ProfilerItemInfoControl(LogControl logControl, ProfilerRDI prdiTree, RDICheckboxTreeView <ProfilerRDI> prdiCTV) : base(logControl, prdiTree, prdiCTV) { InitializeComponent(); ItemPathLabel = itemPathLabel; }
public DisplayListCmd(int startIndex, int count, ProfilerRDI prdi) : base(startIndex, count) { PRDI = prdi; Colour = prdi.Colour.ConvertToArgbUint(); }
public CDIResult CreateDisplayInfo(int fromIdx, int toIdx) { CDIResult result = new CDIResult(); List <string> dontAdds = new List <string>(); dontAdds.Add("/posx"); dontAdds.Add("/posy"); dontAdds.Add("/posz"); dontAdds.Add("/rotx"); dontAdds.Add("/roty"); dontAdds.Add("/rotz"); dontAdds.Add("/frameTimeInS"); dontAdds.Add("/gpuTimeInS"); dontAdds.Add("/TexturePool"); foreach (string path in m_dataPaths.Paths.Where(p => !m_cdiProcessedPaths.Contains(p))) { m_cdiProcessedPaths.Add(path); foreach (IGraphDesc graphDesc in m_graphDescs) { if (FrameRecord.PathMatchesPattern(path, graphDesc.GetSearchPath())) { string strippedPath = path.Substring(path.IndexOf('/')); if (!path.StartsWith("/")) { throw new Exception(); } if (!dontAdds.Contains(strippedPath)) { int indexOfLastSlash = path.LastIndexOf("/"); string basePath = path.Substring(0, indexOfLastSlash); string name = path.Substring(indexOfLastSlash + 1); float displayScale = m_logControl.GetDisplayScale(strippedPath); if (graphDesc is CProfileGraphDesc) { ProfilerRDI prdi; if (m_logControl.m_prdiTree.ContainsPath(basePath)) { prdi = m_logControl.m_prdiTree[basePath]; } else { prdi = new ProfilerRDI(basePath, displayScale); } List <ProfilerRDI> newPRDIs = m_logControl.m_prdiTree.Add(prdi); result.NewPRDIs.AddRange(newPRDIs); // this is rather wasteful and needs rethinking foreach (ProfilerRDI newPRDI in newPRDIs) { CProfileGraphDesc profGD = graphDesc as CProfileGraphDesc; ProfileGraphLeafDesc desc = profGD.m_leafDescs[profGD.m_activeLeafDesc]; newPRDI.SetMetaData(desc.Name, desc.Type); } } else { OverviewRDI ordi; if (m_logControl.m_ordiTree.ContainsPath(path)) { ordi = m_logControl.m_ordiTree[path]; } else { ordi = new OverviewRDI(path, displayScale); } // default frame length to black if (path == "/frameLengthInMS") { ordi.Colour = new Statoscope.RGB(0, 0, 0); } List <OverviewRDI> newORDIs = m_logControl.m_ordiTree.Add(ordi); result.NewORDIs.AddRange(newORDIs); } } break; // find the first one that matches } } } AddValueStatsAndItemData(result.NewPRDIs, result.NewORDIs); lock (m_baseLogData) { for (int i = fromIdx; i <= toIdx; i++) { FrameRecord fr = m_baseLogData.FrameRecords[i]; foreach (UserMarkerLocation userMarkerLoc in fr.UserMarkers) { UserMarkerRDI umrdi = new UserMarkerRDI(userMarkerLoc, this); List <UserMarkerRDI> newUMRDIs = m_logControl.m_urdiTree.Add(umrdi); result.NewUMRDIs.AddRange(newUMRDIs); } } } return(result); }