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.

233 lines
6.1 KiB
C#

using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;
using System.Xml.Serialization;
using GeoSigma.SigmaDrawerElement.Converter;
using GeoSigma.SigmaDrawerStyle;
using SigmaDrawerStyle;
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
/// <summary>
/// 井基础
/// </summary>
[XmlRoot("Pcg")]
[TypeConverter(typeof(PropertySorter))]
public class SecitonWellSetting
{
private const string BasePropertyCategory = "\t\t\t\t基本属性";
private const string FontCategory = "\t\t字体";
// 基本属性
[XmlIgnore]
[Category(BasePropertyCategory), DisplayName("标题"), PropertyOrder(0)]
public string Title
{
get => well.Title.Font.Text;
set => well.Title.Font.Text = value;
}
[XmlIgnore]
[Category(BasePropertyCategory), DisplayName("井名"), PropertyOrder(1)]
public string WellName
{
get => well.Name;
set => well.Name = value;
}
[XmlIgnore]
[Category(BasePropertyCategory), DisplayName("补心海拔"), PropertyOrder(2)]
public double KB
{
get => well.BushingLevel;
set => well.BushingLevel = value;
}
[XmlIgnore]
[Category(BasePropertyCategory), DisplayName("起始深度"), PropertyOrder(4)]
public double StartDepth
{
get => well.TopDepth;
set
{
double delta = (value - well.TopDepth);
well.TopDepth = value;
well.Length = well.Length - delta;
}
}
[XmlIgnore]
[Category(BasePropertyCategory), DisplayName("结束深度"), PropertyOrder(5)]
public double EndDepth
{
get
{
return (well.TopDepth +well.Length);
}
set
{
well.Length = (value - well.TopDepth);
}
}
[XmlIgnore]
[Category(FontCategory)]
[DisplayName("标题字体")]
[PropertyOrder(0)]
[Editor(typeof(PropertyEditorWellFontEx), typeof(UITypeEditor))]
public WellFontEx HeaderFont
{
get => well.Title.Font;
set => well.Title.Font = value;
}
[XmlElement("Well")]
[Browsable(false)]
public SectionWell well {get; set; }
}
public class SectionWellTitle
{
[XmlAttribute("Height")]
public string Height { get; set; }
[XmlElement("Font")]
public WellFontEx Font { get; set; }
}
public class SectionWell
{
[XmlAttribute("ID")]
public int ID { get; set; }
[XmlAttribute("Name")]
public string Name { get; set; } = string.Empty;
[XmlAttribute("Category")]
public string Category { get; set; } = string.Empty;
[XmlAttribute("Offset")]
public double Offset { get; set; }
[XmlAttribute("BeginLevel")]
public double BeginLevel { get; set; }
[XmlAttribute("ShowDepth")]
public double ShowDepth { get; set; }
[XmlAttribute("Show")]
public bool Show { get; set; }
[XmlAttribute("Depth")]
public double Depth { get; set; }
[XmlAttribute("BushingLevel")]
public double BushingLevel { get; set; }
[XmlAttribute("TopDepth")]
public double TopDepth { get; set; }
[XmlAttribute("Length")]
public double Length { get; set; }
[XmlAttribute("X")]
public double X { get; set; }
[XmlAttribute("Y")]
public double Y { get; set; }
[XmlAttribute("HorizDistance")]
public double HorizDistance { get; set; }
[XmlAttribute("HeadHeight")]
public double HeadHeight { get; set; }
[XmlAttribute("TitleHeight")]
public double TitleHeight { get; set; }
[XmlAttribute("OutLeft")]
public double OutLeft { get; set; }
[XmlAttribute("OutRight")]
public double OutRight { get; set; }
[XmlAttribute("OutTop")]
public double OutTop { get; set; }
[XmlAttribute("OutBottom")]
public double OutBottom { get; set; }
[XmlAttribute("HideMode")]
public int HideMode { get; set; }
[XmlElement("Title")]
public SectionWellTitle Title { get; set; }
}
//public class WellTrackScale
//{
// [XmlAttribute("X")]
// public double X { get; set; }
// [XmlAttribute("Y")]
// public double Y { get; set; }
//}
//public class WellTrackMargin
//{
// [XmlAttribute("Top")]
// public string Top { get; set; }
// [XmlAttribute("Right")]
// public string Right { get; set; }
// [XmlAttribute("Bottom")]
// public string Bottom { get; set; }
// [XmlAttribute("Left")]
// public string Left { get; set; }
//}
//public class WellTrackStyles
//{
// [XmlAttribute("DepthScale")]
// public double DepthScale { get; set; }
// [XmlAttribute("DisplayScale")]
// public double DisplayScale { get; set; }
// [XmlAttribute("Top")]
// public double Top { get; set; }
// [XmlAttribute("Bottom")]
// public double Bottom { get; set; }
// [XmlElement("Title")]
// public WellTrackTitle Title { get; set; }
// [XmlElement("Grid")]
// public WellTrackGrid Grid { get; set; }
// [XmlElement("Border")]
// public WellLineStyle Border { get; set; }
// [XmlElement("SplitLine")]
// public WellLineStyle SplitLine { get; set; }
// [XmlElement("Track")]
// public WellTrackTrack Track { 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
}