Author: marek
Date: 2005-05-09 03:37:20 -0400 (Mon, 09 May 2005)
New Revision: 44246
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Design/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Design/PropertyTab.cs
Log:
2005-05-09 Marek Safar <[EMAIL PROTECTED]>
* PropertyTab.cs: Implemented.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Design/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Design/ChangeLog
2005-05-09 07:02:49 UTC (rev 44245)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Design/ChangeLog
2005-05-09 07:37:20 UTC (rev 44246)
@@ -1,3 +1,7 @@
+2005-05-09 Marek Safar <[EMAIL PROTECTED]>
+
+ * PropertyTab.cs: Implemented.
+
2005-02-14 Peter Bartok <[EMAIL PROTECTED]>
* PropertyTab.cs: Made class abstract
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Design/PropertyTab.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Design/PropertyTab.cs
2005-05-09 07:02:49 UTC (rev 44245)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Design/PropertyTab.cs
2005-05-09 07:37:20 UTC (rev 44246)
@@ -19,18 +19,83 @@
//
// Copyright (c) 2004 Novell, Inc.
//
-// Authors:
+// Authors: Marek Safar ([EMAIL PROTECTED])
//
-// NOT COMPLETE
+// COMPLETE
+using System.Drawing;
+using System.ComponentModel;
+
namespace System.Windows.Forms.Design
{
- public abstract class PropertyTab
+ public abstract class PropertyTab: IExtenderProvider
{
- public PropertyTab()
+ Bitmap bitmap;
+ object[] components;
+
+ protected PropertyTab () {}
+
+ ~PropertyTab ()
{
- throw new NotImplementedException ();
+ Dispose (false);
}
+
+ public virtual Bitmap Bitmap {
+ get {
+ if (bitmap == null) {
+ Type t = base.GetType();
+ bitmap = new Bitmap (t, t.Name +
".bmp");
+ }
+ return bitmap;
+ }
+ }
+
+ public virtual object[] Components {
+ get { return components; }
+ set { components = value; }
+ }
+
+ public virtual string HelpKeyword {
+ get { return TabName; }
+ }
+
+ public abstract string TabName { get; }
+
+ public virtual bool CanExtend (object extendee)
+ {
+ return true;
+ }
+
+ public virtual void Dispose()
+ {
+ Dispose (true);
+ GC.SuppressFinalize (this);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (disposing && bitmap != null) {
+ bitmap.Dispose ();
+ bitmap = null;
+ }
+ }
+
+ public virtual PropertyDescriptor GetDefaultProperty (object
component)
+ {
+ return TypeDescriptor.GetDefaultProperty(component);
+ }
+
+ public virtual PropertyDescriptorCollection GetProperties
(object component)
+ {
+ return GetProperties (component, null);
+ }
+
+ public abstract PropertyDescriptorCollection GetProperties
(object component, Attribute[] attributes);
+
+ public virtual PropertyDescriptorCollection GetProperties
(ITypeDescriptorContext context, object component, Attribute[] attributes)
+ {
+ return GetProperties (component, attributes);
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches