internal void AddMap(string mapFileName, string fontFileName) { CharacterSet characterSet = findExistingCharsetByFileName(fontFileName); if (characterSet == null) { characterSet = CharacterSet.CreateFromFileName(fontFileName); AddCharSet(characterSet, false); } AddMap(MapDeserializer.Load(this, Path, mapFileName, characterSet)); }
public void Load(String fileName) { Clear(false); Path = fileName; XElement xml = XElement.Load(fileName); foreach (XElement node in xml.Elements("font")) { AddCharSet(CharacterSet.Load(this, node), false); } foreach (XElement node in xml.Elements("include")) { AddInclude(node.Value, false); } foreach (XElement node in xml.Elements("map")) { Map loadedMap = MapDeserializer.Load(this, node); AddMap(loadedMap, false); CharacterSet characterSet = CharSets.FirstOrDefault(set => set.UID == loadedMap.FontID); if (characterSet == null) { MessageBox.Show("Unknown font: " + loadedMap.FontID); } } IsNew = false; IsDirty = false; StrutureTreeChanged?.Invoke(this, null); }