Browse Source

2007-01-04 Jonathan Pobst <[email protected]>

	* CommonDialog.cs, Cursor.cs, ErrorProvider.cs, HelpProvider.cs:
	Add 2.0 Tag properties.

	* LinkArea.cs: Add 2.0 ToString method.

svn path=/trunk/mcs/; revision=70495
Jonathan Pobst 19 years ago
parent
commit
90f73fe00f

+ 7 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,10 @@
+2007-01-04  Jonathan Pobst  <[email protected]>
+
+	* CommonDialog.cs, Cursor.cs, ErrorProvider.cs, HelpProvider.cs:
+	Add 2.0 Tag properties.
+
+	* LinkArea.cs: Add 2.0 ToString method.
+
 2007-01-03  Chris Toshok  <[email protected]>
 
 	* DataGrid.cs: the Alt+0 handling was wrong, it should have been

+ 17 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/CommonDialog.cs

@@ -79,6 +79,9 @@ namespace System.Windows.Forms {
 
 		#region Local Variables
 		internal DialogForm	form;
+#if NET_2_0
+		private object tag;
+#endif
 		#endregion Local Variables
 
 		#region Public Constructors
@@ -87,6 +90,20 @@ namespace System.Windows.Forms {
 		}
 		#endregion Public Constructors
 
+		#region Public Properties
+#if NET_2_0
+		[Localizable (false)]
+		[Bindable (true)]
+		[TypeConverter (typeof (StringConverter))]
+		[DefaultValue (null)]
+		[MWFCategory ("Data")]
+		public object Tag {
+			get { return this.tag; }
+			set { this.tag = value; }
+		}
+#endif
+		#endregion
+
 		#region Internal Methods
 		internal virtual void InitFormsSize(Form form) {
 			// Override this to set a default size for the form

+ 16 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Cursor.cs

@@ -98,6 +98,10 @@ namespace System.Windows.Forms {
 		private Bitmap		mask;
 		private Bitmap		cursor;
 		internal string		name;
+
+#if NET_2_0
+		private object tag;
+#endif
 		#endregion	// Local Variables
 
 		#region Public Constructors
@@ -232,6 +236,18 @@ namespace System.Windows.Forms {
 				return size;
 			}
 		}
+		
+#if NET_2_0
+		[Localizable (false)]
+		[Bindable (true)]
+		[TypeConverter (typeof (StringConverter))]
+		[DefaultValue (null)]
+		[MWFCategory ("Data")]
+		public object Tag {
+			get { return this.tag; }
+			set { this.tag = value; }
+		}
+#endif
 		#endregion	// Public Instance Properties
 
 		#region Public Static Methods

+ 16 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ErrorProvider.cs

@@ -274,6 +274,10 @@ namespace System.Windows.Forms {
 		private Icon			icon;
 		private Hashtable		controls;
 		private ToolTip.ToolTipWindow	tooltip;
+
+#if NET_2_0
+		private object tag;
+#endif
 		#endregion	// Local Variables
 
 		#region Public Constructors
@@ -377,6 +381,18 @@ namespace System.Windows.Forms {
 				base.Site = value;
 			}
 		}
+
+#if NET_2_0
+		[Localizable (false)]
+		[Bindable (true)]
+		[TypeConverter (typeof (StringConverter))]
+		[DefaultValue (null)]
+		[MWFCategory ("Data")]
+		public object Tag {
+			get { return this.tag; }
+			set { this.tag = value; }
+		}
+#endif
 		#endregion	// Public Instance Properties
 
 		#region Public Instance Methods

+ 16 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/HelpProvider.cs

@@ -90,6 +90,9 @@ namespace System.Windows.Forms {
 		private KeyPressEventHandler	HideToolTipKeyHandler;
 		private MouseEventHandler	HideToolTipMouseHandler;
 		private HelpEventHandler	HelpRequestHandler;
+#if NET_2_0
+		private object tag;
+#endif
 		#endregion	// Local Variables
 
 		#region Public Constructors
@@ -117,6 +120,19 @@ namespace System.Windows.Forms {
 				helpnamespace = value;
 			}
 		}
+		
+#if NET_2_0
+		[Localizable (false)]
+		[Bindable (true)]
+		[TypeConverter (typeof (StringConverter))]
+		[DefaultValue (null)]
+		[MWFCategory ("Data")]
+		public object Tag
+		{
+			get { return this.tag; }
+			set { this.tag = value; }
+		}
+#endif
 		#endregion	// Public Instance Properties
 
 		#region Public Instance Methods

+ 6 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkArea.cs

@@ -162,6 +162,12 @@ namespace System.Windows.Forms
 			return start << 4 | length;
 		}
 		
+#if NET_2_0
+		public override string ToString ()
+		{
+			return string.Format ("{{Start={0}, Length={1}}}", this.start.ToString (), this.length.ToString ());
+		}
+#endif
 		#endregion //Methods
 		
 	}