监控页面添加图表
This commit is contained in:
commit
09cb79fb14
5 files changed
+43
-7
No files matched your search
@@ -21,9 +21,20 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
/// </summary>
|
||||
public partial class CurveDiagram : UserControl
|
||||
{
|
||||
public CurveDiagram()
|
||||
public static string Curve;
|
||||
public static string starT;
|
||||
public static string endT;
|
||||
public static string mac;
|
||||
public static bool mode;
|
||||
//搜索方式0时间加机台1工单 ,机台,开始时间,结束时间,工单
|
||||
public CurveDiagram(bool i,string m,string s,string e,string w)
|
||||
{
|
||||
InitializeComponent();
|
||||
mode = i;
|
||||
starT = s;
|
||||
endT = e;
|
||||
mac = m;
|
||||
Curve = w;
|
||||
DataContext = new CurveDiagramViewModel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,13 +66,13 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
|
||||
Sdatepicker.Text = DateTime.Now.ToString("yyyy/MM/dd");
|
||||
|
||||
Picture.Content = new View.CurveDiagram();
|
||||
Picture.Content = new View.CurveDiagram(true,"","","", CurveDiagram);
|
||||
}
|
||||
|
||||
private void WorkOrderNumder_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CurveDiagram =Select_WorkOrderNumder.Text;
|
||||
Picture.Content = new View.CurveDiagram();
|
||||
Picture.Content = new View.CurveDiagram(true, "", "", "", CurveDiagram);
|
||||
}
|
||||
|
||||
private void ListViewItem_Before(object sender, MouseButtonEventArgs e)//前一天
|
||||
|
||||
+11
-1
@@ -147,7 +147,8 @@
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<TextBlock Grid.Column="0" x:Name="machin_LOG" TextWrapping="Wrap" FontSize="27" VerticalAlignment="Top" Height="40" Background="#FF2793FF" Foreground="White" FontWeight="Bold"/>
|
||||
<TextBlock Grid.Column="0" x:Name="log" Text="{Binding Sys_machine}" TextWrapping="Wrap" FontSize="25" Background="White" Margin="0,42,4,-2" Grid.ColumnSpan="2"/>
|
||||
<TextBlock Grid.Column="0" x:Name="log" Text="{Binding Sys_machine}" TextWrapping="Wrap" FontSize="25" Background="White" Margin="0,40,0,0" Grid.ColumnSpan="2"/>
|
||||
<ContentControl Grid.Column="0" x:Name="Picture" Background="White" Margin="0,40,0,0" Grid.ColumnSpan="2"/>
|
||||
<GridSplitter Grid.Row="0" Grid.Column="1" Width="5" HorizontalAlignment="Center" Background="#FF00204E"/>
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="3" x:Name="mt" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="0,0,0,0" Width="700" HorizontalAlignment="Left">
|
||||
@@ -159,6 +160,14 @@
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_Curve">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="ChartBellCurve" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{x:Static lang:Resources.Curve}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||
<ListViewItem Width="150" MouseLeftButtonUp="ListViewItem_Conveyor">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -175,6 +184,7 @@
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="3" x:Name="scr" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="700,0,0,0">
|
||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
|
||||
using SkiaSharp;
|
||||
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
|
||||
using SunlightCentralizedControlManagement_SCCM_.WindowsView;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -87,15 +88,28 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
private void ListViewItem_DyeingMachine(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
machines_info = 0;
|
||||
log.Visibility = Visibility.Visible;
|
||||
Picture.Visibility = Visibility.Collapsed;
|
||||
}//信息
|
||||
private void ListViewItem_Conveyor(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
machines_info = 1;
|
||||
log.Visibility = Visibility.Visible;
|
||||
Picture.Visibility = Visibility.Collapsed;
|
||||
}//输送
|
||||
private void ListViewItem_Receipt(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
machines_info = 2;
|
||||
log.Visibility = Visibility.Visible;
|
||||
Picture.Visibility = Visibility.Collapsed;
|
||||
}//单据
|
||||
private void ListViewItem_Curve(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
log.Visibility = Visibility.Collapsed;
|
||||
Picture.Visibility = Visibility.Visible;
|
||||
Picture.Content = new View.CurveDiagram(true, "", "", "", workOrder);
|
||||
machines_info = 3;
|
||||
}//曲线
|
||||
private void ListViewItem_Resume(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(machine))
|
||||
|
||||
@@ -129,7 +129,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
|
||||
public CurveDiagramViewModel()
|
||||
{
|
||||
Curve(CurveView.CurveDiagram);
|
||||
|
||||
Curve(CurveDiagram.Curve);
|
||||
}
|
||||
public static void Curve(string SYSWorkNumder)
|
||||
{
|
||||
@@ -137,7 +138,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
{
|
||||
SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
||||
SQLiteHelpers.Open(); //打开数据库
|
||||
CDB = SQLiteHelpers.ExecuteDataSet("select * from Chart where DYELOT = '" + SYSWorkNumder + "'order by Time", null).Tables[0];
|
||||
CDB = SQLiteHelpers.ExecuteDataSet("select * from Chart where WorkOrder = '" + SYSWorkNumder + "'order by Time", null).Tables[0];
|
||||
SQLiteHelpers.Close();
|
||||
CDB_Count = CDB.Rows.Count;
|
||||
|
||||
|
||||
Reference in new issue
Block a user