MapAround.Mapping.MapWorkspace.processTitleStyle C# (CSharp) Method

processTitleStyle() private method

private processTitleStyle ( XmlNode layerNode, TitleStyle TitleStyle ) : void
layerNode XmlNode
TitleStyle TitleStyle
return void
        private void processTitleStyle(XmlNode layerNode, TitleStyle TitleStyle)
        {
            XmlNode titleStyle = tryGetNodeByName(layerNode.ChildNodes, "title_style");
            if (titleStyle != null)
            {
                TitleStyle.TitlesVisible = titleStyle.Attributes["visible"].Value == "1";
                if (titleStyle.Attributes["visible_scale"] != null)
                    TitleStyle.VisibleScale = double.Parse(titleStyle.Attributes["visible_scale"].Value, CultureInfo.InvariantCulture);
                TitleStyle.Color = ColorTranslator.FromHtml(titleStyle.Attributes["color"].Value);
                TitleStyle.FontFamily = titleStyle.Attributes["font_name"].Value;
                TitleStyle.FontSize = float.Parse(titleStyle.Attributes["font_size"].Value, CultureInfo.InvariantCulture);
                TitleStyle.FontStyle = (FontStyle)int.Parse(titleStyle.Attributes["font_style"].Value, CultureInfo.InvariantCulture);
                if (titleStyle.Attributes["render_priority"] != null)
                    TitleStyle.RenderPriority = int.Parse(titleStyle.Attributes["render_priority"].Value, CultureInfo.InvariantCulture);
                if (titleStyle.Attributes["use_outline"] != null)
                    TitleStyle.UseOutline = titleStyle.Attributes["use_outline"].Value == "1";
                if (titleStyle.Attributes["outline_size"] != null)
                    TitleStyle.OutlineSize = int.Parse(titleStyle.Attributes["outline_size"].Value, CultureInfo.InvariantCulture);
                if (titleStyle.Attributes["lead_along"] != null)
                    TitleStyle.LeadAlong = titleStyle.Attributes["lead_along"].Value == "1";
            }
        }