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.
kev/Drawer/UCDraw/SigmaDrawerWellElement/WellInnerLayerDataSetting.cs

107 lines
2.9 KiB
C#

1 month ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using System.Drawing.Design;
using System.Xml.Serialization;
using GeoSigma.SigmaDrawerStyle;
using SigmaDrawerStyle;
using System.Drawing;
namespace GeoSigma.SigmaDrawerElement
{
#pragma warning disable SA1402 // File may only contain a single type
#pragma warning disable SA1600 // Elements should be documented
#pragma warning disable SA1649 // File name should match first type name
[XmlRoot("Pcg")]
[TypeConverter(typeof(PropertySorter))]
public class WellInnerLayerDataSetting : baseInTrackObj
{
private const string innerLayerCategory = "\t\t设置夹层";
[XmlIgnore]
[Category(innerLayerCategory)]
[DisplayName("顶深")]
[PropertyOrder(0)]
public double TopDepth
{
get => innerLayer.Top;
set
{
innerLayer.Top = value;
innerLayer.Thickness = innerLayer.Bottom - innerLayer.Top;
}
}
[XmlIgnore]
[Category(innerLayerCategory)]
[DisplayName("底深")]
[PropertyOrder(1)]
public double BottomDepth
{
get => innerLayer.Bottom;
set
{
innerLayer.Bottom = value;
innerLayer.Thickness = innerLayer.Bottom - innerLayer.Top;
}
}
[XmlIgnore]
[PropertyOrder(7)]
[Category(innerLayerCategory)]
[DisplayName("字体")]
[Editor(typeof(PropertyEditorWellFontEx), typeof(UITypeEditor))]
public WellFontEx CoreDataFont
{
get => LayerStyleHelper.GetFontEx(innerLayer.Style);
set => LayerStyleHelper.SetFontEx(innerLayer.Style, value);
}
[XmlIgnore]
[Category(innerLayerCategory)]
[DisplayName("类型")]
[PropertyOrder(2)]
public string type
{
get => innerLayer.Type;
set => innerLayer.Type = value;
}
[XmlAttribute("Version")]
[Browsable(false)]
public int Version { get; set; }
[XmlElement("InnerLayer")]
[Browsable(false)]
public WellInnerLayerDataEntity innerLayer { get; set; }
}
public class WellInnerLayerDataEntity
{
[XmlAttribute("Type")]
public string Type { get; set; }
[XmlAttribute("Top")]
public double Top { get; set; }
[XmlAttribute("Bottom")]
public double Bottom { get; set; }
[XmlAttribute("Thickness")]
public double Thickness { get; set; }
[XmlElement("Style")]
public WellLayerStyle Style { get; set; }
}
#pragma warning restore SA1649 // File name should match first type name
#pragma warning restore SA1600 // Elements should be documented
#pragma warning restore SA1402 // File may only contain a single type
}