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
using LiveCharts;
using LiveCharts.Wpf;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
namespace FLY.Thick.Base.UI
{
class SeriesInfo : INotifyPropertyChanged
{
/// <summary>
/// 显示的标题,肯定是 0,1,2,3,4,5.。。。
/// </summary>
public string Title { get; set; }
/// <summary>
/// 是反向数据
/// </summary>
public bool? IsBackw { get; set; }
public string Header
{
get {
if (IsBackw == null)
return Title;
else
{
if (IsBackw == false)
return $"{Title} 正";
else
return $"{Title} 反";
}
}
}
/// <summary>
/// 颜色
/// </summary>
public Brush Fill { get; set; }
/// <summary>
/// 当前被选中
/// </summary>
public bool IsSelected { get; set; }
/// <summary>
/// 对应的曲线
/// </summary>
public LineSeries Series { get; set; }
/// <summary>
/// 测量区平均值
/// </summary>
public double Avg { get; set; } = double.NaN;
/// <summary>
/// 当非AD值模式时,显示的厚度值
/// </summary>
public ChartValues<double> Thicks { get; } = new ChartValues<double>();
/// <summary>
/// 当为AD值模式时,显示的AD值
/// </summary>
public ChartValues<double> ADs { get; } = new ChartValues<double>();
public void Clear()
{
Thicks.Clear();
ADs.Clear();
Avg = double.NaN;
IsBackw = null;
}
public event PropertyChangedEventHandler PropertyChanged;
}
}