3 // Permission is hereby granted, free of charge, to any person obtaining
4 // a copy of this software and associated documentation files (the
5 // "Software"), to deal in the Software without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Software, and to
8 // permit persons to whom the Software is furnished to do so, subject to
9 // the following conditions:
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 * Namespace : System.Web.UI.MobileControls
25 * Class : MobileListItemCollection
26 * Author : Gaurav Vaish
28 * Copyright : 2003 with Gaurav Vaish, and with
33 using System
.Collections
;
36 namespace System
.Web
.UI
.MobileControls
38 public class MobileListItemCollection
: ArrayListCollectionBase
,
41 private int baseIndex
= 0;
43 private bool marked
= false;
44 private bool saveAll
= false;
45 private bool saveSel
= false;
47 public MobileListItemCollection()
51 public MobileListItemCollection(ArrayList items
) : base(items
)
55 void IStateManager
.LoadViewState(object state
)
57 throw new NotImplementedException();
60 object IStateManager
.SaveViewState()
62 throw new NotImplementedException();
65 void IStateManager
.TrackViewState()
68 throw new NotImplementedException();
71 bool IStateManager
.IsTrackingViewState
79 public void Add(string item
)
81 Add(new MobileListItem(item
));
84 public void Add(MobileListItem item
)
86 throw new NotImplementedException();
89 public MobileListItem
this[int index
]
93 return (MobileListItem
)base.Items
[index
];
104 public bool Contains(MobileListItem item
)
106 return Items
.Contains(item
);
109 public MobileListItem
[] GetAll()
111 MobileListItem
[] retVal
= new MobileListItem
[Items
.Count
];
113 Items
.CopyTo(0, retVal
, 0, Items
.Count
);
117 public int IndexOf(MobileListItem item
)
119 return Items
.IndexOf(item
);
122 public virtual void Insert(int index
, string item
)
124 Insert(index
, new MobileListItem(item
));
127 public void Insert(int index
, MobileListItem item
)
129 Items
.Insert(index
, item
);
130 throw new NotImplementedException();
133 public void Remove(string item
)
135 RemoveAt(IndexOf(new MobileListItem(item
)));
138 public void Remove(MobileListItem item
)
140 RemoveAt(IndexOf(item
));
143 public void RemoveAt(int index
)
147 Items
.RemoveAt(index
);
148 throw new NotImplementedException();
152 public void SetAll(MobileListItem
[] items
)
154 throw new NotImplementedException();
161 return this.baseIndex
;
165 this.baseIndex
= value;
169 public bool SaveSelection
177 this.saveSel
= value;