(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Windows.Forms / Gtk / BindingsCollection.cs
blob16cf98b6ac206bbc6235282b0da07cfcc54ad711
1 //
2 // System.Windows.Forms.BindingsCollection.cs
3 //
4 // Author:
5 // stubbed out by Jaak Simm (jaaksimm@firm.ee)
6 // Dennis Hayes (dennish@Raytek.com)
7 //
8 // (C) 2002/3 Ximian, Inc
9 //
11 using System.Collections;
12 using System.ComponentModel;
14 namespace System.Windows.Forms {
16 /// <summary>
17 /// Represents a collection of Binding objects for a control.
18 ///
19 /// </summary>
21 public class BindingsCollection : BaseCollection {
23 #region Constructors
24 protected internal BindingsCollection ()
27 #endregion
29 // --- public and protected Properties ---
30 public override int Count {
31 get {
32 return base.Count;
36 public Binding this[int index] {
37 get {
38 return (Binding)(base.List[index]);
42 [MonoTODO]
43 protected override ArrayList List {
44 get {
45 return base.List;
49 // --- public Methods ---
50 // following internal methods are (will) not be stubbed out:
51 [MonoTODO]
52 protected virtual void AddCore(Binding dataBinding) {
55 [MonoTODO]
56 protected virtual void ClearCore(){
59 [MonoTODO]
60 protected virtual void RemoveCore(Binding dataBinding){
63 //
64 // CollectionChanged event:
65 // Though it was not documented, here methods Add and Remove
66 // cause the CollectionChanged event to occur, similarily as Clear.
67 // Would be nice if someone checked the exact event behavior of .NET implementation.
69 protected internal void Add(Binding binding)
71 base.List.Add(binding);
72 OnCollectionChanged(new CollectionChangeEventArgs(
73 CollectionChangeAction.Add,
74 base.List
75 ));
78 protected internal void Clear()
80 base.List.Clear();
81 OnCollectionChanged(new CollectionChangeEventArgs(
82 CollectionChangeAction.Refresh,
83 base.List
84 ));
87 protected virtual void OnCollectionChanged(CollectionChangeEventArgs ccevent)
89 if (CollectionChanged != null)
90 CollectionChanged(this, ccevent);
93 protected internal void Remove(Binding binding)
95 base.List.Remove(binding);
96 OnCollectionChanged(new CollectionChangeEventArgs(
97 CollectionChangeAction.Remove,
98 base.List
99 ));
102 protected internal void RemoveAt(int index)
104 base.List.RemoveAt(index);
105 OnCollectionChanged(new CollectionChangeEventArgs(
106 CollectionChangeAction.Remove,
107 base.List
111 protected internal bool ShouldSerializeMyAll()
113 if (this.Count>0) return true;
114 else return false;
117 // public events
118 public event CollectionChangeEventHandler CollectionChanged;