/// <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; } }
/// <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; } } }
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); } } }
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); } } }
/// <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; } }