示例#1
0
        public static SkillList Load(string Filename)
        {
            SkillList skills;

            using (System.IO.FileStream fs = System.IO.File.OpenRead(Filename))
                skills = SkillList.Load(fs);

            return(skills);
        }
示例#2
0
		public static SkillList Load( System.IO.Stream s ) {
			SkillList skills;
			XmlSerializer xml = new XmlSerializer( typeof( SkillList ) );
			try {
				skills = xml.Deserialize( s ) as SkillList;
			} catch( Exception e ) {
				System.Diagnostics.Debug.WriteLine( e );
				skills = new SkillList();
			}

			return skills;
		}
示例#3
0
        public static SkillList Load(System.IO.Stream s)
        {
            SkillList     skills;
            XmlSerializer xml = new XmlSerializer(typeof(SkillList));

            try {
                skills = xml.Deserialize(s) as SkillList;
            } catch (Exception e) {
                System.Diagnostics.Debug.WriteLine(e);
                skills = new SkillList();
            }

            return(skills);
        }