|
- <UserControl
- x:Class="BPASmartClient.Academy.View.HistoryChart50LView"
- 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="450" d:DesignWidth="800" mc:Ignorable="d">
- <UserControl.DataContext>
- <vm:HistoryChart50LViewModel />
- </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="2*" />
- </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 />
- <ColumnDefinition Width="200" />
- <ColumnDefinition Width="50" />
- </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 />
- <ColumnDefinition Width="200" />
- <ColumnDefinition Width="50" />
- </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" Margin="5,0,0,0" HorizontalAlignment="Left" 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 HH:mm:ss}}" />
- <RadioButton
- x:Name="ceshi" Grid.Column="3"
- Command="{Binding DataContext.InspectDataCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}}"
- CommandParameter="{Binding Id}"
- 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 曲线-->
- <Grid Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <UniformGrid Columns="8">
- <CheckBox
- Command="{Binding CheckedCommand}"
- CommandParameter="0" Content="反应釜温度" FontSize="14"
- Foreground="{StaticResource 反应釜温度}"
- IsChecked="{Binding VisStatus[0]}"
- IsEnabled="{Binding IsEnable}" />
- <CheckBox
- Command="{Binding CheckedCommand}"
- CommandParameter="1" Content="反应釜蒸汽压力" FontSize="14"
- Foreground="{StaticResource 反应釜蒸汽压力}"
- IsChecked="{Binding VisStatus[1]}"
- IsEnabled="{Binding IsEnable}" />
- <CheckBox
- Command="{Binding CheckedCommand}"
- CommandParameter="2" Content="反应釜蒸汽流量" FontSize="14"
- Foreground="{StaticResource 反应釜蒸汽流量}"
- IsChecked="{Binding VisStatus[2]}"
- IsEnabled="{Binding IsEnable}" />
- <CheckBox
- Command="{Binding CheckedCommand}"
- CommandParameter="3" Content="冷凝水罐温度" FontSize="14"
- Foreground="{StaticResource 冷凝水罐温度}"
- IsChecked="{Binding VisStatus[3]}"
- IsEnabled="{Binding IsEnable}" />
- <CheckBox
- Command="{Binding CheckedCommand}"
- CommandParameter="4" Content="冷凝水罐湿度" FontSize="14"
- Foreground="{StaticResource 冷凝水罐湿度}"
- IsChecked="{Binding VisStatus[4]}"
- IsEnabled="{Binding IsEnable}" />
- <CheckBox
- Command="{Binding CheckedCommand}"
- CommandParameter="5" Content="负压流量" FontSize="14"
- Foreground="{StaticResource 负压流量}"
- IsChecked="{Binding VisStatus[5]}"
- IsEnabled="{Binding IsEnable}" />
- <CheckBox
- Command="{Binding CheckedCommand}"
- CommandParameter="6" Content="称重水罐重量" FontSize="14"
- Foreground="{StaticResource 称重水罐重量}"
- IsChecked="{Binding VisStatus[6]}"
- IsEnabled="{Binding IsEnable}" />
- <CheckBox
- Command="{Binding CheckedCommand}"
- CommandParameter="7" Content="反应釜编码器值" FontSize="14"
- Foreground="{StaticResource 反应釜编码器值}"
- IsChecked="{Binding VisStatus[7]}"
- IsEnabled="{Binding IsEnable}" />
- <CheckBox
- Command="{Binding CheckedCommand}"
- CommandParameter="8" Content="比例阀开度" FontSize="14"
- Foreground="{StaticResource 比例阀实际开度}"
- IsChecked="{Binding VisStatus[8]}"
- IsEnabled="{Binding IsEnable}" />
- <CheckBox
- Command="{Binding CheckedCommand}"
- CommandParameter="9" Content="卤水配制罐重量" FontSize="14"
- Foreground="{StaticResource 卤水配制罐重量}"
- IsChecked="{Binding VisStatus[9]}"
- IsEnabled="{Binding IsEnable}" />
- <CheckBox
- Command="{Binding CheckedCommand}"
- CommandParameter="10" Content="反应釜压力" FontSize="14"
- Foreground="{StaticResource 反应釜压力}"
- IsChecked="{Binding VisStatus[10]}"
- IsEnabled="{Binding IsEnable}" />
- </UniformGrid>
-
- <oxy:PlotView
- x:Name="chartView" Grid.Row="1" Margin="5" Background="White"
- Foreground="White"
- Model="{Binding OxyModel}"
- PanCursor="Hand" />
-
- <Border
- Grid.Row="1" Background="#dd727272"
- Visibility="{Binding LoadingVis}">
- <TextBlock
- HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" Text="正在加载数据,请耐心等待..." />
- </Border>
-
- </Grid>
-
- <!--#endregion-->
-
- </Grid>
-
- </Grid>
- </UserControl>
|