public KindPair(DoxygenDB.EntKind doxyKind, vsCMElement vsKind) { m_doxyKind = doxyKind; m_vsKind = vsKind; }
static bool IsMatchPair(DoxygenDB.EntKind doxyKind,vsCMElement vsKind) { int idx = s_typeMap.FindIndex(delegate(KindPair p) { return(p.m_doxyKind == doxyKind && p.m_vsKind == vsKind); }); return(idx != -1); }
public CodeUIItem(string uniqueName, Dictionary <string, object> customData) { m_uniqueName = uniqueName; this.MouseDown += new MouseButtonEventHandler(MouseDownCallback); this.MouseUp += new MouseButtonEventHandler(MouseUpCallback); this.MouseMove += new MouseEventHandler(MouseMoveCallback); this.MouseEnter += new MouseEventHandler(MouseEnterCallback); this.MouseLeave += new MouseEventHandler(MouseLeaveCallback); this.Cursor = Cursors.Arrow; var scene = UIManager.Instance().GetScene(); m_name = (string)customData["name"]; m_longName = (string)customData["longName"]; m_kind = (DoxygenDB.EntKind)customData["kind"]; ToolTip = m_longName; m_metric = (Dictionary <string, DoxygenDB.Variant>)customData["metric"]; BuildDisplayName(m_name); var comment = scene.GetComment(m_uniqueName); UpdateComment(comment); m_kindName = (string)customData["kindName"]; if (m_metric.ContainsKey("CountLine")) { var metricLine = m_metric["CountLine"].m_int; m_lines = metricLine; } var kindStr = m_kindName.ToLower(); // custom data m_customData = new Dictionary <string, Variant>(); m_color = (Color)customData["color"]; if (m_kind == DoxygenDB.EntKind.FUNCTION) { // Find caller and callee count int nCaller = (int)customData["nCaller"]; int nCallee = (int)customData["nCallee"]; m_customData["nCaller"] = new Variant(nCaller); m_customData["nCallee"] = new Variant(nCallee); m_customData["callerR"] = new Variant(GetCallerRadius(nCaller)); m_customData["calleeR"] = new Variant(GetCallerRadius(nCallee)); } else if (m_kind == DoxygenDB.EntKind.DIR) { m_customData["nDir"] = new Variant((int)customData["nDir"]); m_customData["nFile"] = new Variant((int)customData["nFile"]); m_color = Color.FromRgb(232, 184, 38); } else if (m_kind == DoxygenDB.EntKind.FILE) { m_color = Color.FromRgb(125, 215, 249); } else if (m_kind == DoxygenDB.EntKind.GROUP) { // Visual Studio project m_customData["nFile"] = new Variant((int)customData["nFile"]); m_color = Color.FromRgb(185, 117, 181); } if (m_kind == DoxygenDB.EntKind.FUNCTION || m_kind == DoxygenDB.EntKind.VARIABLE) { m_customData["hasDef"] = new Variant((int)customData["hasDef"]); if (customData.ContainsKey("className")) { m_customData["className"] = new Variant((string)customData["className"]); } } SolidColorBrush brush = new SolidColorBrush(); brush.Color = m_color; this.Fill = brush; this.Stroke = new SolidColorBrush(Color.FromArgb(0, 255, 157, 38)); BuildGeometry(); Canvas.SetZIndex(this, 0); this.StrokeThickness = 0.0; }