|
- <UserControl
- x:Class="BPASmartClient.Academy.View.HistoryChartView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.Academy.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:oxy="http://oxyplot.org/wpf"
- xmlns:vm="clr-namespace:BPASmartClient.Academy.ViewModel"
- d:DesignHeight="900"
- d:DesignWidth="1440"
- mc:Ignorable="d">
- <UserControl.DataContext>
- <vm:HistoryChartViewModel />
- </UserControl.DataContext>
- <UserControl.Resources>
- <Style x:Key="setCheck" TargetType="{x:Type RadioButton}">
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <Border Background="Transparent" BorderThickness="0">
- <ContentControl
- x:Name="check"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Content}"
- Foreground="#777777" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="check" Property="Foreground" Value="White" />
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter TargetName="check" Property="Foreground" Value="White" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <StackPanel
- Margin="0,0,60,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="DeepSkyBlue"
- Text="产品编号:" />
- <TextBox
- Width="200"
- Height="30"
- Margin="0,0,10,0"
- VerticalContentAlignment="Center"
- Background="Transparent"
- BorderBrush="DeepSkyBlue"
- CaretBrush="DeepSkyBlue"
- FontSize="16"
- Foreground="DeepSkyBlue"
- Style="{x:Null}"
- Text="{Binding ProductNum}" />
-
- <Button
- Width="120"
- Height="30"
- Command="{Binding FindProductCommand}"
- Content="查询编号"
- Style="{StaticResource ButtonStyle}" />
-
- <TextBlock
- Margin="30,0,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="DeepSkyBlue"
- Text="查询时间:" />
- <DatePicker
- Width="150"
- Margin="0,0,10,0"
- BorderBrush="DeepSkyBlue"
- FontSize="16"
- SelectedDate="{Binding SelectTime}"
- Style="{DynamicResource PickerStyle}" />
-
- <Button
- Width="120"
- Height="30"
- Command="{Binding Select}"
- Content="查询"
- Style="{StaticResource ButtonStyle}" />
- </StackPanel>
-
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="1.7*"/>
- </Grid.ColumnDefinitions>
- <!--#region 表格-->
- <Grid
- Grid.Column="0"
- Margin="20,20,20,300"
- Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <!--#region 标题-->
- <Grid Background="#ff0C255F">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="50" />
- <ColumnDefinition Width="180" />
- <ColumnDefinition Width="120" />
- <ColumnDefinition Width="1*" />
- </Grid.ColumnDefinitions>
- <Border
- Grid.ColumnSpan="1"
- BorderBrush="#777777"
- BorderThickness="0.8" />
- <Border
- Grid.ColumnSpan="2"
- BorderBrush="#777777"
- BorderThickness="0,0.8,0.8,0.8" />
- <Border
- Grid.ColumnSpan="3"
- BorderBrush="#777777"
- BorderThickness="0,0.8,0.8,0.8" />
- <Border
- Grid.ColumnSpan="4"
- BorderBrush="#777777"
- BorderThickness="0,0.8,0.8,0.8" />
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="White"
- Text="序号" />
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="White"
- Text="配方名称" />
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="White"
- Text="创建时间" />
- <TextBlock
- Grid.Column="3"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="White"
- Text="操作" />
- </Grid>
- <!--#endregion-->
- <!--#region 表格内容-->
- <ScrollViewer
- Grid.Row="1"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding RecipeCharts}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid>
- <Grid
- Height="30"
- Margin="0,1"
- Background="#163175">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="50" />
- <ColumnDefinition Width="180" />
- <ColumnDefinition Width="120" />
- <ColumnDefinition Width="1*" />
- </Grid.ColumnDefinitions>
- <Border
- Grid.ColumnSpan="1"
- BorderBrush="#777777"
- BorderThickness="0.4" />
- <Border
- Grid.ColumnSpan="2"
- BorderBrush="#777777"
- BorderThickness="0,0.4,0.4,0.4" />
- <Border
- Grid.ColumnSpan="3"
- BorderBrush="#777777"
- BorderThickness="0,0.4,0.4,0.4" />
- <Border
- Grid.ColumnSpan="4"
- BorderBrush="#777777"
- BorderThickness="0,0.4,0.4,0.4" />
- <TextBlock
- x:Name="num"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="White"
- Text="{Binding Num}" />
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="White"
- Text="{Binding Name}" />
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="White"
- Text="{Binding CreateTime, StringFormat={}{0:yyyy-MM-dd}}" />
- <RadioButton
- x:Name="ceshi"
- Grid.Column="3"
- Content="查看"
- FontSize="16"
- Foreground="White"
- GroupName="sss"
- Style="{StaticResource setCheck}" />
- </Grid>
- <Popup
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- AllowsTransparency="True"
- IsOpen="{Binding ElementName=ceshi, Path=IsChecked, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
- MouseLeave="Popup_MouseLeave"
- Placement="Bottom"
- PlacementTarget="{Binding ElementName=ceshi}">
- <Grid
- Width="200"
- Height="200"
- Background="Transparent">
- <Path
- Fill="#ff0C255F"
- Stroke="White"
- StrokeThickness="1">
- <Path.Data>
- <GeometryGroup>
- <PathGeometry>
- <PathFigure StartPoint="0,10">
- <LineSegment Point="0,200" />
- <LineSegment Point="200,200" />
- <LineSegment Point="200,10" />
- <LineSegment Point="60,10" />
- <LineSegment Point="50,0" />
- <LineSegment Point="40,10" />
- <LineSegment Point="0,10" />
- </PathFigure>
- </PathGeometry>
- </GeometryGroup>
- </Path.Data>
- </Path>
-
- <StackPanel
- Margin="0,30,0,20"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Vertical">
- <Border Margin="0,10">
- <Button
- Width="100"
- Height="35"
- Click="Button_Click"
- CommandParameter="{Binding ElementName=num, Path=Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
- Content="温度曲线"
- Style="{StaticResource ButtonStyle}" />
- </Border>
- <Border Margin="0,10">
- <Button
- Width="100"
- Height="35"
- Click="Button_Click"
- CommandParameter="{Binding ElementName=num, Path=Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
- Content="转速曲线"
- Style="{StaticResource ButtonStyle}" />
- </Border>
- <Border Margin="0,10">
- <Button
- Width="100"
- Height="35"
- Click="Button_Click"
- CommandParameter="{Binding ElementName=num, Path=Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
- Content="重量曲线"
- Style="{StaticResource ButtonStyle}" />
- </Border>
- </StackPanel>
- </Grid>
- </Popup>
- </Grid>
-
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- <!--#endregion-->
- </Grid>
-
- <!--#endregion-->
- <!--#region 曲线-->
- <oxy:PlotView
- x:Name="chartView"
- Grid.Column="1"
- Margin="5"
- Background="White"
- Foreground="White"
- PanCursor="Hand" />
- <!--#endregion-->
-
- </Grid>
-
- </Grid>
- </UserControl>
|