public Resource(string fullPath, string rootPath) { this.fullPath = fullPath; relatePath = GetRelatePath(rootPath, fullPath); relateFolder = GetRelateFolder(relatePath); byteNum = GetByteNum(); index = 0; resourceType = GetResourceType(); resourceOrder = GetResourceOrderType(); }
public Resource(string strData) { if (string.IsNullOrEmpty(strData)) { return; } string[] strArr = strData.Split('#'); if (strArr.Length < 3) { return; } if (strArr.Length >= 3) { relatePath = strArr[0]; byteNum = int.Parse(strArr[1]); index = int.Parse(strArr[2]); resourceType = GetResourceType(); resourceOrder = GetResourceOrderType(); } }