|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- <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>
|