Exemplo n.º 1
0
        public static string GetNodeTooltip(System.Type type)
        {
            NodeTooltipAttribute tooltip = type.GetCustomAttribute(typeof(NodeTooltipAttribute)) as NodeTooltipAttribute;

            if (string.IsNullOrEmpty(tooltip.Tooltip))
            {
                return("");
            }
            return(tooltip.Tooltip);
        }
Exemplo n.º 2
0
        public static bool TryGetTooltip(System.Type type, out string s)
        {
            NodeTooltipAttribute tooltip = type.GetCustomAttribute(typeof(NodeTooltipAttribute)) as NodeTooltipAttribute;

            if (tooltip == null)
            {
                s = default(string);
                return(false);
            }

            s = tooltip.Tooltip;
            return(true);
        }