public void SetSettings(XmlNode settings) { Splits.Clear(); XmlNodeList splitNodes = settings.SelectNodes(".//Splits/Split"); foreach (XmlNode splitNode in splitNodes) { string splitDescription = splitNode.InnerText; SplitName split = SteamWorldSplitSettings.GetSplitName(splitDescription); Splits.Add(split); } }
public void UpdateSplits() { if (isLoading) { return; } Splits.Clear(); for (int i = flowMain.Controls.Count - 1; i >= 0; i--) { Control c = flowMain.Controls[i]; if (c is SteamWorldSplitSettings) { SteamWorldSplitSettings setting = (SteamWorldSplitSettings)c; if (!string.IsNullOrEmpty(setting.cboName.Text)) { SplitName split = SteamWorldSplitSettings.GetSplitName(setting.cboName.Text); Splits.Insert(0, split); } SetSplitDescription(setting, i - 1); } } }