212 lines
9.6 KiB
XML
212 lines
9.6 KiB
XML
<UserControl
|
|
x:Class="CapMachine.Wpf.Views.DialogExpInfoView"
|
|
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:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:local="clr-namespace:CapMachine.Wpf.Views"
|
|
xmlns:localEx="clr-namespace:CapMachine.Wpf"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
Width="1900"
|
|
Height="900"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<localEx:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
|
<Style x:Key="myHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
|
|
<Setter Property="FontSize" Value="24" />
|
|
<Setter Property="Width" Value="218" />
|
|
</Style>
|
|
<Style x:Key="myHeaderStyle1" TargetType="{x:Type GridViewColumnHeader}">
|
|
<Setter Property="FontSize" Value="16" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
</Style>
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="50" />
|
|
<RowDefinition />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
|
<Button
|
|
Margin="10,0"
|
|
Command="{Binding AddCmd}"
|
|
FontWeight="Bold"
|
|
Foreground="CadetBlue"
|
|
Style="{StaticResource MaterialDesignFlatAccentBgButton}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="14"
|
|
Foreground="CadetBlue"
|
|
Text=" " />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="新增" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button
|
|
Margin="10,0"
|
|
Command="{Binding CopyCmd}"
|
|
FontWeight="Bold"
|
|
Foreground="CadetBlue"
|
|
Style="{StaticResource MaterialDesignFlatAccentBgButton}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="14"
|
|
Foreground="CadetBlue"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="复制" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button
|
|
Margin="10,0"
|
|
Command="{Binding DeleteCmd}"
|
|
FontWeight="Bold"
|
|
Foreground="CadetBlue"
|
|
Style="{StaticResource MaterialDesignFlatAccentBgButton}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="14"
|
|
Foreground="CadetBlue"
|
|
Text="" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="删除" />
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="1">
|
|
<DataGrid
|
|
x:Name="MainDatagrid"
|
|
Margin="5"
|
|
AutoGenerateColumns="False"
|
|
CanUserAddRows="False"
|
|
HeadersVisibility="Column"
|
|
ItemsSource="{Binding ExpInfoDtoItems}"
|
|
SelectionMode="Extended"
|
|
SelectionUnit="FullRow">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn
|
|
Binding="{Binding Name}"
|
|
Header="名称"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding WorkCond}"
|
|
Header="实验工况"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding ExpNo}"
|
|
Header="实验编号"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding ExpPerson}"
|
|
Header="试验人"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding CapModel}"
|
|
Header="压缩机型号"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding CapNo}"
|
|
Header="压缩机编号"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding RfNo}"
|
|
Header="制冷剂"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding Manufactor}"
|
|
Header="生产厂家"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding LubrOilModel}"
|
|
Header="润滑油型号"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding CapType}"
|
|
Header="压缩机类型"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding Weight}"
|
|
Header="压缩机重量"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding OilCount}"
|
|
Header="充油量"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding Cnee}"
|
|
Header="委托人"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding CneeCo}"
|
|
Header="委托公司"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding CneeNo}"
|
|
Header="委托单号"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding ExpType}"
|
|
Header="试验类型"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding BatchNo}"
|
|
Header="生产批号"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding RefStd}"
|
|
Header="参考标准"
|
|
IsReadOnly="{Binding Source={StaticResource Proxy}, Path=Data.IsComplete}" />
|
|
</DataGrid.Columns>
|
|
<i:Interaction.Triggers>
|
|
<i:EventTrigger EventName="SelectionChanged">
|
|
<prism:InvokeCommandAction Command="{Binding GridSelectionChangedCmd}" CommandParameter="{Binding ElementName=MainDatagrid, Path=SelectedItem}" />
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
</DataGrid>
|
|
</Grid>
|
|
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Margin="10,0,200,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="26"
|
|
Foreground="Black"
|
|
Text="{Binding CurSelectedItem.Name}" />
|
|
|
|
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Horizontal">
|
|
|
|
<Button
|
|
Margin="10,10"
|
|
Command="{Binding SaveCmd}"
|
|
Content="确定"
|
|
Foreground="White" />
|
|
<Button
|
|
Margin="10,10"
|
|
Command="{Binding CancelCmd}"
|
|
Content="取消"
|
|
Foreground="White" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|