ArrayList items;
bool tracking;
bool dirty;
- bool itemsEnabled;
int lastDirty = 0;
#endregion // Fields
}
#endregion // Public Constructors
- internal bool ItemsEnabled {
- get { return itemsEnabled; }
- set { itemsEnabled = value; }
- }
-
#region Public Instance Properties
public int Capacity {
get {
}
}
- void IStateManager.LoadViewState (object savedState) {
+ void IStateManager.LoadViewState (object savedState)
+ {
Pair pair = savedState as Pair;
if (pair == null)
return;
bool newCollection = (bool) pair.First;
object [] itemsArray = (object []) pair.Second;
- int count = itemsArray==null ? 0 : itemsArray.Length;
+ int count = itemsArray==null ? 0 : itemsArray.Length;
- if (newCollection)
- if (count > 0)
- items = new ArrayList(count);
- else
- items = new ArrayList();
+ if (newCollection)
+ if (count > 0)
+ items = new ArrayList(count);
+ else
+ items = new ArrayList();
for (int i = 0; i < count; i++) {
ListItem item = new ListItem ();
object [] itemsState = null;
if (count > 0)
itemsState = new object [count];
-#if NET_2_0
- ListItem li;
- bool enabled = ItemsEnabled;
-#endif
+
for (int i = 0; i < count; i++) {
-#if NET_2_0
- li = items [i] as ListItem;
- if (li != null && li.Enabled != enabled)
- li.Enabled = enabled;
-#endif
-
itemsState [i] = ((IStateManager) items [i]).SaveViewState ();
if (itemsState [i] != null)
itemsDirty = true;