图表全局刷新
This commit is contained in:
commit
db8d0af797
6 files changed
+68
-14
No files matched your search
@@ -0,0 +1,17 @@
|
||||
<UserControl x:Class="SunlightCentralizedControlManagement_SCCM_.View.CurveDiagram"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:SunlightCentralizedControlManagement_SCCM_.View"
|
||||
xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.WPF"
|
||||
xmlns:ConvertMoels="clr-namespace:SunlightCentralizedControlManagement_SCCM_.ConvertMoels"
|
||||
xmlns:viewmodel="clr-namespace:SunlightCentralizedControlManagement_SCCM_.ViewModel"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:CurveDiagramViewModel}"
|
||||
d:DesignHeight="300" d:DesignWidth="400">
|
||||
<Grid>
|
||||
<lvc:CartesianChart x:Name="OscChart" MinWidth="400" MinHeight="300" EasingFunction="{x:Null}" ZoomMode="X"
|
||||
Series="{Binding Series}" YAxes="{Binding YAxes}" XAxes="{Binding XAxes}" Margin="0,0,0,0"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,30 @@
|
||||
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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;
|
||||
|
||||
namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
{
|
||||
/// <summary>
|
||||
/// CurveDiagram.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class CurveDiagram : UserControl
|
||||
{
|
||||
public CurveDiagram()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new CurveDiagramViewModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-4
@@ -11,7 +11,7 @@
|
||||
xmlns:ConvertMoels="clr-namespace:SunlightCentralizedControlManagement_SCCM_.ConvertMoels"
|
||||
mc:Ignorable="d"
|
||||
Loaded="UserControl_Loaded"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:CurveDiagramViewModel}"
|
||||
|
||||
d:DesignHeight="900" d:DesignWidth="1800">
|
||||
<UserControl.Resources>
|
||||
<ConvertMoels:StateToColorConvert x:Key="StateToColorConvert"/>
|
||||
@@ -108,9 +108,6 @@
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
<lvc:CartesianChart x:Name="OscChart" MinWidth="400" MinHeight="300" EasingFunction="{x:Null}" ZoomMode="X"
|
||||
Series="{Binding Series}" YAxes="{Binding YAxes}" XAxes="{Binding XAxes}" Margin="0,500,300,60"/>
|
||||
|
||||
<StackPanel x:Name="s1cr" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal">
|
||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||
<ListViewItem Height="60" VerticalAlignment="Center">
|
||||
@@ -157,5 +154,10 @@
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Background="White" Margin="0,500,300,60">
|
||||
<ContentControl x:Name="Picture"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
@@ -30,14 +30,14 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
{
|
||||
private SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\SCCM.db"; //数据库路径
|
||||
public static DataTable WorkOrder = new DataTable(); //设备表缓存
|
||||
public static DataTable WorkOrder = new DataTable(); //物料缓存
|
||||
public static string CurveDiagram;
|
||||
private readonly UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "SCCM.ini");
|
||||
private string SYS_machines =null;
|
||||
|
||||
public CurveView()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new CurveDiagramViewModel();
|
||||
InitializeComponent();
|
||||
|
||||
Sdatepicker.Language = XmlLanguage.GetLanguage(Configini.IniReadvalue("SYS", "Language"));
|
||||
}
|
||||
@@ -66,13 +66,13 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
|
||||
Sdatepicker.Text = DateTime.Now.ToString("yyyy/MM/dd");
|
||||
|
||||
CurveDiagramViewModel.Curve("738891980000");
|
||||
Picture.Content = new View.CurveDiagram();
|
||||
}
|
||||
|
||||
private void WorkOrderNumder_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CurveDiagramViewModel.Curve(Select_WorkOrderNumder.Text);
|
||||
// OscChart.CoreChart..;
|
||||
CurveDiagram =Select_WorkOrderNumder.Text;
|
||||
Picture.Content = new View.CurveDiagram();
|
||||
}
|
||||
|
||||
private void ListViewItem_Before(object sender, MouseButtonEventArgs e)//前一天
|
||||
|
||||
Reference in new issue
Block a user