protected override string FormatTooltip(TreemapNode node) { RDIElementValue <ProfilerRDI> prdiEv = node.Tag as RDIElementValue <ProfilerRDI>; if (prdiEv != null) { float val = prdiEv.m_value; string vals; if (val > 1.0f) { vals = string.Format("{0:F1}MB", val); } else if (val > 1.0f / 1024.0f) { vals = string.Format("{0:F0}KB", val * 1024.0f); } else { vals = string.Format("{0:F0}B", val * 1024.0f * 1024.0f); } return(string.Format("{0}\n{1}", prdiEv.m_rdi.Path, vals)); } return(string.Empty); }
void m_treemapControl_SelectionChanged(object sender, EventArgs e) { TreemapNode node = m_treemapControl.SelectedNode; if (node != null) { RDIElementValue <ProfilerRDI> prdiEv = node.Tag as RDIElementValue <ProfilerRDI>; if (prdiEv != null) { SelectItemInfo(prdiEv.m_rdi); } } }