public override bool SetProperty( string propertyName, string value, string[] source, ref int line ) { switch ( propertyName ) { case "Name": m_name = value; break; case "Comment": m_comment = Parser.ParseComment( value, source, ref line ); break; case "Variable Entry": VariableEntry entry = new VariableEntry(); entry.Parse( source, ref line, OwnerProject ); m_variables.Add( entry.FindVariable() ); break; case "RPC Curve": RpcCurve curve = new RpcCurve(); curve.Parse( source, ref line, OwnerProject ); m_rpcCurves.Add( curve ); m_variables.Add( curve.m_variable.FindVariable() ); break; case "Effect Entry": m_effectEntry = new EffectEntry(); m_effectEntry.Parse( source, ref line, OwnerProject ); // XXX what if you can have more than one? We'd need a List 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 "Comment": m_comment = Parser.ParseComment(value, source, ref line); break; case "Variable Entry": VariableEntry entry = new VariableEntry(); entry.Parse(source, ref line, OwnerProject); m_variables.Add(entry.FindVariable()); break; case "RPC Curve": RpcCurve curve = new RpcCurve(); curve.Parse(source, ref line, OwnerProject); m_rpcCurves.Add(curve); m_variables.Add(curve.m_variable.FindVariable()); break; case "Effect Entry": m_effectEntry = new EffectEntry(); m_effectEntry.Parse(source, ref line, OwnerProject); // XXX what if you can have more than one? We'd need a List 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; }
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); }