|
|
|
|
|
using System;
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
//bend对象映射类
|
|
|
|
|
|
|
|
|
|
|
|
[XmlRoot("Pcg")]
|
|
|
|
|
|
[TypeConverter(typeof(PropertySorter))]
|
|
|
|
|
|
public class WellSectionFaultDataSetting
|
|
|
|
|
|
{
|
|
|
|
|
|
private const string labelCategory = "\t\t名称";
|
|
|
|
|
|
private const string setCategory = "\t\t\t\t设置";
|
|
|
|
|
|
private const string lineCategory = "\t\t\t线属性";
|
|
|
|
|
|
private const string throwCategory = "\t\t\t\t\t断距";
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(labelCategory)]
|
|
|
|
|
|
[DisplayName("断层名称")]
|
|
|
|
|
|
[PropertyOrder(0)]
|
|
|
|
|
|
public string Title
|
|
|
|
|
|
{
|
|
|
|
|
|
get => fault.Name;
|
|
|
|
|
|
set => fault.Name = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(lineCategory)]
|
|
|
|
|
|
[DisplayName("线属性")]
|
|
|
|
|
|
[PropertyOrder(1)]
|
|
|
|
|
|
[Editor(typeof(PropertyEditorWellCurveStyle), typeof(UITypeEditor))]
|
|
|
|
|
|
public WellLineStyle bendBottomLine
|
|
|
|
|
|
{
|
|
|
|
|
|
get => new WellLineStyle()
|
|
|
|
|
|
{
|
|
|
|
|
|
Width = fault.PenWidth,
|
|
|
|
|
|
Color = ColorTranslator2.FromHtml(fault.PenColor),
|
|
|
|
|
|
Style = "Solid",
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
fault.PenWidth = value.Width;
|
|
|
|
|
|
fault.PenColor = ColorTranslator2.ToHtml(value.Color);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(lineCategory)]
|
|
|
|
|
|
[DisplayName("曲线样式"), PropertyOrder(2)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool curveStyle
|
|
|
|
|
|
{
|
|
|
|
|
|
get => fault.ShowCurveStyle == 1;
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
if (value)
|
|
|
|
|
|
fault.ShowCurveStyle = 1;
|
|
|
|
|
|
else
|
|
|
|
|
|
fault.ShowCurveStyle = 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(setCategory)]
|
|
|
|
|
|
[DisplayName("切断左延伸层"), PropertyOrder(3)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool cutLeftExtent
|
|
|
|
|
|
{
|
|
|
|
|
|
get => fault.CutLeftExtend;
|
|
|
|
|
|
set => fault.CutLeftExtend = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(setCategory)]
|
|
|
|
|
|
[DisplayName("切断右延伸层"), PropertyOrder(4)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool cutRightExtent
|
|
|
|
|
|
{
|
|
|
|
|
|
get => fault.CutRightExtend;
|
|
|
|
|
|
set => fault.CutRightExtend = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(setCategory)]
|
|
|
|
|
|
[DisplayName("隐藏左侧连层"), PropertyOrder(5)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool hideLeftBends
|
|
|
|
|
|
{
|
|
|
|
|
|
get => fault.HideLeftBends;
|
|
|
|
|
|
set => fault.HideLeftBends = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(setCategory)]
|
|
|
|
|
|
[DisplayName("隐藏右侧连层"), PropertyOrder(6)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool hideRightBends
|
|
|
|
|
|
{
|
|
|
|
|
|
get => fault.HideRightBends;
|
|
|
|
|
|
set => fault.HideRightBends = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(setCategory)]
|
|
|
|
|
|
[DisplayName("封隔岩性及流体"), PropertyOrder(7)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool cutFluid
|
|
|
|
|
|
{
|
|
|
|
|
|
get => fault.CutFluid;
|
|
|
|
|
|
set => fault.CutFluid = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(setCategory)]
|
|
|
|
|
|
[DisplayName("显示左侧箭头"), PropertyOrder(8)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool showLeftArrow
|
|
|
|
|
|
{
|
|
|
|
|
|
get => fault.ShowLeftArrow;
|
|
|
|
|
|
set => fault.ShowLeftArrow = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(setCategory)]
|
|
|
|
|
|
[DisplayName("显示右侧箭头"), PropertyOrder(9)]
|
|
|
|
|
|
[TypeConverter(typeof(YesNoConverter))]
|
|
|
|
|
|
public bool showRightArrow
|
|
|
|
|
|
{
|
|
|
|
|
|
get => fault.ShowRightArrow;
|
|
|
|
|
|
set => fault.ShowRightArrow = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(throwCategory)]
|
|
|
|
|
|
[DisplayName("左侧断距")]
|
|
|
|
|
|
[PropertyOrder(10)]
|
|
|
|
|
|
public double leftThrow
|
|
|
|
|
|
{
|
|
|
|
|
|
get => fault.LeftThrow/2.0;
|
|
|
|
|
|
set => fault.LeftThrow = value*2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore]
|
|
|
|
|
|
[Category(throwCategory)]
|
|
|
|
|
|
[DisplayName("右侧断距")]
|
|
|
|
|
|
[PropertyOrder(11)]
|
|
|
|
|
|
public double rightThrow
|
|
|
|
|
|
{
|
|
|
|
|
|
get => fault.RightThrow/2.0;
|
|
|
|
|
|
set => fault.RightThrow = value*2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[XmlElement("Fault")]
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public Fault fault { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class Fault
|
|
|
|
|
|
{
|
|
|
|
|
|
[XmlAttribute("ID")]
|
|
|
|
|
|
public int ID { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("Name")]
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("LeftThrow")]
|
|
|
|
|
|
public double LeftThrow { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("RightThrow")]
|
|
|
|
|
|
public double RightThrow { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("CutLeftExtend")]
|
|
|
|
|
|
public bool CutLeftExtend { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("CutRightExtend")]
|
|
|
|
|
|
public bool CutRightExtend { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("CutFluid")]
|
|
|
|
|
|
public bool CutFluid { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("HideLeftBends")]
|
|
|
|
|
|
public bool HideLeftBends { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("HideRightBends")]
|
|
|
|
|
|
public bool HideRightBends { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("PenWidth")]
|
|
|
|
|
|
public double PenWidth { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("PenColor")]
|
|
|
|
|
|
public string PenColor { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("ShowLeftArrow")]
|
|
|
|
|
|
public bool ShowLeftArrow { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("ShowRightArrow")]
|
|
|
|
|
|
public bool ShowRightArrow { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("ShowCurveStyle")]
|
|
|
|
|
|
public int ShowCurveStyle { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlElement("FaultPoints")]
|
|
|
|
|
|
public FaultPoints FaultPoints { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class FaultPoints
|
|
|
|
|
|
{
|
|
|
|
|
|
[XmlElement("FaultPoint")]
|
|
|
|
|
|
public List<FaultPoint1> FaultPointList { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class FaultPoint1
|
|
|
|
|
|
{
|
|
|
|
|
|
[XmlAttribute("X")]
|
|
|
|
|
|
public double X { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("Y")]
|
|
|
|
|
|
public double Y { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|