示例#1
0
        internal bool AddEntry(MRUEntry emp,
                               MRUList.Spot addInSpot = MRUList.Spot.Last)
        {
            if (emp == null)
            {
                return(false);
            }

            if (this.Entries == null)
            {
                this.Entries = new List <MRUEntry>();
            }

            switch (addInSpot)
            {
            case Spot.First:
                this.Entries.Insert(0, new MRUEntry(emp));
                return(true);

            case Spot.Last:
                this.Entries.Add(new MRUEntry(emp));
                return(true);

            default:
                throw new NotImplementedException(addInSpot.ToString());
            }
        }
示例#2
0
        /// <summary>
        /// Copy Constructor
        /// </summary>
        public MRUEntry(MRUEntry copyFrom)
        {
            if (copyFrom == null)
            {
                return;
            }

            this.PathFileName = copyFrom.PathFileName;
            this.IsPinned     = copyFrom.IsPinned;
        }
示例#3
0
        internal void AddPinedEntry(MRUEntry emp)
        {
            if (emp == null)
            {
                return;
            }

            if (this.Entries == null)
            {
                this.Entries = new List <MRUEntry>();
            }

            this.Entries.Add(new MRUEntry(emp));
        }