(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Windows.Forms / WINELib / BindingsCollection.cs
blob54dfcea2ee457dcb0fcb4af0494765bfb53cc694
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 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 [MonoTODO]
22 public class BindingsCollection : BaseCollection {
24 #region Constructors
25 protected internal BindingsCollection ()
28 #endregion
30 // --- public and protected Properties ---
31 public virtual int Count {
32 get {
33 return base.Count;
37 public Binding this[int index] {
38 get {
39 return (Binding)(base.List[index]);
43 [MonoTODO]
44 protected override ArrayList List {
45 get {
46 return base.List;
50 // --- public Methods ---
51 // following internal methods are (will) not be stubbed out:
52 // - protected virtual void AddCore(Binding dataBinding);
53 // - protected virtual void ClearCore();
54 // - protected virtual void RemoveCore(Binding dataBinding);
55 //
56 // CollectionChanged event:
57 // Though it was not documented, here methods Add and Remove
58 // cause the CollectionChanged event to occur, similarily as Clear.
59 // Would be nice if someone checked the exact event behavior of .NET implementation.
61 protected internal void Add(Binding binding)
63 base.List.Add(binding);
64 OnCollectionChanged(new CollectionChangeEventArgs(
65 CollectionChangeAction.Add,
66 base.List
67 ));
70 protected internal void Clear()
72 base.List.Clear();
73 OnCollectionChanged(new CollectionChangeEventArgs(
74 CollectionChangeAction.Refresh,
75 base.List
76 ));
79 protected virtual void OnCollectionChanged(CollectionChangeEventArgs ccevent)
81 if (CollectionChanged != null)
82 CollectionChanged(this, ccevent);
85 protected internal void Remove(Binding binding)
87 base.List.Remove(binding);
88 OnCollectionChanged(new CollectionChangeEventArgs(
89 CollectionChangeAction.Remove,
90 base.List
91 ));
94 protected internal void RemoveAt(int index)
96 base.List.RemoveAt(index);
97 OnCollectionChanged(new CollectionChangeEventArgs(
98 CollectionChangeAction.Remove,
99 base.List
103 protected internal bool ShouldSerializeMyAll()
105 throw new NotImplementedException ();
106 if (this.Count>0) return true;
107 else return false;
110 // public events
111 public event CollectionChangeEventHandler CollectionChanged;