コード例 #1
0
 /// <include file='doc\MobileListItemCollection.uex' path='docs/doc[@for="MobileListItemCollection.Add"]/*' />
 public void Add(MobileListItem item)
 {
     item.SetIndex(Items.Count + BaseIndex);
     Items.Add(item);
     if (_marked)
     {
         item.Dirty = true;
     }
 }
コード例 #2
0
        /// <include file='doc\MobileListItemCollection.uex' path='docs/doc[@for="MobileListItemCollection.SetAll"]/*' />
        public void SetAll(MobileListItem[] value)
        {
            Items = new ArrayList(value);
            if (_marked)
            {
                _saveAll = true;
            }

            int count = Count;

            for (int i = 0; i < count; i++)
            {
                MobileListItem item = this[i];
                item.SetIndex(i + BaseIndex);
                if (_marked)
                {
                    item.Dirty = true;
                }
            }
        }
コード例 #3
0
        private void EnsureCount(int count)
        {
            int diff = Count - count;

            if (diff > 0)
            {
                Items.RemoveRange(count, diff);
                if (_marked)
                {
                    _saveAll = true;
                }
            }
            else
            {
                for (int i = Count; i < count; i++)
                {
                    MobileListItem item = new MobileListItem();
                    item.SetIndex(i + BaseIndex);
                    Add(item);
                }
            }
        }
コード例 #4
0
 private void EnsureCount(int count)
 {
     int diff = Count - count;
     if (diff > 0)
     {
         Items.RemoveRange (count, diff);
         if (_marked)
         {
             _saveAll = true;
         }
     }
     else
     {
         for (int i = Count; i < count; i++)
         {
             MobileListItem item = new MobileListItem ();
             item.SetIndex(i + BaseIndex);
             Add (item);
         }
     }
 }
コード例 #5
0
 /// <include file='doc\MobileListItemCollection.uex' path='docs/doc[@for="MobileListItemCollection.Add"]/*' />
 public void Add(MobileListItem item)
 {
     item.SetIndex(Items.Count + BaseIndex);
     Items.Add (item);
     if (_marked)
     {
         item.Dirty = true;
     }
 }