コード例 #1
0
 public void load(xElement element)
 {
     if (element == null)
     {
         throw new ArgumentNullException("element");
     }
     loadFields(element.Elements("field"));
     loadEntries(element.Elements("entry"));
 }
コード例 #2
0
ファイル: whap.cs プロジェクト: impiaaa/flaaffy
        WaveGroup LoadWaveGroup(xElement xwavegroup)
        {
            var waveGroup = new WaveGroup();

            var xarchive = xwavegroup.Attribute(cWaveArchive);

            if (xarchive == null)
            {
                mareep.WriteWarning("XML: line #{0}: missing archive attribute\n", xwavegroup.LineNumber);
                return(null);
            }

            waveGroup.ArchiveFileName = xarchive.Value;

            foreach (var xwave in xwavegroup.Elements(cWave))
            {
                var wave = LoadWave(xwave);

                if (wave != null)
                {
                    waveGroup.Add(wave);
                }
            }

            return(waveGroup);
        }
コード例 #3
0
ファイル: whap.cs プロジェクト: impiaaa/flaaffy
        WaveBank LoadWaveBank(xElement xwavebank)
        {
            var waveBank = new WaveBank();

            var xname = xwavebank.Attribute("name");

            if (xname == null)
            {
                waveBank.Name = mName;
            }
            else
            {
                waveBank.Name = xname.Value;
            }

            foreach (var xwavegroup in xwavebank.Elements(cWaveGroup))
            {
                var waveGroup = LoadWaveGroup(xwavegroup);

                if (waveGroup != null)
                {
                    waveBank.Add(waveGroup);
                }
            }

            return(waveBank);
        }
コード例 #4
0
        WaveBank LoadWaveBank(xElement xwavebank)
        {
            var waveBank = new WaveBank();

            foreach (var xwavegroup in xwavebank.Elements(cWaveGroup))
            {
                var waveGroup = LoadWaveGroup(xwavegroup);

                if (waveGroup != null)
                {
                    waveBank.Add(waveGroup);
                }
            }

            return(waveBank);
        }