Esempio n. 1
0
		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 "Use Filter":
                    m_useFilter = Parser.ParseInt(value, line);
                    break;

				case "RPC Curve Entry":
					RpcCurveEntry entry = new RpcCurveEntry();
					entry.Parse( source, ref line, OwnerProject );

					RpcCurve curve = OwnerProject.m_globalSettings.m_rpcs[entry.m_rpcIndex].m_rpcCurves[entry.m_curveIndex];
					m_rpcCurves.Add( curve );
					break;

				case "Clip Entry":
					throw new NotImplementedException( "Clip Entries don't exist?" );
					 
				case "Play Wave Event":
					PlayWaveEvent playWave = new PlayWaveEvent();
					playWave.Parse( source, ref line, OwnerProject );
					m_events.Add( playWave );
					break;

				case "Play Sound Event":
					PlaySoundEvent playSound = new PlaySoundEvent();
					playSound.Parse( source, ref line, OwnerProject );
					m_events.Add( playSound );
					break;

				case "Stop Event":
					StopEvent stop = new StopEvent();
					stop.Parse( source, ref line, OwnerProject );
					m_events.Add( stop );
					break;

				case "Branch Event":	// Docs say "not supported", but I'm not sure that's true?
					BranchEvent branch = new BranchEvent();
					branch.Parse( source, ref line, OwnerProject );
					m_events.Add( branch );
					break;
					
				case "Wait Event":
					WaitEvent wait = new WaitEvent();
					wait.Parse( source, ref line, OwnerProject );
					m_events.Add( wait );
					break;

				case "Set Effect Parameter":
					SetEffectParameterEvent effectParam = new SetEffectParameterEvent();
					effectParam.Parse( source, ref line, OwnerProject );
					m_events.Add( effectParam );
					break;

				case "Set Variable Event":
					SetVariableEvent variable = new SetVariableEvent();
					variable.Parse( source, ref line, OwnerProject );
					m_events.Add( variable );
					break;

				case "Set Pitch Event":
					SetPitchEvent pitch = new SetPitchEvent();
					pitch.Parse( source, ref line, OwnerProject );
					m_events.Add( pitch );
					break;

				case "Set Volume Event":
					SetVolumeEvent volume = new SetVolumeEvent();
					volume.Parse( source, ref line, OwnerProject );
					m_events.Add( volume );
					break;

				case "Marker Event":
					MarkerEvent marker = new MarkerEvent();
					marker.Parse( source, ref line, OwnerProject );
					m_events.Add( marker );
					break;

					// These are all obsolete?
				case "Play Wave From Offset Event":
				case "Play Wave Variation Event":
				case "Set Variable Recurring Event":
				case "Set Marker Recurring Event":
				default:
					return false;
			}

			return true;
		}
Esempio n. 2
0
        public override bool SetProperty(string propertyName, string value, string[] source, ref int line)
        {
            switch (propertyName)
            {
            case "Volume":
                m_volume = Parser.ParseInt(value, line);
                break;

            case "Use Filter":
                m_useFilter = Parser.ParseInt(value, line);
                break;

            case "RPC Curve Entry":
                RpcCurveEntry entry = new RpcCurveEntry();
                entry.Parse(source, ref line, OwnerProject);

                RpcCurve curve = OwnerProject.m_globalSettings.m_rpcs[entry.m_rpcIndex].m_rpcCurves[entry.m_curveIndex];
                m_rpcCurves.Add(curve);
                break;

            case "Clip Entry":
                throw new NotImplementedException("Clip Entries don't exist?");

            case "Play Wave Event":
                PlayWaveEvent playWave = new PlayWaveEvent();
                playWave.Parse(source, ref line, OwnerProject);
                m_events.Add(playWave);
                break;

            case "Play Sound Event":
                PlaySoundEvent playSound = new PlaySoundEvent();
                playSound.Parse(source, ref line, OwnerProject);
                m_events.Add(playSound);
                break;

            case "Stop Event":
                StopEvent stop = new StopEvent();
                stop.Parse(source, ref line, OwnerProject);
                m_events.Add(stop);
                break;

            case "Branch Event":                        // Docs say "not supported", but I'm not sure that's true?
                BranchEvent branch = new BranchEvent();
                branch.Parse(source, ref line, OwnerProject);
                m_events.Add(branch);
                break;

            case "Wait Event":
                WaitEvent wait = new WaitEvent();
                wait.Parse(source, ref line, OwnerProject);
                m_events.Add(wait);
                break;

            case "Set Effect Parameter":
                SetEffectParameterEvent effectParam = new SetEffectParameterEvent();
                effectParam.Parse(source, ref line, OwnerProject);
                m_events.Add(effectParam);
                break;

            case "Set Variable Event":
                SetVariableEvent variable = new SetVariableEvent();
                variable.Parse(source, ref line, OwnerProject);
                m_events.Add(variable);
                break;

            case "Set Pitch Event":
                SetPitchEvent pitch = new SetPitchEvent();
                pitch.Parse(source, ref line, OwnerProject);
                m_events.Add(pitch);
                break;

            case "Set Volume Event":
                SetVolumeEvent volume = new SetVolumeEvent();
                volume.Parse(source, ref line, OwnerProject);
                m_events.Add(volume);
                break;

            case "Marker Event":
                MarkerEvent marker = new MarkerEvent();
                marker.Parse(source, ref line, OwnerProject);
                m_events.Add(marker);
                break;

            // These are all obsolete?
            case "Play Wave From Offset Event":
            case "Play Wave Variation Event":
            case "Set Variable Recurring Event":
            case "Set Marker Recurring Event":
            default:
                return(false);
            }

            return(true);
        }