예제 #1
0
        public static int ResourceBaseParse(ResourceBase resourceBase, string[] strSplit, int strCnt)
        {
            int count = 0;

            resourceBase.UniqueID = Convert.ToUInt64(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++;

            resourceBase.Admin = new UserBase(Convert.ToUInt64(strSplit[strCnt] == null ? "0" : strSplit[strCnt])); strCnt++;

            strCnt = ResourceDescription.Parse(resourceBase.ResourceDescription, strSplit, strCnt);

            resourceBase.ResourcePriority = (EResourcePriority)Convert.ToInt32(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++;

            resourceBase.MaxHoldings = Convert.ToInt32(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++;

            count = Convert.ToInt32(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++;
            for (int i = 0; i < count; i++)
            {
                if (strSplit[strCnt] == null)
                {
                    break;
                }
                resourceBase.HoldingsInfo.Add(new HoldingsInfo(Convert.ToUInt64(strSplit[strCnt]))); strCnt++;
            }

            resourceBase.Scalable = Convert.ToBoolean(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++;

            resourceBase.Value = Convert.ToInt32(strSplit[strCnt] == null ? "0" : strSplit[strCnt]); strCnt++;

            strCnt = NameImage.Parse(resourceBase.ThumbNameImage, strSplit, strCnt);

            strCnt = NameImage.Parse(resourceBase.FullNameImage, strSplit, strCnt);

            return(strCnt);
        }
예제 #2
0
 public ResourceNote(UInt64 uniqueID, UserBase noteWriter, string note, DateTime?entryDate, ResourceBase resourceBase)
     : base(uniqueID)
 {
     mNoteWriter   = noteWriter;
     mResourceBase = resourceBase;
     mNote         = note;
     mEntryDate    = entryDate;
 }
예제 #3
0
 public ResourceImage(UInt64 uniqueID, UserBase imageOwner, string imageLocation, DateTime?entryDate, ResourceBase resourceBase)
     : base(uniqueID)
 {
     mResourceBase  = resourceBase;
     mImageOwner    = imageOwner;
     mImageLocation = imageLocation;
     mEntryDate     = entryDate;
 }
예제 #4
0
        // Exceptions:
        //	System.ArgumentException:
        //		Other object is null
        //		The argument to compare is not a UserBase
        //		Refering object (this) is null
        public override int CompareTo(object other)
        {
            if (other == null)
            {
                throw new System.ArgumentException("Other object is null", "other");
            }

            ResourceBase resourceBase = other as ResourceBase;

            if (resourceBase == null)
            {
                throw new System.ArgumentException("The argument to compare is not a resourceBase", "other");
            }

            if (IsNull)// || (!IsLoaded()))
            {
                throw new System.ArgumentException("Refering object (this) is null", "this");
            }

            return(this.ToString().CompareTo(resourceBase.ToString()));
        }
예제 #5
0
 public ResourceNote(UInt64 uniqueID)
     : base(uniqueID)
 {
     mNoteWriter   = new UserBase();
     mResourceBase = new ResourceBase();
 }
예제 #6
0
 public ResourceNote()
 {
     mNoteWriter   = new UserBase();
     mResourceBase = new ResourceBase();
 }
예제 #7
0
 public ResourceImage(UInt64 uniqueID)
     : base(uniqueID)
 {
     mResourceBase = new ResourceBase();
     mImageOwner   = new UserBase();
 }
예제 #8
0
 public ResourceImage()
 {
     mResourceBase = new ResourceBase();
     mImageOwner   = new UserBase();
 }