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
using FLY.Thick.RemoteHistory;
using FObjBase;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FLY.IntegratedControl.Common
{
public class FlyData_IBCCtrl : IFlyData,INotifyPropertyChanged
{
/// <summary>
/// 时间点
/// </summary>
public DateTime Time { get; set; }
/// <summary>
/// 折径显示(mm)
/// </summary>
public float FilmWidth { get; set; }
/// <summary>
/// 进风运行频率(Hz)(自动调节)
/// </summary>
public float InletAirFreq { get; set; }
/// <summary>
/// 出风运行频率(Hz)(手动调节)
/// </summary>
public float OutletAirFreq { get; set; }
/// <summary>
/// 进风-出风
/// </summary>
public float DFreq {
get {
return InletAirFreq - OutletAirFreq;
}
}
public event PropertyChangedEventHandler PropertyChanged;
#region IFlyData
public string GetHeader()
{
string header = "时间";
header += ",折径(mm)";
header += ",进风频率";
header += ",出风频率";
return header;
}
public override string ToString()
{
string str;
str = Time.ToString();//时间
str += "," + FilmWidth.ToString("F1");//折径(mm)
str += "," + InletAirFreq.ToString("F1");//进风频率
str += "," + OutletAirFreq.ToString("F1");//出风频率
return str;
}
public bool TryParse(string header_str, string str)
{
string[] items = header_str.Split(new char[] { ',' });
if (items.Length < 4)
return false;
items = str.Split(new char[] { ',' });
if (items.Length < 4)
return false;
int idx = 0;
DateTime t;
float f;
//时间
if (!DateTime.TryParse(items[idx], out t))
return false;
Time = t;
idx++;
//折径(mm)
if (!float.TryParse(items[idx], out f))
return false;
FilmWidth = f;
idx++;
//进风频率
if (!float.TryParse(items[idx], out f))
return false;
InletAirFreq = f;
idx++;
//出风频率
if (!float.TryParse(items[idx], out f))
return false;
OutletAirFreq = f;
idx++;
return true;
}
#endregion
}
}