|
@ -25,30 +25,14 @@ using static SunlightCentralizedControlManagement_SCCM_.UserClass.SqliteHelper; |
|
|
using TouchSocket.Core; |
|
|
using TouchSocket.Core; |
|
|
using System.ComponentModel; |
|
|
using System.ComponentModel; |
|
|
using System.Runtime.CompilerServices; |
|
|
using System.Runtime.CompilerServices; |
|
|
|
|
|
using System.Windows; |
|
|
|
|
|
|
|
|
namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
{ |
|
|
{ |
|
|
public class NotifyPropertyBase : INotifyPropertyChanged |
|
|
|
|
|
{ |
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged; |
|
|
|
|
|
public void Notify([CallerMemberName] string propName = "") |
|
|
|
|
|
{ |
|
|
|
|
|
if (PropertyChanged != null) |
|
|
|
|
|
PropertyChanged(this, new PropertyChangedEventArgs(propName)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void SetProperty<T>(ref T prop, T value, [CallerMemberName] string propertyName = null) |
|
|
|
|
|
{ |
|
|
|
|
|
if (EqualityComparer<T>.Default.Equals(prop, value) == false) |
|
|
|
|
|
{ |
|
|
|
|
|
prop = value; |
|
|
|
|
|
Notify(propertyName); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
public partial class CurveDiagramViewModel : ObservableObject//ViewModelBase
|
|
|
public partial class CurveDiagramViewModel : ObservableObject//ViewModelBase
|
|
|
{ |
|
|
{ |
|
|
public static ISeries[] Series { get; set; } |
|
|
public static ISeries[] Series { get; set; } |
|
|
|
|
|
public static ObservableCollection<ObservableValue> ObservableValues { get; set; } |
|
|
//x轴时间格式
|
|
|
//x轴时间格式
|
|
|
public Axis[] XAxes { get; set; } = |
|
|
public Axis[] XAxes { get; set; } = |
|
|
{ |
|
|
{ |
|
@ -144,7 +128,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
|
|
|
|
|
|
public CurveDiagramViewModel() |
|
|
public CurveDiagramViewModel() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
Curve(""); |
|
|
Curve(""); |
|
|
} |
|
|
} |
|
|
public static void Curve(string SYSWorkNumder) |
|
|
public static void Curve(string SYSWorkNumder) |
|
@ -213,9 +196,13 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
STTC_values = new ObservableCollection<DateTimePoint>(STTC_items); |
|
|
STTC_values = new ObservableCollection<DateTimePoint>(STTC_items); |
|
|
STLC_values = new ObservableCollection<DateTimePoint>(STLC_items); |
|
|
STLC_values = new ObservableCollection<DateTimePoint>(STLC_items); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Series = new ISeries[] |
|
|
Series = new ISeries[] |
|
|
{ |
|
|
{ |
|
|
new LineSeries<DateTimePoint> |
|
|
new LineSeries<DateTimePoint> |
|
|
{ |
|
|
{ |
|
|
Name = Properties.Resources.MasterCylinder +"PH", |
|
|
Name = Properties.Resources.MasterCylinder +"PH", |
|
|
Values = MTH_values, |
|
|
Values = MTH_values, |
|
@ -337,7 +324,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
ScalesYAt = 1, |
|
|
ScalesYAt = 1, |
|
|
}, //附缸3 液位
|
|
|
}, //附缸3 液位
|
|
|
}; |
|
|
}; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|