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.
164 lines
4.7 KiB
C#
164 lines
4.7 KiB
C#
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Drawing.Design;
|
|
using System.Windows.Forms;
|
|
using System.Windows.Forms.VisualStyles;
|
|
using System.Xml.Serialization;
|
|
using GeoSigma.SigmaDrawerStyle;
|
|
using GeoSigma.SigmaDrawerStyle.Converter;
|
|
using SigmaDrawerElement;
|
|
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 WellInTracWaterInjectionProfile : baseInTrackObj
|
|
{
|
|
private static Dictionary<HorizontalAlignment, string> AlignMap = new Dictionary<HorizontalAlignment, string>()
|
|
{
|
|
{ HorizontalAlignment.Left, "Left" },
|
|
{ HorizontalAlignment.Right, "Right" },
|
|
{ HorizontalAlignment.Center, "Center" },
|
|
};
|
|
|
|
private const string ShotTrackCategory = "\t\t设置吸水剖面数据";
|
|
|
|
[XmlIgnore]
|
|
[Category(ShotTrackCategory)]
|
|
[DisplayName("顶深")]
|
|
[PropertyOrder(0)]
|
|
public double TopDepth
|
|
{
|
|
get => WellTestLayer.Top;
|
|
set => WellTestLayer.Top = value;
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category(ShotTrackCategory)]
|
|
[DisplayName("底深")]
|
|
[PropertyOrder(1)]
|
|
public double BottomDepth
|
|
{
|
|
get => WellTestLayer.Bottom;
|
|
set => WellTestLayer.Bottom = value;
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category(ShotTrackCategory)]
|
|
[DisplayName("背景颜色")]
|
|
[PropertyOrder(2)]
|
|
[Editor(typeof(PropertyEditorColor), typeof(UITypeEditor))]
|
|
public Color BackgroundColor
|
|
{
|
|
get => ColorTranslator2.FromHtml(WellTestLayer.BackColor);
|
|
set => WellTestLayer.BackColor = ColorTranslator2.ToHtml(value);
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category(ShotTrackCategory)]
|
|
[DisplayName("字体")]
|
|
[PropertyOrder(3)]
|
|
[Editor(typeof(PropertyEditorWellFontEx), typeof(UITypeEditor))]
|
|
public WellFontEx HeaderFont
|
|
{
|
|
get => WellTestLayer.Font;
|
|
set => WellTestLayer.Font = value;
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category(ShotTrackCategory)]
|
|
[DisplayName("名称")]
|
|
[PropertyOrder(4)]
|
|
public string name
|
|
{
|
|
get => WellTestLayer.Name;
|
|
set => WellTestLayer.Name = value;
|
|
}
|
|
|
|
[XmlIgnore]
|
|
[Category(ShotTrackCategory)]
|
|
[DisplayName("绝对吸水量")]
|
|
[PropertyOrder(5)]
|
|
public double WaterProducting
|
|
{
|
|
get => WellTestLayer.Injection;
|
|
set => WellTestLayer.Injection = value;
|
|
}
|
|
|
|
[XmlAttribute]
|
|
[Browsable(false)]
|
|
public int Version { get; set; }
|
|
|
|
[XmlElement("WaterInjectionLayer")]
|
|
[Browsable(false)]
|
|
public WaterInjectionLayer WellTestLayer { 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
|
|
|
|
public class WaterInjectionLayer
|
|
{
|
|
[XmlAttribute("Name")]
|
|
public string Name { get; set; }
|
|
|
|
[XmlAttribute("Top")]
|
|
public double Top { get; set; }
|
|
|
|
[XmlAttribute("Bottom")]
|
|
public double Bottom { get; set; }
|
|
|
|
[XmlAttribute("BackColor")]
|
|
public string BackColor { get; set; }
|
|
|
|
[XmlAttribute("Align")]
|
|
public string Align { get; set; }
|
|
|
|
[XmlAttribute("Injection")]
|
|
public double Injection { get; set; }
|
|
|
|
[XmlElement("Font")]
|
|
public WellFontEx Font { get; set; }
|
|
|
|
[XmlElement("RenderStyle")]
|
|
public WaterInjectionRenderStyle RenderStyle { get; set; }
|
|
}
|
|
|
|
|
|
public class WaterInjectionRenderStyle
|
|
{
|
|
[XmlAttribute("Type")]
|
|
public string Type { get; set; }
|
|
|
|
[XmlAttribute("LeftSpace")]
|
|
public double LeftSpace { get; set; }
|
|
|
|
[XmlAttribute("RightSpace")]
|
|
public double RightSpace { get; set; }
|
|
|
|
[XmlAttribute("ShowDepthText")]
|
|
public string ShowDepthText { get; set; } // "False" or "True" as string
|
|
|
|
[XmlAttribute("HideUnit")]
|
|
public string HideUnit { get; set; } // "False" or "True"
|
|
|
|
[XmlAttribute("ShowTextOptions")]
|
|
public string ShowTextOptions { get; set; } // e.g., "RelativeInjection, AbsoluteInjection"
|
|
|
|
[XmlAttribute("TextLineAlign")]
|
|
public string TextLineAlign { get; set; }
|
|
}
|
|
|
|
|
|
}
|