schangxiang@126.com
2025-11-04 f5ed29dc26c7cd952d56ec5721a2efc43cd25992
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
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;
        }
    }
}