public override bool SetProperty( string propertyName, string value, string[] source, ref int line ) { switch ( propertyName ) { case "Name": m_name = value; break; case "Volume": m_volume = Parser.ParseInt( value, line ); break; case "Pitch": m_pitch = Parser.ParseInt( value, line ); break; case "Priority": m_priority = Parser.ParseInt( value, line ); break; case "Category Entry": // Docs appear to be wrong about how this is arranged CategoryEntry entry = new CategoryEntry(); entry.Parse( source, ref line, OwnerProject ); m_category = entry.FindCategory(); break; case "Effect Entry": EffectEntry effectEntry = new EffectEntry(); effectEntry.Parse( source, ref line, OwnerProject ); foreach ( Effect effect in OwnerProject.m_globalSettings.m_effects ) { if ( effect.m_name == effectEntry.m_name ) { m_effects.Add( effect ); break; } } break; case "RPC Entry": RpcEntry rpcEntry = new RpcEntry(); rpcEntry.Parse( source, ref line, OwnerProject ); m_rpcEntries.Add( rpcEntry ); break; case "Track": Track track = new Track(); track.Parse( source, ref line, OwnerProject ); m_tracks.Add( track ); break; case "Comment": m_comment = Parser.ParseComment( value, source, ref line ); break; default: return false; } return true; }
public override bool SetProperty(string propertyName, string value, string[] source, ref int line) { switch (propertyName) { case "Name": m_name = value; break; case "Volume": m_volume = Parser.ParseInt(value, line); break; case "Pitch": m_pitch = Parser.ParseInt(value, line); break; case "Priority": m_priority = Parser.ParseInt(value, line); break; case "Category Entry": // Docs appear to be wrong about how this is arranged CategoryEntry entry = new CategoryEntry(); entry.Parse(source, ref line, OwnerProject); m_category = entry.FindCategory(); break; case "Effect Entry": EffectEntry effectEntry = new EffectEntry(); effectEntry.Parse(source, ref line, OwnerProject); foreach (Effect effect in OwnerProject.m_globalSettings.m_effects) { if (effect.m_name == effectEntry.m_name) { m_effects.Add(effect); break; } } break; case "RPC Entry": RpcEntry rpcEntry = new RpcEntry(); rpcEntry.Parse(source, ref line, OwnerProject); m_rpcEntries.Add(rpcEntry); break; case "Track": Track track = new Track(); track.Parse(source, ref line, OwnerProject); m_tracks.Add(track); break; case "Comment": m_comment = Parser.ParseComment(value, source, ref line); break; default: return(false); } return(true); }