Author: gert
Date: 2005-08-16 05:23:07 -0400 (Tue, 16 Aug 2005)
New Revision: 48417
Modified:
Log:
* Color.cs: Fixed line endings. Set eol-style to native.
* ColorConverter.cs: Fixed line endings. Set eol-style to native.
* Size.cs: Set eol-style to native.
* SizeF.cs: Use current culture in ToString(), set eol-style to native.
* SizeConverter.cs: Take culture into account when converting to/from
string. Set eol-style to native.
* Point.cs: Fixed line endings. Set eol-style to native.
* PointF.cs: Use current culture in ToString(), set eol-style to native.
* PointConverter.cs: Take culture into account when converting to/from
string. Set eol-style to native.
* ImageFormatConverter.cs: Fixed line endings. Set eol-style to
native.
* RectangleConverter.cs: Fixed line endings. Set eol-style to native.
Modified:
2005-08-16 09:21:41 UTC (rev 48416)
2005-08-16 09:23:07 UTC (rev 48417)
@@ -1,5 +1,21 @@
2005-08-16 Vladimir Krasnov <vladimirk (AT) mainsoft (DOT) com>
+2005-08-16 Gert Driesen <drieseng (AT) users (DOT) sourceforge.net>
+* Color.cs: Fixed line endings. Set eol-style to native.
+* ColorConverter.cs: Fixed line endings. Set eol-style to native.
+* Size.cs: Set eol-style to native.
+* SizeF.cs: Use current culture in ToString(), set eol-style to native.
+* SizeConverter.cs: Take culture into account when converting to/from
+string. Set eol-style to native.
+* Point.cs: Fixed line endings. Set eol-style to native.
+* PointF.cs: Use current culture in ToString(), set eol-style to native.
+* PointConverter.cs: Take culture into account when converting to/from
+string. Set eol-style to native.
+* ImageFormatConverter.cs: Fixed line endings. Set eol-style to
+native.
+* RectangleConverter.cs: Fixed line endings. Set eol-style to native.
+
+2005-08-16 Vladimir Krasnov <vladimirk (AT) mainsoft (DOT) com>
+
* Graphics.jvm.cs: Fixed InterpolationMode property
2005-08-15 Vladimir Krasnov <vladimirk (AT) mainsoft (DOT) com>
Modified:
2005-08-16 09:21:41 UTC (rev 48416)
2005-08-16 09:23:07 UTC (rev 48417)
@@ -514,7 +514,7 @@
public override string ToString ()
{
-if (IsEmpty)
+if (IsEmpty)
return "Color [Empty]";
if (myname != "")
Property changes on:
Name: svn:eol-style
+ native
Modified:
2005-08-16 09:21:41 UTC (rev 48416)
2005-08-16 09:23:07 UTC (rev 48417)
@@ -155,16 +155,16 @@
StringBuilder sb = new StringBuilder ();
if (color.A != 255) {
-sb.Append (color.A);
+sb.Append (color.A);
sb.Append (numSeparator);
sb.Append (" ");
}
-sb.Append (color.R);
-sb.Append (numSeparator);
+sb.Append (color.R);
+sb.Append (numSeparator);
sb.Append (" ");
-sb.Append (color.G);
-sb.Append (numSeparator);
+sb.Append (color.G);
+sb.Append (numSeparator);
sb.Append (" ");
sb.Append (color.B);
Property changes on:
Name: svn:eol-style
+ native
Modified:
2005-08-16 09:21:41 UTC (rev 48416)
2005-08-16 09:23:07 UTC (rev 48417)
@@ -36,7 +36,7 @@
using System.Globalization;
using System.Drawing.Imaging;
using ;
-using System.Reflection;
+using System.Reflection;
namespace System.Drawing
{
Property changes on:
Name: svn:eol-style
+ native
Modified:
2005-08-16 09:21:41 UTC (rev 48416)
2005-08-16 09:23:07 UTC (rev 48417)
@@ -31,7 +31,7 @@
// WITH THE SFTWARE R THE USE R THER DEALINGS IN THE SFTWARE.
//
-using System;
+using System;
using System.Globalization;
using System.Runtime.InteropServices;
using System.ComponentModel;
Property changes on:
Name: svn:eol-style
+ native
Modified:
2005-08-16 09:21:41 UTC (rev 48416)
2005-08-16 09:23:07 UTC (rev 48417)
@@ -34,7 +34,7 @@
using System.ComponentModel;
using System.Globalization;
using ;
-using System.Reflection;
+using System.Reflection;
namespace System.Drawing
{
@@ -43,7 +43,7 @@
/// </summary>
public class PointConverter : TypeConverter
{
-public PointConverter(){ }
+public PointConverter() { }
public override bool CanConvertFrom (ITypeDescriptorContext context,
Type sourceType)
@@ -74,13 +74,12 @@
if (s == null)
return base.ConvertFrom (context, culture, value);
-// FIXME: use culture
-string [] subs = s.Split (',');
+string [] subs = s.Split ( ());
if (subs.Length != 2)
throw new ArgumentException ("Failed to parse Text(" + s + ") expected text in the format \"x, y.\"");
-int x = Int32.Parse (subs [0]);
-int y = Int32.Parse (subs [1]);
+int x = Int32.Parse (subs [0], culture);
+int y = Int32.Parse (subs [1], culture);
return new Point (x, y);
}
@@ -95,7 +94,8 @@
// type is string." MS does not behave as per the specs.
// well, we have to be compatible with MS.
if ((destinationType == typeof (string)) && (value is Point))
-return ((Point) value).X + ", " + ((Point) value).Y;
+return ((Point) value).X.ToString(culture) + culture.TextInfo.ListSeparator
++ " " + ((Point) value).Y.ToString(culture);
if (destinationType == typeof (InstanceDescriptor) && value is Point) {
Point c = (Point)value;
Property changes on:
Name: svn:eol-style
+ native
Modified:
2005-08-16 09:21:41 UTC (rev 48416)
2005-08-16 09:23:07 UTC (rev 48417)
@@ -31,7 +31,7 @@
// WITH THE SFTWARE R THE USE R THER DEALINGS IN THE SFTWARE.
//
-using System;
+using System;
using System.Globalization;
using System.Runtime.InteropServices;
using System.ComponentModel;
@@ -226,9 +226,9 @@
/// </remarks>
public override string ToString ()
-{
-return String.Format ("{{X={0}, Y={1}}}", x.ToString (CultureInfo.InvariantCulture),
-y.ToString (CultureInfo.InvariantCulture));
+{
+return String.Format ("{{X={0}, Y={1}}}", x.ToString (CultureInfo.CurrentCulture),
+y.ToString (CultureInfo.CurrentCulture));
}
}
}
Property changes on:
Name: svn:eol-style
+ native
Modified:
2005-08-16 09:21:41 UTC (rev 48416)
2005-08-16 09:23:07 UTC (rev 48417)
@@ -39,7 +39,7 @@
using System.Globalization;
using System.Text;
using ;
-using System.Reflection;
+using System.Reflection;
namespace System.Drawing
{
Property changes on:
Name: svn:eol-style
+ native
Property changes on:
Name: svn:eol-style
+ native
Modified:
2005-08-16 09:21:41 UTC (rev 48416)
2005-08-16 09:23:07 UTC (rev 48417)
@@ -38,7 +38,7 @@
using System.ComponentModel;
using System.Globalization;
using ;
-using System.Reflection;
+using System.Reflection;
namespace System.Drawing
{
@@ -80,13 +80,12 @@
if (s == null)
return base.ConvertFrom (context, culture, value);
-// FIXME: use culture
-string [] subs = s.Split (',');
+string[] subs = s.Split ( ());
if (subs.Length != 2)
throw new ArgumentException ("Failed to parse Text(" + s + ") expected text in the format \"Width,Height.\"");
-int width = Int32.Parse (subs [0]);
-int height = Int32.Parse (subs [1]);
+int width = Int32.Parse (subs [0], culture);
+int height = Int32.Parse (subs [1], culture);
return new Size (width, height);
}
@@ -101,7 +100,8 @@
// type is string." MS does not behave as per the specs.
// well, we have to be compatible with MS.
if ((destinationType == typeof (string)) && (value is Size))
-return ((Size) value).Width + ", " + ((Size) value).Height;
+return ((Size) value).Width.ToString(culture) + culture.TextInfo.ListSeparator
++ " " + ((Size) value).Height.ToString(culture);
if (destinationType == typeof (InstanceDescriptor) && value is Size) {
Size s = (Size) value;
Property changes on:
Name: svn:eol-style
+ native
Modified:
2005-08-16 09:21:41 UTC (rev 48416)
2005-08-16 09:23:07 UTC (rev 48417)
@@ -31,7 +31,7 @@
// WITH THE SFTWARE R THE USE R THER DEALINGS IN THE SFTWARE.
//
-using System;
+using System;
using System.Globalization;
using System.Runtime.InteropServices;
using System.ComponentModel;
@@ -287,9 +287,9 @@
/// </remarks>
public override string ToString ()
-{
-return string.Format ("{{Width={0}, Height={1}}}", wd.ToString (CultureInfo.InvariantCulture),
-ht.ToString (CultureInfo.InvariantCulture));
+{
+return string.Format ("{{Width={0}, Height={1}}}", wd.ToString (CultureInfo.CurrentCulture),
+ht.ToString (CultureInfo.CurrentCulture));
}
}
}
Property changes on:
Name: svn:eol-style
+ native
Mono-patches maillist - Mono-patches (AT) lists (DOT) ximian.com