|
|
@ -21,6 +21,7 @@ using System.Collections.ObjectModel; |
|
|
|
using DyeingComputer.Properties; |
|
|
|
using LiveChartsCore.Measure; |
|
|
|
using LiveChartsCore.Motion; |
|
|
|
using System.Windows.Documents; |
|
|
|
|
|
|
|
namespace DyeingComputer.ViewModel |
|
|
|
{ |
|
|
@ -104,18 +105,18 @@ namespace DyeingComputer.ViewModel |
|
|
|
//new AnimatableAxisBounds
|
|
|
|
}; |
|
|
|
|
|
|
|
private readonly Random _r = new Random(); |
|
|
|
private readonly ObservableCollection<DateTimePoint> MTT_values; |
|
|
|
private readonly ObservableCollection<DateTimePoint> MTL_values; |
|
|
|
private readonly ObservableCollection<DateTimePoint> MTH_values; |
|
|
|
private readonly ObservableCollection<DateTimePoint> MST_values; |
|
|
|
private readonly ObservableCollection<DateTimePoint> MUT_values; |
|
|
|
private readonly ObservableCollection<DateTimePoint> STTA_values; |
|
|
|
private readonly ObservableCollection<DateTimePoint> STLA_values; |
|
|
|
private readonly ObservableCollection<DateTimePoint> STTB_values; |
|
|
|
private readonly ObservableCollection<DateTimePoint> STLB_values; |
|
|
|
private readonly ObservableCollection<DateTimePoint> STTC_values; |
|
|
|
private readonly ObservableCollection<DateTimePoint> STLC_values; |
|
|
|
private Random _r = new Random(); |
|
|
|
private List<DateTimePoint> MTT_values; |
|
|
|
private List<DateTimePoint> MTL_values; |
|
|
|
private List<DateTimePoint> MTH_values; |
|
|
|
private List<DateTimePoint> MST_values; |
|
|
|
private List<DateTimePoint> MUT_values; |
|
|
|
private List<DateTimePoint> STTA_values; |
|
|
|
private List<DateTimePoint> STLA_values; |
|
|
|
private List<DateTimePoint> STTB_values; |
|
|
|
private List<DateTimePoint> STLB_values; |
|
|
|
private List<DateTimePoint> STTC_values; |
|
|
|
private List<DateTimePoint> STLC_values; |
|
|
|
|
|
|
|
private SQLiteHelper SQLiteHelpers = null; //定义数据库
|
|
|
|
private readonly string ChartAdress = Environment.CurrentDirectory + "\\DataBase\\Chart.db"; //数据库路径
|
|
|
@ -168,25 +169,25 @@ namespace DyeingComputer.ViewModel |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
MTT_values = new ObservableCollection<DateTimePoint>(MTT_items); |
|
|
|
MTL_values = new ObservableCollection<DateTimePoint>(MTL_items); |
|
|
|
MTH_values = new ObservableCollection<DateTimePoint>(MTH_items); |
|
|
|
MST_values = new ObservableCollection<DateTimePoint>(MST_items); |
|
|
|
MUT_values = new ObservableCollection<DateTimePoint>(MUT_items); |
|
|
|
MTT_values = new List<DateTimePoint>(MTT_items); |
|
|
|
MTL_values = new List<DateTimePoint>(MTL_items); |
|
|
|
MTH_values = new List<DateTimePoint>(MTH_items); |
|
|
|
MST_values = new List<DateTimePoint>(MST_items); |
|
|
|
MUT_values = new List<DateTimePoint>(MUT_items); |
|
|
|
if (MainWindowViewModel.SM01 == 1) |
|
|
|
{ |
|
|
|
STTA_values = new ObservableCollection<DateTimePoint>(STTA_items); |
|
|
|
STLA_values = new ObservableCollection<DateTimePoint>(STLA_items); |
|
|
|
STTA_values = new List<DateTimePoint>(STTA_items); |
|
|
|
STLA_values = new List<DateTimePoint>(STLA_items); |
|
|
|
} |
|
|
|
if (MainWindowViewModel.SM02 == 1) |
|
|
|
{ |
|
|
|
STTB_values = new ObservableCollection<DateTimePoint>(STTB_items); |
|
|
|
STLB_values = new ObservableCollection<DateTimePoint>(STLB_items); |
|
|
|
STTB_values = new List<DateTimePoint>(STTB_items); |
|
|
|
STLB_values = new List<DateTimePoint>(STLB_items); |
|
|
|
} |
|
|
|
if (MainWindowViewModel.SM03 == 1) |
|
|
|
{ |
|
|
|
STTC_values = new ObservableCollection<DateTimePoint>(STTC_items); |
|
|
|
STLC_values = new ObservableCollection<DateTimePoint>(STLC_items); |
|
|
|
STTC_values = new List<DateTimePoint>(STTC_items); |
|
|
|
STLC_values = new List<DateTimePoint>(STLC_items); |
|
|
|
} |
|
|
|
Series = new ISeries[] |
|
|
|
{ |
|
|
@ -223,7 +224,7 @@ namespace DyeingComputer.ViewModel |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 0, |
|
|
|
}, //主缸
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
/*new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.Temperature +"2("+Properties.Resources.MasterCylinder+Properties.Resources.Bottom+")", |
|
|
|
Values = MUT_values, |
|
|
@ -233,86 +234,86 @@ namespace DyeingComputer.ViewModel |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 0, |
|
|
|
}, //缸底
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.Temperature +"3("+Resources.Medicine + Resources.Tank +"1)", |
|
|
|
Values = STTA_values, |
|
|
|
Stroke = new SolidColorPaint(s_blue_1, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_blue_1, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 0, |
|
|
|
}, //附缸1
|
|
|
|
}, */ //缸底
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.Temperature +"4("+Resources.Medicine + Resources.Tank +"2)", |
|
|
|
Values = STTB_values, |
|
|
|
Stroke = new SolidColorPaint(s_blue_2, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_blue_2, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 0, |
|
|
|
}, //附缸2
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.Temperature +"5("+Resources.Medicine + Resources.Tank +"3)", |
|
|
|
Values = STTC_values, |
|
|
|
Stroke = new SolidColorPaint(s_blue_3, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_blue_3, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 0, |
|
|
|
}, //附缸3
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.WaterLevel +"("+Properties.Resources.MasterCylinder+")", |
|
|
|
Values = MTL_values, |
|
|
|
Stroke = new SolidColorPaint(s_red, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_red, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 1, |
|
|
|
}, //主缸液位
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.WaterLevel +"("+Resources.Medicine + Resources.Tank +"1)", |
|
|
|
Values = STLA_values, |
|
|
|
Stroke = new SolidColorPaint(s_red_1, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_red_1, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 1, |
|
|
|
}, //附缸1液位
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.WaterLevel +"("+Resources.Medicine + Resources.Tank +"2)", |
|
|
|
Values = STLB_values, |
|
|
|
Stroke = new SolidColorPaint(s_red_2, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_red_2, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 1, |
|
|
|
}, //附缸2液位
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.WaterLevel +"("+Resources.Medicine + Resources.Tank +"3)", |
|
|
|
Values = STLC_values, |
|
|
|
Stroke = new SolidColorPaint(s_red_3, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_red_3, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 1, |
|
|
|
}, //附缸3 液位
|
|
|
|
{ |
|
|
|
Name = Properties.Resources.Temperature +"3("+Resources.Medicine + Resources.Tank +"1)", |
|
|
|
Values = STTA_values, |
|
|
|
Stroke = new SolidColorPaint(s_blue_1, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_blue_1, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 0, |
|
|
|
}, //附缸1
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.Temperature +"4("+Resources.Medicine + Resources.Tank +"2)", |
|
|
|
Values = STTB_values, |
|
|
|
Stroke = new SolidColorPaint(s_blue_2, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_blue_2, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 0, |
|
|
|
}, //附缸2
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.Temperature +"5("+Resources.Medicine + Resources.Tank +"3)", |
|
|
|
Values = STTC_values, |
|
|
|
Stroke = new SolidColorPaint(s_blue_3, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_blue_3, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 0, |
|
|
|
}, //附缸3
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.WaterLevel +"("+Properties.Resources.MasterCylinder+")", |
|
|
|
Values = MTL_values, |
|
|
|
Stroke = new SolidColorPaint(s_red, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_red, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 1, |
|
|
|
}, //主缸液位
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.WaterLevel +"("+Resources.Medicine + Resources.Tank +"1)", |
|
|
|
Values = STLA_values, |
|
|
|
Stroke = new SolidColorPaint(s_red_1, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_red_1, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 1, |
|
|
|
}, //附缸1液位
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.WaterLevel +"("+Resources.Medicine + Resources.Tank +"2)", |
|
|
|
Values = STLB_values, |
|
|
|
Stroke = new SolidColorPaint(s_red_2, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_red_2, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 1, |
|
|
|
}, //附缸2液位
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.WaterLevel +"("+Resources.Medicine + Resources.Tank +"3)", |
|
|
|
Values = STLC_values, |
|
|
|
Stroke = new SolidColorPaint(s_red_3, 2), |
|
|
|
GeometrySize = 0, |
|
|
|
GeometryStroke = new SolidColorPaint(s_red_3, 2), |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 1, |
|
|
|
}, //附缸3液位
|
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|