|
|
@ -90,7 +90,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
|
CrosshairSnapEnabled = true, |
|
|
|
Position = LiveChartsCore.Measure.AxisPosition.End |
|
|
|
}, //液位轴
|
|
|
|
new Axis //
|
|
|
|
/* new Axis //
|
|
|
|
{ |
|
|
|
MinLimit =0, |
|
|
|
MaxLimit =14, |
|
|
@ -106,7 +106,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
|
DrawTicksPath = true, |
|
|
|
CrosshairSnapEnabled = true, |
|
|
|
Position = LiveChartsCore.Measure.AxisPosition.End |
|
|
|
}, //PH轴
|
|
|
|
},*/ //PH轴
|
|
|
|
}; |
|
|
|
|
|
|
|
private static Random _r = new Random(); |
|
|
@ -136,10 +136,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
|
if (mode) |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(w)) return; |
|
|
|
SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
|
|
|
SQLiteHelpers.Open(); //打开数据库
|
|
|
|
CDB = SQLiteHelpers.ExecuteDataSet("select * from Chart where WorkOrder = '" + w + "'order by Time", null).Tables[0]; |
|
|
|
SQLiteHelpers.Close(); |
|
|
|
CDB = MainWindowViewModel.SQLiteChartAdress.ExecuteDataSet("select * from Chart where WorkOrder = '" + w + "'order by Time", null).Tables[0]; |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
@ -147,18 +144,18 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
|
if (string.IsNullOrEmpty(m)) return; |
|
|
|
if (string.IsNullOrEmpty(s)) return; |
|
|
|
if (string.IsNullOrEmpty(e)) return; |
|
|
|
SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
|
|
|
SQLiteHelpers.Open(); //打开数据库
|
|
|
|
CDB = SQLiteHelpers.ExecuteDataSet("select * from Chart where Machine = '" + m + "'" + |
|
|
|
// SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
|
|
|
// SQLiteHelpers.Open(); //打开数据库
|
|
|
|
CDB = MainWindowViewModel.SQLiteChartAdress.ExecuteDataSet("select * from Chart where Machine = '" + m + "'" + |
|
|
|
" and Time > '" + s + "' and Time < '" + e + "' order by Time", null).Tables[0]; |
|
|
|
SQLiteHelpers.Close(); |
|
|
|
// SQLiteHelpers.Close();
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
CDB_Count = CDB.Rows.Count; |
|
|
|
var MTT_items = new List<DateTimePoint>(); |
|
|
|
var MTL_items = new List<DateTimePoint>(); |
|
|
|
var MTH_items = new List<DateTimePoint>(); |
|
|
|
// var MTH_items = new List<DateTimePoint>();
|
|
|
|
var MST_items = new List<DateTimePoint>(); |
|
|
|
var MUT_items = new List<DateTimePoint>(); |
|
|
|
var STTA_items = new List<DateTimePoint>(); |
|
|
@ -167,12 +164,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
|
var STLB_items = new List<DateTimePoint>(); |
|
|
|
var STTC_items = new List<DateTimePoint>(); |
|
|
|
var STLC_items = new List<DateTimePoint>(); |
|
|
|
for (var i = 0; i < CDB_Count; i++) |
|
|
|
for (var i = 0; i < CDB_Count; i=i+10) |
|
|
|
{ |
|
|
|
DateTime TIME = Convert.ToDateTime(CDB.Rows[i].Field<string>("Time")); |
|
|
|
MTT_items.Add(new DateTimePoint(TIME, CDB.Rows[i].Field<double>("MTT"))); |
|
|
|
MTL_items.Add(new DateTimePoint(TIME, CDB.Rows[i].Field<double>("MTL"))); |
|
|
|
MTH_items.Add(new DateTimePoint(TIME, CDB.Rows[i].Field<double>("MTH"))); |
|
|
|
// MTH_items.Add(new DateTimePoint(TIME, CDB.Rows[i].Field<double>("MTH")));
|
|
|
|
MST_items.Add(new DateTimePoint(TIME, CDB.Rows[i].Field<double>("MST"))); |
|
|
|
MUT_items.Add(new DateTimePoint(TIME, CDB.Rows[i].Field<double>("MUT"))); |
|
|
|
STTA_items.Add(new DateTimePoint(TIME, CDB.Rows[i].Field<double>("STTA"))); |
|
|
@ -186,7 +183,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
|
|
|
|
|
MTT_values = new ObservableCollection<DateTimePoint>(MTT_items); |
|
|
|
MTL_values = new ObservableCollection<DateTimePoint>(MTL_items); |
|
|
|
MTH_values = new ObservableCollection<DateTimePoint>(MTH_items); |
|
|
|
// MTH_values = new ObservableCollection<DateTimePoint>(MTH_items);
|
|
|
|
MST_values = new ObservableCollection<DateTimePoint>(MST_items); |
|
|
|
MUT_values = new ObservableCollection<DateTimePoint>(MUT_items); |
|
|
|
STTA_values = new ObservableCollection<DateTimePoint>(STTA_items); |
|
|
@ -198,7 +195,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
|
|
|
|
|
Series = new ISeries[] |
|
|
|
{ |
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
/* new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Properties.Resources.MasterCylinder +"PH", |
|
|
|
Values = MTH_values, |
|
|
@ -208,7 +205,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
|
Fill = null, |
|
|
|
LineSmoothness = 0, |
|
|
|
ScalesYAt = 2, |
|
|
|
}, //PH
|
|
|
|
}, *///PH
|
|
|
|
new LineSeries<DateTimePoint> |
|
|
|
{ |
|
|
|
Name = Resources.Target + Resources.Temperature, |
|
|
|