public string Line(LibraryStandardIdentityGroup sig, SymbolSet ss, SymbolSetLegacySymbol symbol, LegacyEntityType entity, LegacyFunctionCodeType code) { string result = ""; string graphic = ""; _notes = ""; string graphicPath = _configHelper.GetPath("JMSML_2525C", FindEnum.Find2525C); if (entity.Graphic != "" && entity.Icon != IconType.FULL_FRAME) graphic = entity.Graphic; else graphic = GrabGraphic(entity.CloverGraphic, entity.RectangleGraphic, entity.SquareGraphic, entity.DiamondGraphic, sig.GraphicSuffix); string id = graphic.Substring(0, graphic.Length - 4); ; IconType iType = entity.Icon; string geometryType = GeometryIs(entity.GeometryType); string itemRootedPath = _configHelper.BuildRootedPath(graphicPath, graphic); string itemOriginalPath = _configHelper.BuildOriginalPath(graphicPath, graphic); if (!File.Exists(itemOriginalPath)) _notes = _notes + "image file does not exist;"; result = result + itemRootedPath; result = result + "," + Convert.ToString(_configHelper.PointSize); result = result + "," + id; result = result + "," + BuildEntityItemCategory(ss, iType, geometryType); result = result + "," + BuildEntityItemTags(sig, ss, symbol, entity, code); result = result + "," + id; result = result + "," + geometryType; result = result + "," + _notes; return result; }
public string Line(SymbolSet ss, SymbolSetLegacySymbol legacySymbol, LegacyEntityType legacyEntity, LegacyFunctionCodeType functionCode) { string result = ""; string sidcKey = _buildSIDCKey(ss, legacySymbol, functionCode); bool fullFrame = (legacyEntity.Icon == IconType.FULL_FRAME); string fullFrameOutput = fullFrame ? "TRUE" : ""; result = legacyEntity.Label; result = result + "," + sidcKey; result = result + "," + sidcKey; result = result + ","; result = result + ","; result = result + ","; result = result + "," + fullFrameOutput; result = result + "," + "Point"; // TODO : Handle this through a modernized form of GeometryIt result = result + ","; result = result + ","; result = result + ","; return result; }
protected string BuildEntityItemTags(LibraryStandardIdentityGroup sig, SymbolSet ss, SymbolSetLegacySymbol symbol, LegacyEntityType entity, LegacyFunctionCodeType code) { // Builds a list of seperated tag strings from information derived from the specified objects. // TODO: Normalize with similar code found in the preceding function. string result = ""; string graphic = ""; string name = entity.Label.Replace(',', '-'); // Add the type of geometry string geometry = _geometryList[(int)entity.GeometryType]; if (entity.Icon == IconType.FULL_FRAME) { if (sig != null) { graphic = GrabGraphic(entity.CloverGraphic, entity.RectangleGraphic, entity.SquareGraphic, entity.DiamondGraphic, sig.GraphicSuffix); } _notes = _notes + "icon touches frame;"; } else graphic = entity.Graphic; // Create the unique ID string id = graphic.Substring(0, graphic.Length - 4); // Grab any custom XML tags that might exist string[] xmlTags = entity.Tags; // Now build the string result = ss.Label.Replace(',', '-'); result = result + ";" + name; // If there is a standard identity group, add it if (sig != null) { result = result + ";" + sig.Label; } // Add any custom XML or export tags that might exist result = _configHelper.AddCustomTags(result, id, xmlTags); // Add the 15 character SIDC for the symbol result = result + ";" + symbol.Label; // Add the entity's type result = result + ";" + Convert.ToString(entity.Icon); // Add the three most important pieces of information result = result + ";" + geometry; result = result + ";" + name; result = result + ";" + id; if (result.Length > 255) { // Can't have a tag string greater than 255 in length. // Human interaction will be required to resolve these on a case by case basis. _notes = _notes + "styleItemTags > 255;"; } return result; }