public override object Clone() { ShowList showList = new ShowList(); foreach (Show show in this) { showList.Add(show); } return(showList); }
private UserData ReadDataFile(Stream stream) { XmlDataReader reader = new XmlDataReader(stream); UserData userData = (UserData)reader.ReadObject(UserElement, UserData.CtorDataReader); fSettings = userData.Settings; fShowList = userData.ShowList; return(userData); }
public void SaveShowList(ShowList showList) { Stream stream = OpenDataFile(); try { UserData userData = ReadDataFile(stream); userData.ShowList.Clear(); userData.ShowList.AddRange(showList); WriteDataFile(stream, userData); } finally { stream.Close(); } }
public void ReadFrom(DataReader reader) { fSettings = (Settings)reader.ReadObject("Settings", Settings.CtorDataReader); fShowList = (ShowList)reader.ReadList("Show", ShowList.Ctor, Show.CtorDataReader); }