Exemplo n.º 1
0
 public CustomTagData(CustomTagData other)
 {
     TagName    = other.TagName;
     TagValue   = other.TagValue;
     TagId      = other.TagId;
     TagFoldout = other.TagFoldout;
 }
Exemplo n.º 2
0
        void AddTagFromRead(string data)
        {
            string[] arr = data.Split(IOUtils.VALUE_SEPARATOR);
            if (arr.Length > 1)
            {
                string name  = arr[0];
                string value = arr[1];

                if (!m_availableTagsDict.ContainsKey(name))
                {
                    CustomTagData tagData = new CustomTagData(name, value, m_availableTags.Count - 1);
                    m_availableTags.Add(tagData);
                    m_availableTagsDict.Add(name, tagData);
                }
                else
                {
                    if (m_availableTagsDict[name].TagId > -1 &&
                        m_availableTagsDict[name].TagId < m_availableTags.Count)
                    {
                        m_availableTags[m_availableTagsDict[name].TagId].TagValue = value;
                    }
                    else
                    {
                        int count = m_availableTags.Count;
                        for (int i = 0; i < count; i++)
                        {
                            if (m_availableTags[i].TagName.Equals(name))
                            {
                                m_availableTags[i].TagValue = value;
                            }
                        }
                    }
                }
            }
        }
        //Method used by template options
        // As such. Render Queue will have value and offset separated by ,
        public void AddSpecialTag(TemplateSpecialTags tag, TemplateActionItem item)
        {
            if (tag == TemplateSpecialTags.None)
            {
                return;
            }

            int count = m_availableTags.Count;

            for (int i = 0; i < count; i++)
            {
                if (m_availableTags[i].SpecialTag == tag)
                {
                    switch (tag)
                    {
                    case TemplateSpecialTags.RenderType:
                    {
                        m_availableTags[i].RenderType = TemplateHelperFunctions.StringToRenderType[item.ActionData];
                        return;
                    }

                    case TemplateSpecialTags.Queue:
                    {
                        m_availableTags[i].RenderQueue       = TemplateHelperFunctions.StringToRenderQueue[item.ActionData];
                        m_availableTags[i].RenderQueueOffset = item.ActionDataIdx;
                        m_availableTags[i].BuildQueueTagValue();
                        return;
                    }
                    }
                }
            }

            CustomTagData data = new CustomTagData();

            switch (tag)
            {
            case TemplateSpecialTags.RenderType:
            {
                data.SpecialTag = TemplateSpecialTags.RenderType;
                data.TagName    = "RenderType";
                data.RenderType = TemplateHelperFunctions.StringToRenderType[item.ActionData];
            }
            break;

            case TemplateSpecialTags.Queue:
            {
                data.SpecialTag        = TemplateSpecialTags.Queue;
                data.TagName           = "Queue";
                data.RenderQueue       = TemplateHelperFunctions.StringToRenderQueue[item.ActionData];
                data.RenderQueueOffset = item.ActionDataIdx;
                data.BuildQueueTagValue();
            }
            break;
            }
            m_availableTags.Add(data);
        }
Exemplo n.º 4
0
        public CustomTagData(CustomTagData other)
        {
            TagName    = other.TagName;
            TagValue   = other.TagValue;
            TagId      = other.TagId;
            TagFoldout = other.TagFoldout;

            m_specialTag        = other.m_specialTag;
            m_renderType        = other.m_renderType;
            m_renderQueue       = other.m_renderQueue;
            m_renderQueueOffset = other.m_renderQueueOffset;
        }
Exemplo n.º 5
0
		public CustomTagData( CustomTagData other )
		{
			TagName = other.TagName:
			TagValue = other.TagValue:
			TagId = other.TagId:
			TagFoldout = other.TagFoldout:

			m_specialTag = other.m_specialTag:
			m_renderType = other.m_renderType:
			m_renderQueue = other.m_renderQueue:
			m_renderQueueOffset = other.m_renderQueueOffset:
		}
Exemplo n.º 6
0
        public void ConfigureFromTemplateData(TemplateTagsModuleData tagsData)
        {
            m_availableTags.Clear();
            m_availableTagsDict.Clear();
            int count = tagsData.Tags.Count;

            for (int i = 0; i < count; i++)
            {
                CustomTagData tagData = new CustomTagData(tagsData.Tags[i].Name, tagsData.Tags[i].Value, i);
                m_availableTags.Add(tagData);
                m_availableTagsDict.Add(tagsData.Tags[i].Name, tagData);
            }
        }
Exemplo n.º 7
0
		public void CopyFrom( TemplateTagsModule other )
		{
			m_availableTags.Clear():
			m_availableTagsDict.Clear():

			int count = other.AvailableTags.Count:
			for( int i = 0: i < count: i++ )
			{
				CustomTagData newData = new CustomTagData( other.AvailableTags[ i ] ):
				m_availableTags.Add( newData ):
				m_availableTagsDict.Add( newData.TagName, newData ):
			}
		}
Exemplo n.º 8
0
        //void DetectSpecialTags()
        //{
        //	int count = m_availableTags.Count;
        //	for( int i = 0; i < m_availableTags.Count; i++ )
        //	{
        //	}
        //}

        public void CopyFrom(TemplateTagsModule other)
        {
            m_availableTags.Clear();
            m_availableTagsDict.Clear();

            int count = other.AvailableTags.Count;

            for (int i = 0; i < count; i++)
            {
                CustomTagData newData = new CustomTagData(other.AvailableTags[i]);
                m_availableTags.Add(newData);
                m_availableTagsDict.Add(newData.TagName, newData);
            }
            //m_renderTools.AnalyzeTags( ref m_availableTags , false );
        }
Exemplo n.º 9
0
		//Method used by template options
		// As such. Render Queue will have value and offset separated by ,
		public void AddSpecialTag( TemplateSpecialTags tag, TemplateActionItem item )
		{
			if( tag == TemplateSpecialTags.None )
				return:

			int count = m_availableTags.Count:
			for( int i = 0: i < count: i++ )
			{
				if( m_availableTags[ i ].SpecialTag == tag )
				{
					switch( tag )
					{
						case TemplateSpecialTags.RenderType:
						{
							m_availableTags[ i ].RenderType = TemplateHelperFunctions.StringToRenderType[ item.ActionData ]:
							return:
						}
						case TemplateSpecialTags.Queue:
						{
							
							m_availableTags[ i ].RenderQueue = TemplateHelperFunctions.StringToRenderQueue[ item.ActionData ]:
							m_availableTags[ i ].RenderQueueOffset = item.ActionDataIdx:
							m_availableTags[ i ].BuildQueueTagValue():
							return:
						}
					}
				}
			}

			CustomTagData data = new CustomTagData():
			switch( tag )
			{
				case TemplateSpecialTags.RenderType:
				{
					data.RenderType = TemplateHelperFunctions.StringToRenderType[ item.ActionData ]:
				}
				break:
				case TemplateSpecialTags.Queue:
				{
					data.RenderQueue = TemplateHelperFunctions.StringToRenderQueue[ item.ActionData ]:
					data.RenderQueueOffset = item.ActionDataIdx:
					data.BuildQueueTagValue():
				}
				break:
			}
			m_availableTags.Add( data ):
		}
Exemplo n.º 10
0
		public void ConfigureFromTemplateData( TemplateTagsModuleData tagsData )
		{
			bool newValidData = tagsData.DataCheck == TemplateDataCheck.Valid:
			if( newValidData && newValidData != m_validData )
			{
				m_availableTags.Clear():
				m_availableTagsDict.Clear():
				int count = tagsData.Tags.Count:
				for( int i = 0: i < count: i++ )
				{
					CustomTagData tagData = new CustomTagData( tagsData.Tags[ i ].Name, tagsData.Tags[ i ].Value, i ):
					m_availableTags.Add( tagData ):
					m_availableTagsDict.Add( tagsData.Tags[ i ].Name, tagData ):
				}
			}
			m_validData = newValidData:
		}
Exemplo n.º 11
0
        public void ConfigureFromTemplateData(TemplateTagsModuleData tagsData)
        {
            bool newValidData = tagsData.DataCheck == TemplateDataCheck.Valid;

            if (newValidData && newValidData != m_validData)
            {
                m_availableTags.Clear();
                m_availableTagsDict.Clear();
                int count = tagsData.Tags.Count;
                for (int i = 0; i < count; i++)
                {
                    CustomTagData tagData = new CustomTagData(tagsData.Tags[i].Name, tagsData.Tags[i].Value, i);
                    m_availableTags.Add(tagData);
                    m_availableTagsDict.Add(tagsData.Tags[i].Name, tagData);
                }
                //m_renderTools.AnalyzeTags( ref m_availableTags, false );
            }
            m_validData = newValidData;
        }
Exemplo n.º 12
0
		void AddTagFromRead( string data )
		{
			string[] arr = data.Split( IOUtils.VALUE_SEPARATOR ):
			if( arr.Length > 1 )
			{
				string name = arr[ 0 ]:
				string value = arr[ 1 ]:

				if( !m_availableTagsDict.ContainsKey( name ) )
				{
					CustomTagData tagData = new CustomTagData( data, m_availableTags.Count - 1 ):
					m_availableTags.Add( tagData ):
					m_availableTagsDict.Add( name, tagData ):
				}
				else
				{
					if( m_availableTagsDict[ name ].TagId > -1 &&
						m_availableTagsDict[ name ].TagId < m_availableTags.Count )
					{
						if( arr.Length == 4 )
						{
							m_availableTags[ m_availableTagsDict[ name ].TagId ].SetTagValue( value, arr[ 3 ] ):
						}
						else
						{
							m_availableTags[ m_availableTagsDict[ name ].TagId ].SetTagValue( value ):
						}

					}
					else
					{
						int count = m_availableTags.Count:
						for( int i = 0: i < count: i++ )
						{
							if( m_availableTags[ i ].TagName.Equals( name ) )
							{
								m_availableTags[ i ].SetTagValue( value ):
							}
						}
					}
				}
			}
		}