You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
188 lines
4.8 KiB
C#
188 lines
4.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
#if WEB_SERVICE
|
|
#else
|
|
using System.Drawing.Design;
|
|
using System.Windows.Forms;
|
|
#endif
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Xml;
|
|
using System.Xml.Serialization;
|
|
using DevExpress.CodeParser;
|
|
using GeoSigma.SigmaDrawerStyle.Converter;
|
|
using GeoSigmaDrawLib;
|
|
using SigmaDrawerStyle;
|
|
|
|
namespace GeoSigma.SigmaDrawerStyle
|
|
{
|
|
[XmlRoot("HowToViewPoint")]
|
|
[TypeConverter(typeof(PropertySorter))]
|
|
public class DrawerPointStyleText
|
|
{
|
|
[Browsable(false)]
|
|
public DrawerPointStyle PointStyle { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="DrawerPointStyle"/> class.
|
|
/// </summary>
|
|
public DrawerPointStyleText(DrawerPointStyle pointStyle)
|
|
{
|
|
PointStyle = pointStyle;
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category("文本"), DisplayName("字体"), PropertyOrder(1)]
|
|
[TypeConverter(typeof(FontPropertyConvert))]
|
|
public Font TextFont
|
|
{
|
|
get
|
|
{
|
|
return PointStyle.TextFont;
|
|
}
|
|
set
|
|
{
|
|
PointStyle.TextFont = value;
|
|
}
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category("文本"), DisplayName("尺寸"), PropertyOrder(2)]
|
|
[TypeConverter(typeof(PropertyScaleSizeConvert))]
|
|
public PropertySize TextSize
|
|
{
|
|
get
|
|
{
|
|
return PointStyle.TextSize;
|
|
}
|
|
set
|
|
{
|
|
PointStyle.TextSize = value;
|
|
}
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category("文本"), DisplayName("角度"), PropertyOrder(3)]
|
|
public double TextAngle
|
|
{
|
|
get
|
|
{
|
|
return PointStyle.TextAngle;
|
|
}
|
|
set
|
|
{
|
|
PointStyle.TextAngle =value;
|
|
}
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category("文本"), DisplayName("偏移"), PropertyOrder(4)]
|
|
public PropertyPoint Offset
|
|
{
|
|
get => PointStyle.Offset;
|
|
set => PointStyle.Offset = value;
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category("文本"), DisplayName("水平对齐"), PropertyOrder(5)]
|
|
[TypeConverter(typeof(Converter.AlignHorizionConverter))]
|
|
public int AlignHorizion
|
|
{
|
|
get
|
|
{
|
|
return PointStyle.AlignHorizion;
|
|
}
|
|
set
|
|
{
|
|
PointStyle.AlignHorizion = value;
|
|
}
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category("文本"), DisplayName("垂直对齐"), PropertyOrder(6)]
|
|
[TypeConverter(typeof(Converter.AlignVerticalConverter))]
|
|
public int AlignVertical
|
|
{
|
|
get
|
|
{
|
|
return PointStyle.AlignVertical;
|
|
}
|
|
set
|
|
{
|
|
PointStyle.AlignVertical = value;
|
|
}
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category("文本"), DisplayName("文字边框"), PropertyOrder(7)]
|
|
[TypeConverter(typeof(Converter.BorderTypeConverter))]
|
|
public int BorderType
|
|
{
|
|
get
|
|
{
|
|
return PointStyle.BorderType;
|
|
}
|
|
set
|
|
{
|
|
PointStyle.BorderType = value;
|
|
}
|
|
}
|
|
private Color? _ForeColor;
|
|
[XmlIgnore]
|
|
[Category("文本"), DisplayName("前景色"), PropertyOrder(8)]
|
|
#if WEB_SERVICE
|
|
#else
|
|
[Editor(typeof(PropertyEditorColor), typeof(UITypeEditor))]
|
|
#endif
|
|
[TypeConverter(typeof(PropertyColorIndicatorConvert))]
|
|
public Color? ForeColor
|
|
{
|
|
get
|
|
{
|
|
return PointStyle.ForeColor;
|
|
}
|
|
set
|
|
{
|
|
PointStyle.ForeColor = value;
|
|
}
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category("文本"), DisplayName("背景颜色"), PropertyOrder(9)]
|
|
//[TypeConverter(typeof(ExpandableObjectConverter))]
|
|
[TypeConverter(typeof(PropertyColorNullable.PropertyColorNullableConvert))]
|
|
public PropertyColorNullable BackColor// { set; get; } = new PropertyColorNullable();
|
|
{
|
|
get
|
|
{
|
|
return PointStyle.BackColor;
|
|
}
|
|
set
|
|
{
|
|
PointStyle.BackColor = value;
|
|
}
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category("文本"), DisplayName("小数位数"), PropertyOrder(10)]
|
|
[TypeConverter(typeof(PropertyIntConverter))]
|
|
public int DecimalName
|
|
{
|
|
get
|
|
{
|
|
return PointStyle.DecimalName;
|
|
}
|
|
set
|
|
{
|
|
PointStyle.DecimalName = value;
|
|
}
|
|
}
|
|
}
|
|
}
|