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 /// /// 射孔道 /// [XmlRoot("Pcg")] [TypeConverter(typeof(PropertySorter))] public class WellInTracFluidProducingProfile :baseInTrackObj { private static Dictionary AlignMap = new Dictionary() { { 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 FluidProducting { get => WellTestLayer.FluidProducting; set => WellTestLayer.FluidProducting = value; } [XmlIgnore] [Category(ShotTrackCategory)] [DisplayName("产油量")] [PropertyOrder(6)] public double OilProducting { get => WellTestLayer.OilProducting; set => WellTestLayer.OilProducting = value; } [XmlIgnore] [Category(ShotTrackCategory)] [DisplayName("产水量")] [PropertyOrder(7)] public double WaterProducting { get => WellTestLayer.WaterProducting; set => WellTestLayer.WaterProducting = value; } [XmlIgnore] [Category(ShotTrackCategory)] [DisplayName("产气量")] [PropertyOrder(8)] public double GasProducting { get => WellTestLayer.GasProducting; set => WellTestLayer.GasProducting = value; } [XmlIgnore] [Category(ShotTrackCategory)] [DisplayName("结论")] [PropertyOrder(9)] public string result { get => WellTestLayer.ProductingResult; set => WellTestLayer.ProductingResult = value; } [XmlAttribute] [Browsable(false)] public int Version { get; set; } [XmlElement("WellFluidProducingLayer")] [Browsable(false)] public WellFluidProducingLayer 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 WellFluidProducingLayer { [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("FluidProducting")] public double FluidProducting { get; set; } [XmlAttribute("GasProducting")] public double GasProducting { get; set; } [XmlAttribute("OilProducting")] public double OilProducting { get; set; } [XmlAttribute("WaterProducting")] public double WaterProducting { get; set; } [XmlAttribute("ProductingResult")] public string ProductingResult { get; set; } [XmlElement("Font")] public WellFontEx font { get; set; } [XmlElement("RenderStyle")] public FluidProducingRenderStyle RenderStyle { get; set; } } public class FluidProducingRenderStyle { [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; } } }