|
|
|
|
|
// <copyright file="AverageMethodFirstProperty.cs" company="PlaceholderCompany">
|
|
|
|
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
|
|
|
|
// </copyright>
|
|
|
|
|
|
|
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Xml;
|
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace GeoSigma.SigmaDrawerStyle
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 平均角法
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class AverageMethodFirstProperty : IPropertyFileImport
|
|
|
|
|
|
{
|
|
|
|
|
|
private IRectangularCSGridPropertyChange iChange;
|
|
|
|
|
|
private string horizon = "无";
|
|
|
|
|
|
private string x = "无";
|
|
|
|
|
|
private string y = "无";
|
|
|
|
|
|
private string averageFirstName = "无";
|
|
|
|
|
|
private string inclinationAngle = "无";
|
|
|
|
|
|
private string azimuth = "无";
|
|
|
|
|
|
private string obliqueDepth = "无";
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Initializes a new instance of the <see cref="AverageMethodFirstProperty"/> class.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public AverageMethodFirstProperty()
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Initializes a new instance of the <see cref="AverageMethodFirstProperty"/> class.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="iChange">iChange</param>
|
|
|
|
|
|
public AverageMethodFirstProperty(IRectangularCSGridPropertyChange iChange)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// ColumnLength
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public string ColumnLength
|
|
|
|
|
|
{
|
|
|
|
|
|
get;
|
|
|
|
|
|
set;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 水平角
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Category("\t属性"), DisplayName("\t\t\t\t\t\t层位"), Description("需要:井口坐标、斜深、井斜角、方位角")]
|
|
|
|
|
|
[TypeConverter(typeof(Converter.AverageMethodFirstColumnCorrespondConvert))]
|
|
|
|
|
|
public string Horizon
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return horizon;
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
horizon = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// X
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Category("\t属性"), DisplayName("\t\t\t\t\tX"), Description("需要:井口坐标、斜深、井斜角、方位角")]
|
|
|
|
|
|
[TypeConverter(typeof(Converter.AverageMethodFirstColumnCorrespondConvert))]
|
|
|
|
|
|
public string X
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return x;
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
x = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Y
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Category("\t属性"), DisplayName("\t\t\t\tY"), Description("需要:井口坐标、斜深、井斜角、方位角")]
|
|
|
|
|
|
[TypeConverter(typeof(Converter.AverageMethodFirstColumnCorrespondConvert))]
|
|
|
|
|
|
public string Y
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return y;
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
y = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 名称
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Category("\t属性"), DisplayName("\t\t\t名称"), Description("需要:井口坐标、斜深、井斜角、方位角")]
|
|
|
|
|
|
[TypeConverter(typeof(Converter.AverageMethodFirstColumnCorrespondConvert))]
|
|
|
|
|
|
public string AverageFirstName
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return averageFirstName;
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
averageFirstName = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 井斜角
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Category("\t属性"), DisplayName("\t\t井斜角"), Description("需要:井口坐标、斜深、井斜角、方位角")]
|
|
|
|
|
|
[TypeConverter(typeof(Converter.AverageMethodFirstColumnCorrespondConvert))]
|
|
|
|
|
|
public string WellInclinationAngle
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return inclinationAngle;
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
inclinationAngle = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 方位角
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Category("\t属性"), DisplayName("\t方位角"), Description("需要:井口坐标、斜深、井斜角、方位角")]
|
|
|
|
|
|
[TypeConverter(typeof(Converter.AverageMethodFirstColumnCorrespondConvert))]
|
|
|
|
|
|
public string Azimuth
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return azimuth;
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
azimuth = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 斜深
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Category("\t属性"), DisplayName("斜深"), Description("需要:井口坐标、斜深、井斜角、方位角")]
|
|
|
|
|
|
[TypeConverter(typeof(Converter.AverageMethodFirstColumnCorrespondConvert))]
|
|
|
|
|
|
public string ObliqueDepth
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return obliqueDepth;
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
obliqueDepth = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 输出Xml数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns>数据字符串</returns>
|
|
|
|
|
|
public string SerialXml()
|
|
|
|
|
|
{
|
|
|
|
|
|
string strData = string.Empty;
|
|
|
|
|
|
XmlWriterSettings settings = new XmlWriterSettings();
|
|
|
|
|
|
settings.Indent = true;
|
|
|
|
|
|
settings.IndentChars = " ";
|
|
|
|
|
|
settings.NewLineChars = "\r\n";
|
|
|
|
|
|
settings.Encoding = Encoding.Default;
|
|
|
|
|
|
// 去除xml声明
|
|
|
|
|
|
settings.OmitXmlDeclaration = true;
|
|
|
|
|
|
System.IO.MemoryStream mem = new MemoryStream();
|
|
|
|
|
|
using (XmlWriter writer = XmlWriter.Create(mem, settings))
|
|
|
|
|
|
{
|
|
|
|
|
|
// 去除默认命名空间xmlns:xsd和xmlns:xsi
|
|
|
|
|
|
XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
|
|
|
|
|
|
ns.Add(string.Empty, string.Empty);
|
|
|
|
|
|
XmlSerializer formatter = new XmlSerializer(this.GetType());
|
|
|
|
|
|
formatter.Serialize(writer, this, ns);
|
|
|
|
|
|
}
|
|
|
|
|
|
return Encoding.Default.GetString(mem.ToArray());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|