public static Collection<Set> GetSets() { Collection<Set> sets = new Collection<Set>(); Set set = null; XmlNode node = null; XmlDocument xmlDocument = null; try { xmlDocument = Program.SetsXmlDocument; if (xmlDocument != null) { node = xmlDocument.DocumentElement.FirstChild; while (node != null) { set = new Set(); set.Node = node; sets.Add(set); node = node.NextSibling; } } } catch (Exception ex) { MessageBox.Show(ex.ToString(), Configurations.ApplicationName); } return sets; }
private void loadSet(Set set) { txtName.Text = set.Name; txtImageFolder.Text = set.ImageFolder; tbrImageSpeed.Value = set.ImageSpeed; chkImageRandom.Checked = set.ImageRandom; txtMessages.Lines = set.Messages; tbrMessageSpeed.Value = set.MessageSpeed; nudFontSize.Value = set.MessageSize; btnMessageColour.BackColor = set.MessageColor; chkMessageRandom.Checked = set.MessageRandom; chkMessageRandomPosition.Checked = set.MessageRandomPosition; }