Пример #1
0
        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 "Variation":
                m_variation = new Variation();
                m_variation.Parse(source, ref line, OwnerProject);
                break;

            case "Sound Entry":
                SoundEntry entry = new SoundEntry();
                entry.Parse(source, ref line, OwnerProject);
                m_soundEntries.Add(entry);
                break;

            case "Instance Limit":
                m_instanceLimit = new InstanceLimit();
                m_instanceLimit.Parse(source, ref line, OwnerProject);
                break;

            case "Transition Entry":                     // Docs say "Transition"
                TransitionEntry transitionEntry = new TransitionEntry();
                transitionEntry.Parse(source, ref line, OwnerProject);
                m_transitionEntries.Add(transitionEntry);
                break;

            default:
                return(false);
            }

            return(true);
        }
Пример #2
0
		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 "Variation":
					m_variation = new Variation();
					m_variation.Parse( source, ref line, OwnerProject );
					break;

				case "Sound Entry":
					SoundEntry entry = new SoundEntry();
					entry.Parse( source, ref line, OwnerProject );
					m_soundEntries.Add( entry );
					break;

				case "Instance Limit":
					m_instanceLimit = new InstanceLimit();
					m_instanceLimit.Parse( source, ref line, OwnerProject );
					break;

				case "Transition Entry": // Docs say "Transition"
					TransitionEntry transitionEntry = new TransitionEntry();
					transitionEntry.Parse( source, ref line, OwnerProject );
					m_transitionEntries.Add( transitionEntry );
					break;

				default:
					return false;
			}

			return true;
		}