+2004-02-07 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
+
+ * SRDescriptionAttribute.cs: Added and implemented
+ * ToolboxBitmapAttribute.cs: Implemented a few members
+ * SystemIcons.cs: Stubbed
+ * StringFormat.cs: Implemented method
+ * Region.cs: Added Todo, fixed attribute
+ * Size.cs: Added attribute
+ * SizeF.cs: Added attribute
+ * RectangleF.cs: Added attributes
+ * Rectangle.cs: Added attributes
+ * PointF.cs: Added attribute
+ * Point.cs: Added attribute
+
2004-02-06 Ravindra <rkumar@novell.com>
* Brush.cs: Renamed GetException method to CheckStatus
/// Indicates if both X and Y are zero.
/// </remarks>
+ [Browsable (false)]
public bool IsEmpty {
get {
return ((x == 0) && (y == 0));
using System;
using System.Runtime.InteropServices;
+using System.ComponentModel;
namespace System.Drawing {
/// Indicates if both X and Y are zero.
/// </remarks>
+ [Browsable (false)]
public bool IsEmpty {
get {
return ((cx == 0.0) && (cy == 0.0));
/// Read only.
/// </remarks>
+ [Browsable (false)]
public int Bottom {
get {
return y + height;
/// Indicates if the width or height are zero. Read only.
/// </remarks>
+ [Browsable (false)]
public bool IsEmpty {
get {
return ((width == 0) || (height == 0));
/// Read only.
/// </remarks>
+ [Browsable (false)]
public int Left {
get {
return X;
/// The Location of the top-left corner of the Rectangle.
/// </remarks>
+ [Browsable (false)]
public Point Location {
get {
return new Point (x, y);
/// Read only.
/// </remarks>
+ [Browsable (false)]
public int Right {
get {
return X + Width;
/// The Size of the Rectangle.
/// </remarks>
+ [Browsable (false)]
public Size Size {
get {
return new Size (Width, Height);
/// Read only.
/// </remarks>
+ [Browsable (false)]
public int Top {
get {
return y;
//
using System;
+using System.ComponentModel;
namespace System.Drawing {
/// Read only.
/// </remarks>
+ [Browsable (false)]
public float Bottom {
get {
return Y + Height;
/// Indicates if the width or height are zero. Read only.
/// </remarks>
+ [Browsable (false)]
public bool IsEmpty {
get {
return ((sz.Width == 0) || (sz.Height == 0));
/// Read only.
/// </remarks>
+ [Browsable (false)]
public float Left {
get {
return X;
/// The Location of the top-left corner of the RectangleF.
/// </remarks>
+ [Browsable (false)]
public PointF Location {
get {
return loc;
/// Read only.
/// </remarks>
+ [Browsable (false)]
public float Right {
get {
return X + Width;
/// The Size of the RectangleF.
/// </remarks>
+ [Browsable (false)]
public SizeF Size {
get {
return sz;
/// Read only.
/// </remarks>
+ [Browsable (false)]
public float Top {
get {
return Y;
namespace System.Drawing
{
[ComVisible(false)]
+ [MonoTODO ("Not implemented")]
public sealed class Region : MarshalByRefObject, IDisposable
{
public Region()
}
- [ComVisible(false)]
public Region Clone()
{
return this;
--- /dev/null
+//
+// System.Drawing.SRDescriptionAttribute.cs
+//
+// Authors:
+// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
+//
+// (C) 2004 Andreas Nahr
+//
+
+using System;
+using System.ComponentModel;
+
+namespace System.Drawing
+{
+ [AttributeUsage(AttributeTargets.All)]
+ internal class SRDescriptionAttribute : DescriptionAttribute
+ {
+ private bool isReplaced = false;
+
+ public SRDescriptionAttribute (string description)
+ : base (description)
+ {
+ }
+
+ public override string Description {
+ get {
+ if (!isReplaced) {
+ isReplaced = true;
+ DescriptionValue = Locale.GetText (DescriptionValue);
+ }
+ return DescriptionValue;
+ }
+ }
+ }
+}
/// Indicates if both Width and Height are zero.
/// </remarks>
+ [Browsable (false)]
public bool IsEmpty {
get {
return ((width == 0) && (height == 0));
using System;
using System.Runtime.InteropServices;
+using System.ComponentModel;
namespace System.Drawing {
/// Indicates if both Width and Height are zero.
/// </remarks>
+ [Browsable (false)]
public bool IsEmpty {
get {
return ((wd == 0.0) && (ht == 0.0));
// Authors:\r
// Dennis Hayes (dennish@Raytek.com)\r
// Miguel de Icaza (miguel@ximian.com)\r
-// Jordi Mas i Hernandez (jordi@ximian.com)\r
+// Jordi Mas i Hernandez (jordi@ximian.com)\r
//\r
// (C) 2002 Ximian, Inc\r
// (C) 2003 Novell, Inc.\r
//\r
using System;\r
using System.Drawing.Text;\r
-using System.IO;// temp\r
-\r
\r
namespace System.Drawing\r
{\r
}\r
\r
[MonoTODO]\r
- public object Clone () {\r
+ public object Clone ()
+ {\r
throw new NotImplementedException ();\r
+ }
+
+ public override string ToString ()
+ {
+ return "[StringFormat, FormatFlags=" + this.FormatFlags.ToString() + "]";
}\r
\r
internal IntPtr NativeObject{ \r
//\r
// System.Drawing.SystemIcons.cs\r
//\r
-// Author:\r
-// Dennis Hayes (dennish@Raytek.com)\r
+// Authors:\r
+// Dennis Hayes (dennish@Raytek.com)
+// Andreas Nahr (ClassDevelopment@A-SoftTech.com)\r
//\r
// (C) 2002 Ximian, Inc\r
-//\r
+//
+\r
using System;\r
\r
namespace System.Drawing\r
-{\r
- /// <summary>\r
- /// Summary description for SystemIcons.\r
- /// </summary>\r
+{
+ [MonoTODO ("not implemented")]\r
public sealed class SystemIcons\r
{\r
private SystemIcons()\r
{\r
+ }
+
+ public static Icon Application { get { return LoadIcon();} }
+ public static Icon Asterisk { get { return LoadIcon();} }
+ public static Icon Error { get { return LoadIcon();} }
+ public static Icon Exclamation { get { return LoadIcon();} }
+ public static Icon Hand { get { return LoadIcon();} }
+ public static Icon Information { get { return LoadIcon();} }
+ public static Icon Question { get { return LoadIcon();} }
+ public static Icon Warning { get { return LoadIcon();} }
+ public static Icon WinLogo { get { return LoadIcon();} }
+
+ [MonoTODO]
+ private static Icon LoadIcon ()
+ {
+ return null;
}\r
}\r
}\r
//\r
// System.Drawing.ToolboxBitmapAttribute.cs\r
//\r
-// Author:\r
-// Dennis Hayes (dennish@Raytek.com)\r
+// Authors:\r
+// Dennis Hayes (dennish@Raytek.com)
+// Andreas Nahr (ClassDevelopment@A-SoftTech.com)\r
//\r
// (C) 2002 Ximian, Inc\r
-//\r
+//
+\r
using System;\r
\r
namespace System.Drawing\r
{\r
- /// <summary>\r
- /// Summary description for ToolboxBitmapAttribute.\r
- /// </summary>\r
[AttributeUsage (AttributeTargets.Class)]\r
public class ToolboxBitmapAttribute : Attribute\r
- {\r
- public ToolboxBitmapAttribute(string imageFile)\r
+ {
+ private Image smallImage;
+ private Image bigImage;
+ public static readonly ToolboxBitmapAttribute Default = new ToolboxBitmapAttribute();
+
+ private ToolboxBitmapAttribute ()
+ {
+ }
+
+ [MonoTODO ("implement")]\r
+ public ToolboxBitmapAttribute (string imageFile)\r
{\r
//\r
// TODO: Add constructor logic here\r
//\r
}\r
- \r
- public ToolboxBitmapAttribute(Type t)\r
+
+ [MonoTODO ("implement")]\r
+ public ToolboxBitmapAttribute (Type t)\r
{\r
//\r
// TODO: Add constructor logic here\r
//\r
}\r
- \r
- public ToolboxBitmapAttribute(Type t, string name)\r
+
+ [MonoTODO ("implement")]\r
+ public ToolboxBitmapAttribute (Type t, string name)\r
{\r
//\r
// TODO: Add constructor logic here\r
//\r
+ }
+
+ public override bool Equals (object value)
+ {
+ if (!(value is ToolboxBitmapAttribute))
+ return false;
+ if (value == this)
+ return true;
+ return ((ToolboxBitmapAttribute) value).smallImage == this.smallImage;
+ }
+
+ public override int GetHashCode ()
+ {
+ return (smallImage.GetHashCode () ^ bigImage.GetHashCode ());
+ }
+
+ public Image GetImage (object component)
+ {
+ return GetImage (component.GetType(), null, false);
+ }
+
+ public Image GetImage (object component, bool large)
+ {
+ return GetImage (component.GetType(), null, large);
+ }
+
+ public Image GetImage (Type type)
+ {
+ return GetImage (type, null, false);
+ }
+
+ public Image GetImage (Type type, bool large)
+ {
+ return GetImage (type, null, large);
+ }
+
+ [MonoTODO ("implement")]
+ public Image GetImage (Type type, string imgName, bool large)
+ {
+ return null;
+ }
+
+ [MonoTODO ("implement")]
+ public static Image GetImageFromResource (Type t, string imageName, bool large)
+ {
+ return null;
}\r
}\r
}\r