2 using System.Collections;
\r
4 namespace Mainsoft.Drawing.Imaging
\r
7 /// Summary description for PlainImageCollection.
\r
9 public class PlainImageCollection : ICollection, IEnumerable
\r
11 ArrayList collection = new ArrayList();
\r
14 public PlainImageCollection()
\r
17 // TODO: Add constructor logic here
\r
21 #region ICollection members
\r
23 public bool IsSynchronized {
\r
25 return collection.IsSynchronized;
\r
31 return collection.Count;
\r
35 public void CopyTo(Array array, int index) {
\r
36 collection.CopyTo(array, index);
\r
39 public object SyncRoot {
\r
41 return collection.SyncRoot;
\r
47 #region IEnumerable members
\r
49 public IEnumerator GetEnumerator() {
\r
50 return collection.GetEnumerator();
\r
55 #region Collection members
\r
57 public int Add(PlainImage plainImage) {
\r
58 return collection.Add( plainImage );
\r
61 public void Clear() {
\r
65 public bool Contains(PlainImage plainImage) {
\r
66 return collection.Contains(plainImage);
\r
69 public int IndexOf(PlainImage plainImage) {
\r
70 return collection.IndexOf( plainImage );
\r
73 public void Insert(int index, PlainImage value) {
\r
74 collection.Insert( index, value );
\r
77 public void Remove(PlainImage value) {
\r
78 collection.Remove( value );
\r
81 public void RemoveAt(int index) {
\r
82 collection.RemoveAt( index );
\r
85 public PlainImage this[int index] {
\r
86 get { return (PlainImage) collection[ index ]; }
\r
89 public PlainImage CurrentImage {
\r
90 get { return (PlainImage) collection[ _position ]; }
\r
91 set { collection[ _position ] = value; }
\r
94 public int CurrentImageIndex {
\r
95 get { return _position; }
\r
96 set { _position = value; }
\r