public void SetRender(TreeNodeFeatureClass treeNode, DF3DFeatureClass dffc) { if (treeNode == null || dffc == null) { return; } try { IFeatureClass fc = dffc.GetFeatureClass(); if (fc == null) { return; } IFeatureLayer fl = dffc.GetFeatureLayer(); if (fl == null) { return; } string name = string.IsNullOrEmpty(fc.AliasName) ? fc.Name : fc.AliasName; string xmlFileName = renderPath + name + ".xml"; if (File.Exists(xmlFileName)) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(xmlFileName); if (xmlDoc != null) { XmlNode featureLayerNode = xmlDoc.SelectSingleNode("FeatureLayer"); if (featureLayerNode == null) { return; } XmlNode geometryRenderNode = featureLayerNode.SelectSingleNode("GeometryRender"); IGeometryRender geoRender = GetGeoRender(geometryRenderNode); XmlNode textRenderNode = featureLayerNode.SelectSingleNode("TextRender"); ITextRender textRender = GetTextRender(textRenderNode); fl.SetTextRender(textRender); fl.SetGeometryRender(geoRender); treeNode.Visible = false; } } } catch (Exception ex) { } }
public bool Exists(DF3DFeatureClass fc) { return(Exists(fc.GetFeatureClass().Guid.ToString())); }