private static void AppendDuplicate(ref string name, ref List <string> usedNames) { if (!usedNames.Contains(name)) { return; } int num = 1; string str; for (str = string.Format("{0} {1}", (object)name, (object)NamesPool.ToRomanNumeral(num)); usedNames.Contains(str); str = string.Format("{0} {1}", (object)name, (object)NamesPool.ToRomanNumeral(num))) { ++num; } usedNames.Add(str); name = str; }
private void GetNewSystemNameList() { XmlDocument document = new XmlDocument(); document.Load(ScriptHost.FileSystem, this._lastFileName); XmlElement documentElement = document.DocumentElement; NamesPool.SystemNames.Clear(); NamesPool.SystemNames = XmlHelper.GetDataCollection <string>(documentElement, "SystemNames", "string"); for (int index1 = 0; index1 < NamesPool.SystemNames.Count; ++index1) { List <string> systemNames; int index2; (systemNames = NamesPool.SystemNames)[index2 = index1] = systemNames[index2] + " " + NamesPool.ToRomanNumeral(this.planetIteration); } }