Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
BitmapCollection.cs
Package: ProgressBar_src.rar [view]
Upload User: nnpulika
Upload Date: 2013-02-15
Package Size: 597k
Code Size: 2k
Category:
StatusBar
Development Platform:
C#
- using System;
- using System.Collections;
- using System.Drawing;
- namespace UtilityLibrary.Collections
- {
- /// <summary>
- /// Summary description for BitmapCollection.
- /// </summary>
- public class BitmapCollection : IEnumerable
- {
- #region Class Variables
- public event EventHandler Changed;
- ArrayList items = new ArrayList();
- #endregion
- #region Constructor
- public BitmapCollection()
- {
- }
- #endregion
- #region Properties
- public int Count
- {
- get { return items.Count; }
- }
- #endregion
- #region Methods
- public IEnumerator GetEnumerator()
- {
- return items.GetEnumerator();
- }
- public int Add(Bitmap item)
- {
- if (Contains(item)) return -1;
- int index = items.Add(item);
- RaiseChanged();
- return index;
- }
- public void Clear()
- {
- while (Count > 0) RemoveAt(0);
- }
- public bool Contains(Bitmap item)
- {
- return items.Contains(item);
- }
- public int IndexOf(Bitmap item)
- {
- return items.IndexOf(item);
- }
- public void Remove(Bitmap item)
- {
- items.Remove(item);
- RaiseChanged();
- }
- public void RemoveAt(int index)
- {
- items.RemoveAt(index);
- RaiseChanged();
- }
- public void Insert(int index, Bitmap item)
- {
- items.Insert(index, item);
- RaiseChanged();
- }
- public Bitmap this[int index]
- {
- get { return (Bitmap) items[index]; }
- set { items[index] = value; }
- }
- #endregion
- #region Implementatioin
- void RaiseChanged()
- {
- if (Changed != null) Changed(this, null);
- }
- #endregion
- }
- }