コード例 #1
0
ファイル: COrganizerEntries.cs プロジェクト: yjrui/coffeebean
 internal void DeleteEntry(COrganizerEntry entry, int index)
 {
     entry.MedOrganizerItem.Delete();
     (base.Parent as COrganizer).EmptyListsToPush[index].AddLast(entry.MedOrganizerItem);
     for (int i = 0; i < (base.Parent as COrganizer).MedOrganizers[index].StreamCount; i++)
     {
         IOrganizerItem organizerItem = (base.Parent as COrganizer).MedOrganizers[index].GetStream(i + 1) as IOrganizerItem;
         organizerItem.GetType();
     }
     this.Remove(entry);
 }
コード例 #2
0
ファイル: COrganizerEntries.cs プロジェクト: yjrui/coffeebean
        public override CEntry CreateEntry()
        {
            if (this.ReadOnly)
            {
                return(null);
            }
            if ((base.Parent as COrganizer).EmptyLists[this.Index].Count != 0)
            {
                COrganizerEntry cOrganizerEntry = new COrganizerEntry(this, (base.Parent as COrganizer).EmptyLists[this.Index].Last.Value, this.EntryDescriptor);
                (base.Parent as COrganizer).EmptyLists[this.Index].RemoveLast();
                base.AddLast(cOrganizerEntry);
                return(cOrganizerEntry);
            }
            if ((base.Parent as COrganizer).EmptyListsToPush[this.Index].Count != 0)
            {
                COrganizerEntry cOrganizerEntry2 = new COrganizerEntry(this, (base.Parent as COrganizer).EmptyListsToPush[this.Index].Last.Value, this.EntryDescriptor);
                (base.Parent as COrganizer).EmptyListsToPush[this.Index].RemoveLast();
                base.AddLast(cOrganizerEntry2);
                return(cOrganizerEntry2);
            }
            if (!this.Growable)
            {
                return(null);
            }
            IOrganizerItem medOrganizerItem;

            try
            {
                medOrganizerItem = (this.MedOrganizer.AddStream() as IOrganizerItem);
            }
            catch (Exception)
            {
                return(null);
            }
            COrganizerEntry cOrganizerEntry3 = new COrganizerEntry(this, medOrganizerItem, this.EntryDescriptor);

            base.AddLast(cOrganizerEntry3);
            return(cOrganizerEntry3);
        }