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.
128 lines
4.0 KiB
C#
128 lines
4.0 KiB
C#
using System.ComponentModel;
|
|
#if WEB_SERVICE
|
|
#else
|
|
using System.Drawing.Design;
|
|
#endif
|
|
using System.Xml.Serialization;
|
|
using GeoSigmaDrawLib;
|
|
|
|
namespace GeoSigma.SigmaDrawerStyle
|
|
{
|
|
[XmlRoot("Mark2")]
|
|
public class CurveTwoMark : CurveView
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="CurveTwoMark"/> class.
|
|
/// </summary>
|
|
public CurveTwoMark()
|
|
{
|
|
TypeName = "两个符号";
|
|
}
|
|
private string _MarkName;
|
|
[XmlAttribute("Value")]
|
|
[Browsable(false)]
|
|
public string MarkName { get => _MarkName; set => _MarkName = value; }
|
|
|
|
private SymbolNameWrapper symbolEditor = new SymbolNameWrapper();
|
|
[Category("\t基础属性"), DisplayName("\t\t\t\t\t\t\t\t符号"), Description("符号")]
|
|
[XmlIgnore]
|
|
//[Editor("UCDraw.Editor.MarkEditor, UCDraw", typeof(UITypeEditor))]
|
|
#if WEB_SERVICE
|
|
#else
|
|
[Editor("GeoSigma.SigmaDrawerStyle.PropertyEditorSymbol, GeoSigma.SigmaDrawerStyle", typeof(UITypeEditor))]
|
|
#endif
|
|
public SymbolNameWrapper SymbolEditor
|
|
{
|
|
get
|
|
{
|
|
symbolEditor.SymbolName = MarkName;
|
|
symbolEditor.DrawerGeo = Geo;
|
|
return symbolEditor;
|
|
}
|
|
set
|
|
{
|
|
symbolEditor = value;
|
|
this.Geo = (GeoSigmaXY)symbolEditor.DrawerGeo;
|
|
MarkName = symbolEditor.SymbolName;
|
|
}
|
|
}
|
|
|
|
private double _Height = 200;
|
|
[Category("基础属性"), DisplayName("\t\t\t\t\t\t\t高度")]
|
|
[XmlAttribute("Height")]
|
|
[TypeConverter(typeof(PropertyDoubleConverter))]
|
|
public double Height { get => _Height; set => _Height = value; }
|
|
|
|
private double _Width = 200;
|
|
|
|
[Category("基础属性"), DisplayName("\t\t\t\t\t\t宽度")]
|
|
[XmlAttribute("Width")]
|
|
[TypeConverter(typeof(PropertyDoubleConverter))]
|
|
public double Width { get => _Width; set => _Width = value; }
|
|
|
|
private double _Angle;
|
|
|
|
[Category("基础属性"), DisplayName("\t\t\t\t\t角度")]
|
|
[XmlAttribute("Angle")]
|
|
[TypeConverter(typeof(PropertyDoubleConverter))]
|
|
public double Angle { get => _Angle; set => _Angle = value; }
|
|
|
|
[Category("基础属性"), DisplayName("\t\t\t\t类型"),]
|
|
[XmlIgnore]
|
|
[TypeConverter(typeof(Converter.TwoMarkTypeConverter))]
|
|
public int DistanceMode
|
|
{
|
|
get
|
|
{
|
|
return _Style & (int)TwoMarkType.PLINE_FAL_DIS_ALL;
|
|
}
|
|
set
|
|
{
|
|
_Style &= ~((int)TwoMarkType.PLINE_FAL_DIS_ALL);
|
|
_Style |= value;
|
|
}
|
|
}
|
|
|
|
private int _Style = (int)LineType.PLINE_ZERO | (int)TwoMarkType.PLINE_FAL_DIS_IN;
|
|
|
|
[Category("基础属性"), DisplayName("\t\t\t风格"), Browsable(false)]
|
|
[XmlAttribute("Style")]
|
|
public int Style
|
|
{
|
|
get => _Style;
|
|
set => _Style = value;
|
|
}
|
|
|
|
private double _Step = 1;
|
|
|
|
[Category("基础属性"), DisplayName("\t\t距离")]
|
|
[XmlAttribute("Step")]
|
|
[TypeConverter(typeof(PropertyDoubleConverter))]
|
|
public double Step { get => _Step; set => _Step = value; }
|
|
|
|
private double _Offset;
|
|
|
|
[Category("基础属性"), DisplayName("\t偏移")]
|
|
[XmlAttribute("Offset")]
|
|
[TypeConverter(typeof(PropertyDoubleConverter))]
|
|
public double Offset { get => _Offset; set => _Offset = value; }
|
|
|
|
private int _CurveType;
|
|
[Category("基础属性"), DisplayName("显示方式")]
|
|
[XmlIgnore]
|
|
[TypeConverter(typeof(Converter.LineTypeConverter))]
|
|
public int CurveType
|
|
{
|
|
get
|
|
{
|
|
return _Style & (int)LineType.PLINE_TYPE_ALL;
|
|
}
|
|
set
|
|
{
|
|
_Style &= ~((int)LineType.PLINE_TYPE_ALL);
|
|
_Style |= value;
|
|
}
|
|
}
|
|
}
|
|
}
|