Пример #1
0
        string GetTPFormatString(TPFormat format)
        {
            string result = ".png";

            switch (format)
            {
            case TPFormat.PNG:
            {
                result = ".png";
                break;
            }

            case TPFormat.PVR:
            {
                result = ".pvr";
                break;
            }

            case TPFormat.PVRCCZ:
            {
                result = ".pvr.ccz";
                break;
            }

            case TPFormat.PLIST:
            {
                result = ".plist";
                break;
            }
            }
            return(result);
        }
Пример #2
0
        string GetFormatName(string name, TPFormat format)
        {
            string resultFormat = GetTPFormatString(format);

            if (name.Contains(".png"))
            {
                return(name.Replace(".png", resultFormat));
            }
            return(name + resultFormat);
        }
Пример #3
0
 string GetTPFormatString(TPFormat format)
 {
     string result = ".png";
     switch (format)
     {
         case TPFormat.PNG:
             {
                 result = ".png";
                 break;
             }
         case TPFormat.PVR:
             {
                 result = ".pvr";
                 break;
             }
         case TPFormat.PVRCCZ:
             {
                 result = ".pvr.ccz";
                 break;
             }
         case TPFormat.PLIST:
             {
                 result = ".plist";
                 break;
             }
     }
     return result;
 }
Пример #4
0
 string GetFormatName(string name, TPFormat format)
 {
     string resultFormat = GetTPFormatString(format);
     if (name.Contains(".png"))
     {
         return name.Replace(".png", resultFormat);
     }
     return name + resultFormat;
    
 }