Ejemplo n.º 1
0
        void gridTooltipController_BeforeShow(object sender, ToolTipControllerShowEventArgs e)
        {
            ListVoteResults lr = e.SelectedObject as ListVoteResults;

            if (lr == null)
            {
                return;
            }
            SuperToolTip superTip = new SuperToolTip()
            {
                MaxWidth = 350, AllowHtmlText = DefaultBoolean.True
            };

            e.AutoHide    = false;
            e.ToolTipType = ToolTipType.SuperTip;
            e.Show        = false;
            if (IsCountyMode && !string.IsNullOrEmpty(lr.CountyFIPS))
            {
                e.Show = GenerateCountyToolTip(CountyInfo.GetCounty(lr.CountyFIPS), superTip);
            }

            if (!IsCountyMode)
            {
                e.Show = GenerateStateToolTip(StateInfo.GetState(lr.State), superTip);
            }

            e.SuperTip = superTip;
        }
        public CountyInfo CountyFromMapAttribute(MapItemAttributeCollection attributes)
        {
            if (attributes == null)
            {
                return(null);
            }
            var countyAttr = attributes["GEOID"];

            if (countyAttr != null)
            {
                return(CountyInfo.GetCounty((countyAttr.Value ?? "").ToString()));
            }
            return(null);
        }