Beispiel #1
0
 public Resource(string fullPath, string rootPath)
 {
     this.fullPath = fullPath;
     relatePath    = GetRelatePath(rootPath, fullPath);
     relateFolder  = GetRelateFolder(relatePath);
     byteNum       = GetByteNum();
     index         = 0;
     resourceType  = GetResourceType();
     resourceOrder = GetResourceOrderType();
 }
Beispiel #2
0
        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();
            }
        }