public string GetFirstSize(string parm) { if (parm == "") { return(""); } string[] sizearry = parm.Split(';'); FileSize newsize = null; if (sizearry[0] != "") { newsize = JSON.ToObject <FileSize>(sizearry[0]); } return("_" + newsize.width + "x" + newsize.height); }
public List <FileSize> GetSizeList(string parm) { if (parm == "") { return(null); } string[] sizearry = parm.Split(';'); List <FileSize> sizelist = new List <FileSize>(); foreach (string size in sizearry) { FileSize newsize = JSON.ToObject <FileSize>(size); sizelist.Add(newsize); } return(sizelist); }