|
///////////////////////////////////////////////////////////////////////////////
//
// File: RegionCollection.cs
//
// Facility: The unit contains the RegionCollection class.
//
// Abstract: The collection class of the Region class objects.
//
// Environment: VC 7.1
//
// Author: KB_Soft Group Ltd.
//
///////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Drawing;
namespace KBSoft.Components
{
/// <summary>
/// The collection class of regions.
/// </summary>
public class RegionCollection : DictionaryBase
{
#region Constructors
/// <summary>
/// Class constructor.
/// </summary>
public RegionCollection()
{
}
#endregion
#region Properties
/// <summary>
/// Class indexer.
/// </summary>
public Region this[ String key ]
{
get
{
return( (Region) Dictionary[key] );
}
set
{
Dictionary[key] = value;
}
}
/// <summary>
/// the property returns the collection of all keys of the dictionary.
/// </summary>
public ICollection Keys
{
get
{
return( Dictionary.Keys );
}
}
/// <summary>
/// the property returns the collection of all the values of the dictionary.
/// </summary>
public ICollection Values
{
get
{
return( Dictionary.Values );
}
}
#endregion
#region Methods
/// <summary>
/// the function adds the value to the dictionary.
/// </summary>
/// <param name="key">����</param>
/// <param name="value">��������</param>
public void Add( String key, Region value )
{
Dictionary.Add( key, value );
}
/// <summary>
/// the function checks whether the dictionary contains the value with the specified key.
/// </summary>
/// <param name="key">the key that will be used in checking whether the value corresponds to it.</param>
/// <returns>returns true if the dictionary contains the value with the specified key.</returns>
public bool Contains( String key )
{
return( Dictionary.Contains( key ) );
}
/// <summary>
/// The function deletes the value corresponding to the key from the dictionary.
/// </summary>
/// <param name="key">����, ������� ����� �����</param>
public void Remove( String key )
{
Dictionary.Remove( key );
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Alexandr Golovanov is a .NET developer at
KB_Soft Group, an offshore software development company located in Russia, Novosibirsk. Here he has worked
on various .NET projects.