|
@ -8,18 +8,108 @@ |
|
|
xmlns:local="clr-namespace:SunlightCentralizedControlManagement_SCCM_.View" |
|
|
xmlns:local="clr-namespace:SunlightCentralizedControlManagement_SCCM_.View" |
|
|
xmlns:lang="clr-namespace:SunlightCentralizedControlManagement_SCCM_.Properties" |
|
|
xmlns:lang="clr-namespace:SunlightCentralizedControlManagement_SCCM_.Properties" |
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" |
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" |
|
|
|
|
|
xmlns:ConvertMoels="clr-namespace:SunlightCentralizedControlManagement_SCCM_.ConvertMoels" |
|
|
mc:Ignorable="d" |
|
|
mc:Ignorable="d" |
|
|
Loaded="UserControl_Loaded" |
|
|
Loaded="UserControl_Loaded" |
|
|
d:DataContext="{d:DesignInstance Type=viewmodel:CurveDiagramViewModel}" |
|
|
d:DataContext="{d:DesignInstance Type=viewmodel:CurveDiagramViewModel}" |
|
|
d:DesignHeight="900" d:DesignWidth="1800"> |
|
|
d:DesignHeight="900" d:DesignWidth="1800"> |
|
|
|
|
|
<UserControl.Resources> |
|
|
|
|
|
<ConvertMoels:StateToColorConvert x:Key="StateToColorConvert"/> |
|
|
|
|
|
</UserControl.Resources> |
|
|
<Grid> |
|
|
<Grid> |
|
|
|
|
|
<DataGrid x:Name="Griddata" AlternationCount="2" IsReadOnly="True" d:ItemsSource="{d:SampleData ItemCount=999}" |
|
|
|
|
|
Background="White" HorizontalGridLinesBrush="{x:Null}" VerticalGridLinesBrush="#FFC9C9C9" |
|
|
|
|
|
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" FontSize="15" |
|
|
|
|
|
Grid.ColumnSpan="2" CanUserResizeRows="False" AutoGenerateColumns="False" MinColumnWidth="30" |
|
|
|
|
|
CanUserAddRows="False" CanUserDeleteRows="False" HeadersVisibility ="Column" SelectionMode="Single" |
|
|
|
|
|
Margin="0,0,0,60" HorizontalAlignment="Right" Width="300" MouseDoubleClick="Griddata_MouseDoubleClick"> |
|
|
|
|
|
<DataGrid.RowStyle > |
|
|
|
|
|
<Style TargetType="{x:Type DataGridRow}"> |
|
|
|
|
|
<Setter Property="Height" Value="30" /> |
|
|
|
|
|
<Setter Property="FontSize" Value="25" /> |
|
|
|
|
|
<Style.Triggers> |
|
|
|
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="0"> |
|
|
|
|
|
<Setter Property="Background" Value="#FFFFFFFF" /> |
|
|
|
|
|
</Trigger> |
|
|
|
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="1"> |
|
|
|
|
|
<Setter Property="Background" Value="#FFF0F0F0" /> |
|
|
|
|
|
</Trigger> |
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="False"/> |
|
|
|
|
|
</Style.Triggers> |
|
|
|
|
|
</Style> |
|
|
|
|
|
</DataGrid.RowStyle> |
|
|
|
|
|
<DataGrid.CellStyle> |
|
|
|
|
|
<Style TargetType="DataGridCell"> |
|
|
|
|
|
<Setter Property="BorderThickness" Value="0"/> |
|
|
|
|
|
<Setter Property="MinWidth" Value="20"/> |
|
|
|
|
|
<Style.Triggers> |
|
|
|
|
|
<Trigger Property="IsSelected" Value="True"> |
|
|
|
|
|
<Setter Property="Background" Value="#FFC0C0C0"/> |
|
|
|
|
|
<Setter Property="BorderBrush" Value="#FFC0C0C0"/> |
|
|
|
|
|
<Setter Property="Foreground" Value="Black"/> |
|
|
|
|
|
</Trigger> |
|
|
|
|
|
</Style.Triggers> |
|
|
|
|
|
</Style> |
|
|
|
|
|
</DataGrid.CellStyle> |
|
|
|
|
|
<DataGrid.Columns> |
|
|
|
|
|
<!--列信息绑定--> |
|
|
|
|
|
<DataGridTemplateColumn Width="70" Header="{x:Static lang:Resources.State}"> |
|
|
|
|
|
<DataGridTemplateColumn.CellTemplate> |
|
|
|
|
|
<DataTemplate> |
|
|
|
|
|
<materialDesign:PackIcon Kind="StateMachine" Width="25" Height="30" VerticalAlignment="Center" HorizontalAlignment="Center" |
|
|
|
|
|
Foreground="{Binding Path=State,Converter={StaticResource StateToColorConvert}}"/> |
|
|
|
|
|
</DataTemplate> |
|
|
|
|
|
</DataGridTemplateColumn.CellTemplate> |
|
|
|
|
|
</DataGridTemplateColumn> |
|
|
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Machine}" Binding="{Binding Name}" Width="210" IsReadOnly="True"/> |
|
|
|
|
|
</DataGrid.Columns> |
|
|
|
|
|
</DataGrid> |
|
|
|
|
|
<DataGrid x:Name="GridWorkOrder" AlternationCount="2" IsReadOnly="True" d:ItemsSource="{d:SampleData ItemCount=90}" |
|
|
|
|
|
Background="White" HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" |
|
|
|
|
|
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" FontSize="15" |
|
|
|
|
|
Grid.ColumnSpan="2" CanUserResizeRows="False" AutoGenerateColumns="False" MinColumnWidth="30" |
|
|
|
|
|
CanUserAddRows="False" CanUserDeleteRows="False" HeadersVisibility ="Column" SelectionMode="Single" |
|
|
|
|
|
VerticalAlignment="Top" Height="500" Margin="0,0,300,0" MouseDoubleClick="GridWorkOrder_MouseDoubleClick" > |
|
|
|
|
|
<DataGrid.RowStyle > |
|
|
|
|
|
<Style TargetType="{x:Type DataGridRow}"> |
|
|
|
|
|
<Setter Property="Height" Value="30" /> |
|
|
|
|
|
<Setter Property="FontSize" Value="25" /> |
|
|
|
|
|
<Style.Triggers> |
|
|
|
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="0"> |
|
|
|
|
|
<Setter Property="Background" Value="#FFFFFFFF" /> |
|
|
|
|
|
</Trigger> |
|
|
|
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="1"> |
|
|
|
|
|
<Setter Property="Background" Value="#FFF0F0F0" /> |
|
|
|
|
|
</Trigger> |
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="False"/> |
|
|
|
|
|
</Style.Triggers> |
|
|
|
|
|
</Style> |
|
|
|
|
|
</DataGrid.RowStyle> |
|
|
|
|
|
<DataGrid.CellStyle> |
|
|
|
|
|
<Style TargetType="DataGridCell"> |
|
|
|
|
|
<Setter Property="BorderThickness" Value="0"/> |
|
|
|
|
|
<Setter Property="MinWidth" Value="20"/> |
|
|
|
|
|
<Style.Triggers> |
|
|
|
|
|
<Trigger Property="IsSelected" Value="True"> |
|
|
|
|
|
<Setter Property="Background" Value="#FFC0C0C0"/> |
|
|
|
|
|
<Setter Property="BorderBrush" Value="#FFC0C0C0"/> |
|
|
|
|
|
<Setter Property="Foreground" Value="Black"/> |
|
|
|
|
|
</Trigger> |
|
|
|
|
|
</Style.Triggers> |
|
|
|
|
|
</Style> |
|
|
|
|
|
</DataGrid.CellStyle> |
|
|
|
|
|
<DataGrid.Columns> |
|
|
|
|
|
<!--列信息绑定--> |
|
|
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Machine}" Binding="{Binding Name}" Width="150" IsReadOnly="True"/> |
|
|
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.WorkOrder}" Binding="{Binding WorkOrder}" Width="300" IsReadOnly="True"/> |
|
|
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.ProcessName}" Binding="{Binding ProgramName}" Width="250" IsReadOnly="True"/> |
|
|
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.StartTime}" Binding="{Binding StartTime}" Width="150" IsReadOnly="True"/> |
|
|
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Remark}" Binding="{Binding Remark}" Width="500" IsReadOnly="True"/> |
|
|
|
|
|
</DataGrid.Columns> |
|
|
|
|
|
</DataGrid> |
|
|
|
|
|
|
|
|
<ListView x:Name="machines" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD" |
|
|
<lvc:CartesianChart x:Name="OscChart" MinWidth="400" MinHeight="300" EasingFunction="{x:Null}" |
|
|
HorizontalAlignment="Right" Width="300" Margin="0,60,0,0"> |
|
|
Series="{Binding Series}" YAxes="{Binding YAxes}" XAxes="{Binding XAxes}" Margin="0,500,300,60"> |
|
|
</ListView> |
|
|
|
|
|
|
|
|
|
|
|
<lvc:CartesianChart x:Name="OscChart" MinWidth="1280" MinHeight="600" EasingFunction="{x:Null}" |
|
|
|
|
|
Series="{Binding Series}" YAxes="{Binding YAxes}" XAxes="{Binding XAxes}" Margin="0,0,300,60"> |
|
|
|
|
|
<lvc:CartesianChart.Style> |
|
|
<lvc:CartesianChart.Style> |
|
|
<Style TargetType="{x:Type lvc:CartesianChart}"> |
|
|
<Style TargetType="{x:Type lvc:CartesianChart}"> |
|
|
<Setter Property="ZoomMode" Value="PanX"/> |
|
|
<Setter Property="ZoomMode" Value="PanX"/> |
|
@ -28,16 +118,14 @@ |
|
|
</lvc:CartesianChart.Style> |
|
|
</lvc:CartesianChart.Style> |
|
|
</lvc:CartesianChart> |
|
|
</lvc:CartesianChart> |
|
|
|
|
|
|
|
|
<StackPanel x:Name="s1cr" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="0,0,0,0"> |
|
|
<StackPanel x:Name="s1cr" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal"> |
|
|
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD"> |
|
|
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD"> |
|
|
<ListViewItem Height="60" MouseLeftButtonUp="DatePicker_Today" VerticalAlignment="Center"> |
|
|
<ListViewItem Height="60" VerticalAlignment="Center"> |
|
|
<StackPanel Orientation="Horizontal" > |
|
|
<StackPanel Orientation="Horizontal" > |
|
|
<materialDesign:PackIcon Kind="DateRange" Width="25" Height="40" Margin="10" VerticalAlignment="Center"/> |
|
|
<materialDesign:PackIcon Kind="DateRange" Width="25" Height="40" Margin="10" VerticalAlignment="Center"/> |
|
|
<TextBlock Text="{x:Static lang:Resources.SelectDate}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> |
|
|
<TextBlock Text="{x:Static lang:Resources.SelectDate}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> |
|
|
<DatePicker x:Name="Sdatepicker" Width="150" FontSize="20" Height="40" FontWeight="Bold" Padding="1,1,0,1" |
|
|
<DatePicker x:Name="Sdatepicker" Width="150" FontSize="20" Height="40" FontWeight="Bold" Padding="1,1,0,1" |
|
|
Focusable="False" Text="{x:Static lang:Resources.Startdate}"/> |
|
|
Focusable="False" Text="{x:Static lang:Resources.Startdate}"/> |
|
|
<DatePicker x:Name="Edatepicker" Width="150" FontSize="20" Height="40" FontWeight="Bold" Padding="1,1,0,1" |
|
|
|
|
|
Focusable="False" Text="{x:Static lang:Resources.Enddate}"/> |
|
|
|
|
|
</StackPanel> |
|
|
</StackPanel> |
|
|
</ListViewItem> |
|
|
</ListViewItem> |
|
|
</ListView> |
|
|
</ListView> |
|
|