Ejemplo n.º 1
0
    public override string ToString()
    {
        string result = "";

        result += m_cSymbol;

        if (m_listParams.Count == 0)
        {
            return(result);
        }

        result += "(";

        if (m_cSymbol.Equals("%"))  //存在Mesh名替换的情况
        {
            for (int i = 0; i < m_listParams.Count; i++)
            {
                //判断是否为数字,如果为数字则判断时候需要替换
                string MeshName = StringValidate.IsNumeric(m_listParams[i]) ? MeshResource.GetInstance().GetNameOf(Convert.ToInt32(m_listParams[i])) : m_listParams[i];

                if (i != 0)
                {
                    result += ",";
                }

                if (MeshName != null)
                {
                    result += MeshName;
                }
                else
                {
                    result += m_listParams[i];
                }
            }
        }
        else
        {
            for (int i = 0; i < m_listParams.Count; i++)
            {
                if (i != 0)
                {
                    result += ",";
                }
                result += m_listParams[i];
            }
        }


        result += ")";
        return(result);
    }