예제 #1
0
        public override object Clone()
        {
            ShowList showList = new ShowList();

            foreach (Show show in this)
            {
                showList.Add(show);
            }
            return(showList);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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();
            }
        }
예제 #4
0
 public void ReadFrom(DataReader reader)
 {
     fSettings = (Settings)reader.ReadObject("Settings", Settings.CtorDataReader);
     fShowList = (ShowList)reader.ReadList("Show", ShowList.Ctor, Show.CtorDataReader);
 }