You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.8 KiB
61 lines
1.8 KiB
using DyeingComputer.ViewModel;
|
|
using LiveChartsCore.SkiaSharpView;
|
|
using LiveChartsCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
using static DyeingComputer.UserClass.SqliteHelper;
|
|
using DyeingComputer.UserClass;
|
|
using LiveChartsCore.Kernel.Sketches;
|
|
using LiveChartsCore.Measure;
|
|
using ScottPlot.Plottables;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace DyeingComputer.View
|
|
{
|
|
/// <summary>
|
|
/// CurveDiagramView.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class CurveDiagramView : UserControl
|
|
{
|
|
private SQLiteHelper SQLiteHelpers = null; //定义数据库
|
|
private readonly string ChartAdress = Environment.CurrentDirectory + "\\DataBase\\Chart.db"; //数据库路径
|
|
DataTable CDB = new DataTable();
|
|
|
|
public CurveDiagramView()
|
|
{
|
|
InitializeComponent();
|
|
DataContext = new CurveDiagramViewModel();
|
|
}
|
|
|
|
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
if (MainWindowViewModel.WorkNumder.ToString() != "----------")
|
|
{
|
|
SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
|
SQLiteHelpers.Open(); //打开数据库
|
|
CDB = SQLiteHelpers.ExecuteDataSet("select * from Chart where DYELOT = '" + MainWindowViewModel.WorkNumder + "'order by Time", null).Tables[0];
|
|
SQLiteHelpers.Close();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
|