84 lines
2.1 KiB
C#
84 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace GeologyToolkit
|
|
{
|
|
internal class Borehole
|
|
{
|
|
public string Coord => $"({X},{Y})";
|
|
public double Elev { get; set; }
|
|
|
|
public double X { get; set; }
|
|
|
|
public double Y { get; set; }
|
|
|
|
public List<SoilLayer> SoilLayers { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// 钻孔类型
|
|
/// </summary>
|
|
public string BoreholeType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 稳定水位
|
|
/// </summary>
|
|
public string StableWaterLine { get; set; }
|
|
|
|
/// <summary>
|
|
/// 稳定水位观测日期
|
|
/// </summary>
|
|
public string StableWaterLineDate { get; set; }
|
|
|
|
/// <summary>
|
|
/// 初见水位
|
|
/// </summary>
|
|
public string MeetWaterLine { get; set; }
|
|
|
|
/// <summary>
|
|
/// 初见水位观测日期
|
|
/// </summary>
|
|
public string MeetWaterLineDate { get; set; }
|
|
|
|
/// <summary>
|
|
/// 开工日期
|
|
/// </summary>
|
|
public string StartWorkDate { get; set; }
|
|
|
|
/// <summary>
|
|
/// 竣工日期
|
|
/// </summary>
|
|
public string EndWorkDate { get; set; }
|
|
|
|
/// <summary>
|
|
/// 勘探深度
|
|
/// </summary>
|
|
public string Depth { get; set; }
|
|
|
|
/// <summary>
|
|
/// 钻孔编号
|
|
/// </summary>
|
|
public string BoreholeNum { get; set; }
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (obj == null) //步骤1
|
|
return false;
|
|
if (GetType() != obj.GetType()) //步骤3
|
|
return false;
|
|
if (ReferenceEquals(this, obj))
|
|
return true;
|
|
if (BoreholeNum == ((Borehole)obj).BoreholeNum)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return Equals((Borehole)obj); //步骤4
|
|
//return base.Equals(obj);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return BoreholeNum != null ? StringComparer.InvariantCulture.GetHashCode(BoreholeNum) : 0;
|
|
}
|
|
}
|
|
} |