|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
|
using System.Drawing.Design;
|
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
using GeoSigma.SigmaDrawerStyle;
|
|
|
|
|
|
using GeoSigma.SigmaDrawerStyle.Converter;
|
|
|
|
|
|
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 WellDepthTrack
|
|
|
|
|
|
{
|
|
|
|
|
|
private const string DepthTrackCategory = "\t\t\t深度道";
|
|
|
|
|
|
private const string TrickCategory = "\t\t刻度";
|
|
|
|
|
|
private const string MarkCategory = "\t标注";
|
|
|
|
|
|
|
|
|
|
|
|
// 深度道设置
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(DepthTrackCategory)]
|
|
|
|
|
|
[DisplayName("标题")]
|
|
|
|
|
|
[PropertyOrder(0)]
|
|
|
|
|
|
public string Title
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.Title.Font.Text;
|
|
|
|
|
|
set => WellTrack.Title.Font.Text = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(DepthTrackCategory)]
|
|
|
|
|
|
[DisplayName("宽度")]
|
|
|
|
|
|
[PropertyOrder(1)]
|
|
|
|
|
|
public double Width
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.Width;
|
|
|
|
|
|
set => WellTrack.Width = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(DepthTrackCategory)]
|
|
|
|
|
|
[DisplayName("道头字体")]
|
|
|
|
|
|
[PropertyOrder(4)]
|
|
|
|
|
|
[Editor(typeof(PropertyEditorWellFontEx), typeof(UITypeEditor))]
|
|
|
|
|
|
public WellFontEx HeaderFont
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.Title.Font;
|
|
|
|
|
|
set => WellTrack.Title.Font = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 刻度设置
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(TrickCategory)]
|
|
|
|
|
|
[DisplayName("显示海拔刻度")]
|
|
|
|
|
|
[PropertyOrder(10)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool ShowElevationTick
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.GridVertDepth;
|
|
|
|
|
|
set => WellTrack.GridVertDepth = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(TrickCategory)]
|
|
|
|
|
|
[DisplayName("刻度居左")]
|
|
|
|
|
|
[PropertyOrder(11)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool TickLeft
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.Calibration.Major.Style == "Left";
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
WellTrack.Calibration.Major.Style = value ? "Left" : "Right";
|
|
|
|
|
|
WellTrack.Calibration.Minor.Style = value ? "Left" : "Right";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(TrickCategory)]
|
|
|
|
|
|
[DisplayName("英制单位")]
|
|
|
|
|
|
[PropertyOrder(12)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool ImperialUnit
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.GridUnit == "Feet";
|
|
|
|
|
|
set => WellTrack.GridUnit = value ? "Feet" : "Meter";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(TrickCategory)]
|
|
|
|
|
|
[DisplayName("主刻度")]
|
|
|
|
|
|
[PropertyOrder(13)]
|
|
|
|
|
|
public double MajorTick
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.GridStyle.MajorSpace;
|
|
|
|
|
|
set => WellTrack.GridStyle.MajorSpace = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(TrickCategory)]
|
|
|
|
|
|
[DisplayName("副刻度")]
|
|
|
|
|
|
[PropertyOrder(14)]
|
|
|
|
|
|
public double MinorTick
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.GridStyle.MinorSpace;
|
|
|
|
|
|
set => WellTrack.GridStyle.MinorSpace = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(TrickCategory)]
|
|
|
|
|
|
[DisplayName("主刻度宽度")]
|
|
|
|
|
|
[PropertyOrder(15)]
|
|
|
|
|
|
public double MajorTickWidth
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.Calibration.Major.Width;
|
|
|
|
|
|
set => WellTrack.Calibration.Major.Width = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(TrickCategory)]
|
|
|
|
|
|
[DisplayName("副刻度宽度")]
|
|
|
|
|
|
[PropertyOrder(16)]
|
|
|
|
|
|
public double MinorTickWidth
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.Calibration.Minor.Width;
|
|
|
|
|
|
set => WellTrack.Calibration.Minor.Width = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(TrickCategory)]
|
|
|
|
|
|
[DisplayName("主刻度线")]
|
|
|
|
|
|
[PropertyOrder(17)]
|
|
|
|
|
|
[Editor(typeof(PropertyEditorWellCurveStyle), typeof(UITypeEditor))]
|
|
|
|
|
|
public WellLineStyle MajorTickLine { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(TrickCategory)]
|
|
|
|
|
|
[DisplayName("次刻度线")]
|
|
|
|
|
|
[PropertyOrder(18)]
|
|
|
|
|
|
[Editor(typeof(PropertyEditorWellCurveStyle), typeof(UITypeEditor))]
|
|
|
|
|
|
public WellLineStyle MinorTickLine { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(TrickCategory)]
|
|
|
|
|
|
[DisplayName("刻度字体")]
|
|
|
|
|
|
[PropertyOrder(19)]
|
|
|
|
|
|
[Editor(typeof(PropertyEditorWellFontEx), typeof(UITypeEditor))]
|
|
|
|
|
|
public WellFontEx TickFont
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
var calib = WellTrack.Calibration;
|
|
|
|
|
|
var font = new Font(calib.TextFace, calib.TextSize);
|
|
|
|
|
|
var fontEx = WellFontEx.FromFont(font);
|
|
|
|
|
|
fontEx.FontColor = ColorTranslator2.FromHtml(calib.TextColor);
|
|
|
|
|
|
|
|
|
|
|
|
return fontEx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
var calib = WellTrack.Calibration;
|
|
|
|
|
|
calib.TextFace = value.FontName;
|
|
|
|
|
|
calib.TextSize = value.Height;
|
|
|
|
|
|
calib.TextColor = ColorTranslator2.ToHtml(value.FontColor);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 标注设置
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(MarkCategory)]
|
|
|
|
|
|
[DisplayName("显示深度单位")]
|
|
|
|
|
|
[PropertyOrder(30)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool IsShowDepthUnit
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.ShowLabelUnit;
|
|
|
|
|
|
set => WellTrack.ShowLabelUnit = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(MarkCategory)]
|
|
|
|
|
|
[DisplayName("垂直显示标注")]
|
|
|
|
|
|
[PropertyOrder(31)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool VerticalLabel
|
|
|
|
|
|
{
|
|
|
|
|
|
get => WellTrack.Calibration.TextHorzVert == "Vertical";
|
|
|
|
|
|
set => WellTrack.Calibration.TextHorzVert = value ? "Vertical" : "Horizonal";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("Version")]
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public int Version { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlElement("WellTrack")]
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public WellTrackWellTrack WellTrack { 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
|
|
|
|
|
|
}
|