using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using System.ComponentModel;
|
using SqlSugar;
|
namespace XImagingXhandler.XDAL
|
{
|
/// <summary>
|
/// 菌实体类
|
/// </summary>
|
[SugarTable("bacteria")]
|
public class Bacteria:INotifyPropertyChanged
|
{
|
/// <summary>
|
/// 属性变化事件对象
|
/// </summary>
|
public event PropertyChangedEventHandler PropertyChanged;
|
// Required
|
private string _bacteria_id;
|
/// <summary>
|
/// 菌ID
|
/// </summary>
|
[SugarColumn(ColumnName = "bacteria_id", IsPrimaryKey =true)]
|
public string bacteria_id
|
{
|
get { return _bacteria_id; }
|
set
|
{
|
_bacteria_id = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bacteria_id)));
|
}
|
}
|
}
|
|
private string _bacteria_name;
|
/// <summary>
|
/// 菌落名称
|
/// </summary>
|
[SugarColumn(ColumnName = "bacteria_name")]
|
public string bacteria_name
|
{
|
get { return _bacteria_name; }
|
set
|
{
|
_bacteria_name = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bacteria_name)));
|
}
|
}
|
}
|
|
private string _bacteria_content;
|
/// <summary>
|
/// 菌落描述
|
/// </summary>
|
[SugarColumn(ColumnName = "bacteria_content")]
|
public string bacteria_content
|
{
|
get { return _bacteria_content; }
|
set
|
{
|
_bacteria_content = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bacteria_content)));
|
}
|
}
|
}
|
|
private string _bacteria_picture;
|
/// <summary>
|
/// 菌图片
|
/// </summary>
|
[SugarColumn(ColumnName = "bacteria_picture")]
|
public string bacteria_picture
|
{
|
get { return _bacteria_picture; }
|
set
|
{
|
_bacteria_picture = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bacteria_picture)));
|
}
|
}
|
}
|
|
private string _bacteria_shape;
|
/// <summary>
|
/// 菌落形状
|
/// </summary>
|
[SugarColumn(ColumnName = "bacteria_shape")]
|
public string bacteria_shape
|
{
|
get { return _bacteria_shape; }
|
set
|
{
|
_bacteria_shape = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bacteria_shape)));
|
}
|
}
|
}
|
|
private string _bacteria_edge;
|
/// <summary>
|
/// 菌落边缘
|
/// </summary>
|
[SugarColumn(ColumnName = "bacteria_edge")]
|
public string bacteria_edge
|
{
|
get { return _bacteria_edge; }
|
set
|
{
|
_bacteria_edge = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bacteria_edge)));
|
}
|
}
|
}
|
|
private double _bacteria_min_size;
|
/// <summary>
|
/// 最小直径(毫米)
|
/// </summary>
|
[SugarColumn(ColumnName = "bacteria_min_size")]
|
public double bacteria_min_size
|
{
|
get { return _bacteria_min_size; }
|
set
|
{
|
_bacteria_min_size = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bacteria_min_size)));
|
}
|
}
|
}
|
|
private double _bacteria_max_size;
|
/// <summary>
|
/// 最大直径(毫米)
|
/// </summary>
|
[SugarColumn(ColumnName = "bacteria_max_size")]
|
public double bacteria_max_size
|
{
|
get { return _bacteria_max_size; }
|
set
|
{
|
_bacteria_max_size = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bacteria_max_size)));
|
}
|
}
|
}
|
|
private string _bacteria_color;
|
/// <summary>
|
/// 菌颜色(逗号分割值)
|
/// </summary>
|
[SugarColumn(ColumnName = "bacteria_color")]
|
public string bacteria_color
|
{
|
get { return _bacteria_color; }
|
set
|
{
|
_bacteria_color = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bacteria_color)));
|
}
|
}
|
}
|
|
private string _bacteria_base_color;
|
/// <summary>
|
/// 菌基底颜色(逗号分割值)
|
/// </summary>
|
[SugarColumn(ColumnName = "bacteria_base_color")]
|
public string bacteria_base_color
|
{
|
get { return _bacteria_base_color; }
|
set
|
{
|
_bacteria_base_color = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bacteria_base_color)));
|
}
|
}
|
}
|
|
private int _choice_mode;
|
/// <summary>
|
/// 挑选方式(1:点;2:戳)
|
/// </summary>
|
[SugarColumn(ColumnName = "choice_mode")]
|
public int choice_mode
|
{
|
get { return _choice_mode; }
|
set
|
{
|
_choice_mode = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(choice_mode)));
|
}
|
}
|
}
|
|
private int _choice_position;
|
/// <summary>
|
/// 挑菌位置(1:离皿底距离;2:离菌表面)
|
/// </summary>
|
[SugarColumn(ColumnName = "choice_position")]
|
public int choice_position
|
{
|
get { return _choice_position; }
|
set
|
{
|
_choice_position = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(choice_position)));
|
}
|
}
|
}
|
|
private double _choice_position_distance;
|
/// <summary>
|
/// 挑菌位置距离(毫米)
|
/// </summary>
|
[SugarColumn(ColumnName = "choice_position_distance")]
|
public double choice_position_distance
|
{
|
get { return _choice_position_distance; }
|
set
|
{
|
_choice_position_distance = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(choice_position_distance)));
|
}
|
}
|
}
|
|
private double _choice_xaxis_distance;
|
/// <summary>
|
/// 挑菌x轴偏移距离(毫米)
|
/// </summary>
|
[SugarColumn(ColumnName = "choice_xaxis_distance")]
|
public double choice_xaxis_distance
|
{
|
get { return _choice_xaxis_distance; }
|
set
|
{
|
_choice_xaxis_distance = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(choice_xaxis_distance)));
|
}
|
}
|
}
|
|
private double _choice_yaxis_distance;
|
/// <summary>
|
/// 挑菌y轴偏移距离(毫米)
|
/// </summary>
|
[SugarColumn(ColumnName = "choice_yaxis_distance")]
|
public double choice_yaxis_distance
|
{
|
get { return _choice_yaxis_distance; }
|
set
|
{
|
_choice_yaxis_distance = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(choice_yaxis_distance)));
|
}
|
}
|
}
|
|
private double _coating_position_distance;
|
/// <summary>
|
/// 涂布位置离皿底距离
|
/// </summary>
|
[SugarColumn(ColumnName = "coating_position_distance")]
|
public double coating_position_distance
|
{
|
get { return _coating_position_distance; }
|
set
|
{
|
_coating_position_distance = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(coating_position_distance)));
|
}
|
}
|
}
|
|
private double _coating_xaxis_distance;
|
/// <summary>
|
/// 涂布x轴偏移孔中心距离(毫米)
|
/// </summary>
|
[SugarColumn(ColumnName = "coating_xaxis_distance")]
|
public double coating_xaxis_distance
|
{
|
get { return _coating_xaxis_distance; }
|
set
|
{
|
_coating_xaxis_distance = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(coating_xaxis_distance)));
|
}
|
}
|
}
|
|
private double _coating_yaxis_distance;
|
/// <summary>
|
/// 涂布y轴偏移孔中心距离(毫米)
|
/// </summary>
|
[SugarColumn(ColumnName = "coating_yaxis_distance")]
|
public double coating_yaxis_distance
|
{
|
get { return _coating_yaxis_distance; }
|
set
|
{
|
_coating_yaxis_distance = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(coating_yaxis_distance)));
|
}
|
}
|
}
|
|
private int _bacteria_status;
|
/// <summary>
|
/// 1:可用菌;0:已删除菌
|
/// </summary>
|
[SugarColumn(ColumnName = "bacteria_status")]
|
public int bacteria_status
|
{
|
get { return _bacteria_status; }
|
set
|
{
|
_bacteria_status = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bacteria_status)));
|
}
|
}
|
}
|
|
private DateTime _timestamp;
|
/// <summary>
|
/// 数据行更新时间
|
/// </summary>
|
[SugarColumn(ColumnName = "timestamp")]
|
public DateTime timestamp
|
{
|
get { return _timestamp; }
|
set
|
{
|
_timestamp = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(timestamp)));
|
}
|
}
|
}
|
|
private int _is_default_type;
|
/// <summary>
|
/// 1:默认类型;0:自定义类型
|
/// </summary>
|
[SugarColumn(ColumnName = "is_default_type")]
|
public int is_default_type
|
{
|
get { return _is_default_type; }
|
set
|
{
|
_is_default_type = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(is_default_type)));
|
}
|
}
|
}
|
|
private int _model_type;
|
/// <summary>
|
/// 模型类型:1:算法1;2:算法2
|
/// </summary>
|
[SugarColumn(ColumnName = "model_type")]
|
public int model_type
|
{
|
get { return _model_type; }
|
set
|
{
|
_model_type = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(model_type)));
|
}
|
}
|
}
|
|
private string _merge_masks;
|
/// <summary>
|
/// 是否合并识别:true;false
|
/// </summary>
|
[SugarColumn(ColumnName = "merge_masks")]
|
public string merge_masks
|
{
|
get { return _merge_masks; }
|
set
|
{
|
_merge_masks = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(merge_masks)));
|
}
|
}
|
}
|
|
private double _ds_ratio;
|
/// <summary>
|
/// 降采样率
|
/// </summary>
|
[SugarColumn(ColumnName = "ds_ratio")]
|
public double ds_ratio
|
{
|
get { return _ds_ratio; }
|
set
|
{
|
_ds_ratio = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(ds_ratio)));
|
}
|
}
|
}
|
|
private double _mean_diam;
|
/// <summary>
|
/// 平均直径
|
/// </summary>
|
[SugarColumn(ColumnName = "mean_diam")]
|
public double mean_diam
|
{
|
get { return _mean_diam; }
|
set
|
{
|
_mean_diam = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(mean_diam)));
|
}
|
}
|
}
|
|
private double _dist_to_edge;
|
/// <summary>
|
/// 到边缘距离
|
/// </summary>
|
[SugarColumn(ColumnName = "dist_to_edge")]
|
public double dist_to_edge
|
{
|
get { return _dist_to_edge; }
|
set
|
{
|
_dist_to_edge = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(dist_to_edge)));
|
}
|
}
|
}
|
|
private string _mark_color;
|
/// <summary>
|
/// 菌标记颜色
|
/// </summary>
|
[SugarColumn(ColumnName = "mark_color")]
|
public string mark_color
|
{
|
get { return _mark_color; }
|
set
|
{
|
_mark_color = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(mark_color)));
|
}
|
}
|
}
|
|
private string _draw_label;
|
/// <summary>
|
/// 菌标记序号
|
/// </summary>
|
[SugarColumn(ColumnName = "draw_label")]
|
public string draw_label
|
{
|
get { return _draw_label; }
|
set
|
{
|
_draw_label = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(draw_label)));
|
}
|
}
|
}
|
|
private string _fontsize = "0";
|
/// <summary>
|
/// 菌标记字体大小
|
/// </summary>
|
[SugarColumn(ColumnName = "fontsize")]
|
public string fontsize
|
{
|
get { return _fontsize; }
|
set
|
{
|
_fontsize = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(fontsize)));
|
}
|
}
|
}
|
|
private double _top_light;
|
/// <summary>
|
/// 顶部背光亮度
|
/// </summary>
|
[SugarColumn(ColumnName = "top_light")]
|
public double top_light
|
{
|
get { return _top_light; }
|
set
|
{
|
_top_light = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(top_light)));
|
}
|
}
|
}
|
|
private double _bottom_light;
|
/// <summary>
|
/// 底部背光亮度
|
/// </summary>
|
[SugarColumn(ColumnName = "bottom_light")]
|
public double bottom_light
|
{
|
get { return _bottom_light; }
|
set
|
{
|
_bottom_light = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(bottom_light)));
|
}
|
}
|
}
|
|
private double _press_distance=0d;
|
/// <summary>
|
/// 挑菌时下压距离
|
/// </summary>
|
[SugarColumn(ColumnName = "press_distance")]
|
public double press_distance
|
{
|
get { return _press_distance; }
|
set
|
{
|
_press_distance = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(press_distance)));
|
}
|
}
|
}
|
|
/// <summary>
|
/// 通道1:0-灰;1-红;2-绿;3-蓝
|
/// </summary>
|
private int _chanel1_color = 0;
|
[SugarColumn(ColumnName = "chanel1_color")]
|
public int chanel1_color
|
{
|
get { return _chanel1_color; }
|
set
|
{
|
_chanel1_color = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(chanel1_color)));
|
}
|
}
|
}
|
|
/// <summary>
|
/// 通道2:0-灰;1-红;2-绿;3-蓝
|
/// </summary>
|
private int _chanel2_color = 0;
|
[SugarColumn(ColumnName = "chanel2_color")]
|
public int chanel2_color
|
{
|
get { return _chanel2_color; }
|
set
|
{
|
_chanel2_color = value;
|
if (PropertyChanged != null)
|
{
|
PropertyChanged(this, new PropertyChangedEventArgs(nameof(chanel2_color)));
|
}
|
}
|
}
|
|
/// <summary>
|
/// 拷贝对象
|
/// </summary>
|
/// <param name="b">待拷贝的菌落对象</param>
|
public void Copy(Bacteria b)
|
{
|
bacteria_id = b.bacteria_id;
|
bacteria_name = b.bacteria_name;
|
bacteria_content = b.bacteria_content;
|
bacteria_picture = b.bacteria_picture;
|
bacteria_shape = b.bacteria_shape;
|
bacteria_edge = b.bacteria_edge;
|
bacteria_base_color = b.bacteria_base_color;
|
bacteria_color = b.bacteria_color;
|
bacteria_min_size = b.bacteria_min_size;
|
bacteria_max_size = b.bacteria_max_size;
|
choice_mode = b.choice_mode;
|
choice_position = b.choice_position;
|
choice_position_distance = b.choice_position_distance;
|
choice_xaxis_distance = b.choice_xaxis_distance;
|
choice_yaxis_distance = b.choice_yaxis_distance;
|
coating_position_distance = b.coating_position_distance;
|
coating_xaxis_distance = b.coating_xaxis_distance;
|
coating_yaxis_distance = b.coating_yaxis_distance;
|
bacteria_status = b.bacteria_status;
|
timestamp = b.timestamp;
|
is_default_type = b.is_default_type;
|
model_type=b.model_type;
|
merge_masks= b.merge_masks;
|
ds_ratio= b.ds_ratio;
|
mean_diam=b.mean_diam;
|
dist_to_edge= b.dist_to_edge;
|
mark_color = b.mark_color;
|
draw_label= b.draw_label;
|
fontsize= b.fontsize;
|
top_light= b.top_light;
|
bottom_light= b.bottom_light;
|
press_distance = b.press_distance;
|
chanel1_color = b.chanel1_color;
|
chanel2_color = b.chanel2_color;
|
}
|
}
|
}
|