diff --git a/ConvertMoels/StateToColorConvert.cs b/ConvertMoels/StateToColorConvert.cs index c78cf21..2ef7267 100644 --- a/ConvertMoels/StateToColorConvert.cs +++ b/ConvertMoels/StateToColorConvert.cs @@ -19,7 +19,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.ConvertMoels } else { - string Staten = null; string i = value.ToString(); if (i == "101") return "Gray"; diff --git a/Properties/Resources.zh-TW.resx b/Properties/Resources.zh-TW.resx index 509deae..eb1f7e7 100644 --- a/Properties/Resources.zh-TW.resx +++ b/Properties/Resources.zh-TW.resx @@ -915,4 +915,13 @@ + + 後一天 + + + 前一天 + + + 今天 + \ No newline at end of file diff --git a/SunlightCentralizedControlManagement_SCCM_.csproj b/SunlightCentralizedControlManagement_SCCM_.csproj index 2433143..4b5af03 100644 --- a/SunlightCentralizedControlManagement_SCCM_.csproj +++ b/SunlightCentralizedControlManagement_SCCM_.csproj @@ -289,6 +289,9 @@ 8.0.0 + + 4.3.0 + 2.1.10 diff --git a/View/CurveView.xaml b/View/CurveView.xaml index faf7ae0..76b8920 100644 --- a/View/CurveView.xaml +++ b/View/CurveView.xaml @@ -107,16 +107,9 @@ - - - - - - + + diff --git a/View/CurveView.xaml.cs b/View/CurveView.xaml.cs index 9d161de..f027e7e 100644 --- a/View/CurveView.xaml.cs +++ b/View/CurveView.xaml.cs @@ -65,6 +65,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.View Griddata.ItemsSource = MainWindowViewModel.Machines.DefaultView; Sdatepicker.Text = DateTime.Now.ToString("yyyy/MM/dd"); + + CurveDiagramViewModel.Curve("738891980000"); } private void WorkOrderNumder_Click(object sender, RoutedEventArgs e) diff --git a/ViewModel/CurveDiagramViewModel.cs b/ViewModel/CurveDiagramViewModel.cs index 8ccce9b..f43a830 100644 --- a/ViewModel/CurveDiagramViewModel.cs +++ b/ViewModel/CurveDiagramViewModel.cs @@ -25,30 +25,14 @@ using static SunlightCentralizedControlManagement_SCCM_.UserClass.SqliteHelper; using TouchSocket.Core; using System.ComponentModel; using System.Runtime.CompilerServices; +using System.Windows; 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(ref T prop, T value, [CallerMemberName] string propertyName = null) - { - if (EqualityComparer.Default.Equals(prop, value) == false) - { - prop = value; - Notify(propertyName); - } - } - } +{ public partial class CurveDiagramViewModel : ObservableObject//ViewModelBase { public static ISeries[] Series { get; set; } + public static ObservableCollection ObservableValues { get; set; } //x轴时间格式 public Axis[] XAxes { get; set; } = { @@ -144,7 +128,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel public CurveDiagramViewModel() { - Curve(""); } public static void Curve(string SYSWorkNumder) @@ -213,9 +196,13 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel STTC_values = new ObservableCollection(STTC_items); STLC_values = new ObservableCollection(STLC_items); } + + + + Series = new ISeries[] { - new LineSeries + new LineSeries { Name = Properties.Resources.MasterCylinder +"PH", Values = MTH_values, @@ -337,7 +324,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel ScalesYAt = 1, }, //附缸3 液位 }; - } + + } } } }