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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
using System.ComponentModel ;
namespace KepGridEditor
{
public class PointData : INotifyPropertyChanged
{
private double _x ;
private double _y ;
[DisplayName("名称")]
public string Name { get ; set ; }
[DisplayName("是否虚拟点")]
public bool IsVirtual { get ; set ; }
[DisplayName("X (图值)")]
public double X
{
get = > _x ;
set { _x = value ; OnPropertyChanged ( nameof ( X ) ) ; }
}
[DisplayName("Y (井值)")]
public double Y
{
get = > _y ;
set { _y = value ; OnPropertyChanged ( nameof ( Y ) ) ; }
}
public event PropertyChangedEventHandler PropertyChanged ;
protected void OnPropertyChanged ( string name ) = > PropertyChanged ? . Invoke ( this , new PropertyChangedEventArgs ( name ) ) ;
}
public class WellPointData : INotifyPropertyChanged
{
private string _name ;
// 空间坐标
private double _x ;
private double _y ;
// 属性值
private double _z ;
private double _tz ;
[DisplayName("井名")]
public string Name
{
get = > _name ;
set { _name = value ; OnPropertyChanged ( nameof ( Name ) ) ; }
}
// ==========================================
// 1. 空间坐标 (用于 FormWellAdjustSetting 显示位置)
// ==========================================
[DisplayName("X坐标")]
public double X
{
get = > _x ;
set { _x = value ; OnPropertyChanged ( nameof ( X ) ) ; }
}
[DisplayName("Y坐标")]
public double Y
{
get = > _y ;
set { _y = value ; OnPropertyChanged ( nameof ( Y ) ) ; }
}
[DisplayName("Z")]
public double Z
{
get = > _z ;
set
{
_z = value ;
OnPropertyChanged ( nameof ( Z ) ) ;
OnPropertyChanged ( nameof ( Error ) ) ; // Z变了, 误差也要变
}
}
[DisplayName("图Z")]
public double TZ
{
get = > _tz ;
set
{
_tz = value ;
OnPropertyChanged ( nameof ( TZ ) ) ;
OnPropertyChanged ( nameof ( Error ) ) ; // TZ变了, 误差也要变
}
}
[DisplayName("误差")]
public double Error = > Z - TZ ;
public event PropertyChangedEventHandler PropertyChanged ;
protected void OnPropertyChanged ( string name ) = > PropertyChanged ? . Invoke ( this , new PropertyChangedEventArgs ( name ) ) ;
}
}