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.

71 lines
1.9 KiB
C#

1 month ago
// <copyright file="DrawerGroup.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using GeoSigmaDrawLib;
using SigmaDrawerStyle;
namespace SigmaDrawerElement
{
/// <summary>
/// 图元组.
/// </summary>
[TypeConverter(typeof(PropertySorter))]
public class DrawerGroup : ElementBase
{
/// <summary>
/// Initializes a new instance of the <see cref="DrawerGroup"/> class.
/// </summary>
public DrawerGroup()
{
ElementType = DrawElementType.ELEMENT_BLOCK;
}
[Browsable(false)]
[XmlAttribute("Flags")]
public int Flags { get; set; }
[Category("基础属性"), DisplayName("数据范围"), ReadOnly(true), PropertyOrder(2)]
[XmlElement("MapRange")]
public string MapRange { get; set; }
1 month ago
[Browsable(false)]
[XmlElement("Range")]
public string RangeProxy
{
get
{
return $"{Range.Left}, {Range.Top}, {Range.Right}, {Range.Bottom}";
}
set
{
try
{
double[] values = value.Split(",").Select(Double.Parse).ToArray();
if (values.Length >= 4)
{
Range = RectangleD.FromLTRB(values[0], values[1], values[2], values[3]);
}
}
catch (Exception)
{
}
}
}
/// <summary>
/// 图件范围
/// </summary>
[XmlIgnore]
[Browsable(false)]
public RectangleD Range { get; set; }
1 month ago
}
}