1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
using System;
using System.Collections;
namespace Mainsoft.Drawing.Configuration {
/// <summary>
/// Summary description for MetadataConfigurationCollection.
/// </summary>
public class ResolutionConfigurationCollection : IEnumerable, ICollection {
ArrayList _resolutionConfigurations;
#region ctors
internal ResolutionConfigurationCollection(ResolutionConfigurationCollection parent) {
_resolutionConfigurations = new ArrayList();
if (parent != null)
_resolutionConfigurations.AddRange(parent);
}
#endregion
#region methods
internal void Add(ResolutionConfiguration value) {
_resolutionConfigurations.Add(value);
}
internal void Sort() {
_resolutionConfigurations.Sort();
}
#endregion
#region props
public ResolutionConfiguration this[int index] {
get {
return (ResolutionConfiguration)_resolutionConfigurations[index];
}
}
public ResolutionConfiguration this[string ImageFormat] {
get {
for (int i=0; i < _resolutionConfigurations.Count; i++)
if ( ((ResolutionConfiguration)_resolutionConfigurations[i]).ImageFormat == ImageFormat )
return (ResolutionConfiguration)_resolutionConfigurations[i];
return null;
}
}
#endregion
#region IEnumerable Members
public IEnumerator GetEnumerator() {
// TODO: Add ResolutionConfigurationCollection.GetEnumerator implementation
return _resolutionConfigurations.GetEnumerator();
}
#endregion
#region ICollection Members
public bool IsSynchronized {
get {
// TODO: Add ResolutionConfigurationCollection.IsSynchronized getter implementation
return _resolutionConfigurations.IsSynchronized;
}
}
public int Count {
get {
// TODO: Add ResolutionConfigurationCollection.Count getter implementation
return _resolutionConfigurations.Count;
}
}
public void CopyTo(Array array, int index) {
// TODO: Add ResolutionConfigurationCollection.CopyTo implementation
_resolutionConfigurations.CopyTo(array, index);
}
public object SyncRoot {
get {
// TODO: Add ResolutionConfigurationCollection.SyncRoot getter implementation
return _resolutionConfigurations.SyncRoot;
}
}
#endregion
}
}
|