Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
1de7a351fThis file is pinned to the selected release. Download the original to open it in your design tool.
using System;
using System.ComponentModel;
using System.Globalization;
namespace MikroPic.EdaTools.v1.Base.Geometry {
/// <summary>
/// Clase per la gestio de la conversio de tipus.
/// </summary>
///
public sealed class EdaPointConverter: TypeConverter {
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) {
return destinationType == typeof(string);
}
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) {
var point = (EdaPoint)value;
return String.Format("{0}, {1}", point.X, point.Y);
}
}
}