|
|
@ -6,7 +6,7 @@
|
|
|
|
xmlns:local="clr-namespace:SlnMesnac.WPF.Views" WindowStartupLocation="CenterScreen"
|
|
|
|
xmlns:local="clr-namespace:SlnMesnac.WPF.Views" WindowStartupLocation="CenterScreen"
|
|
|
|
xmlns:converters="clr-namespace:SlnMesnac.WPF.ConvertTo"
|
|
|
|
xmlns:converters="clr-namespace:SlnMesnac.WPF.ConvertTo"
|
|
|
|
mc:Ignorable="d" Background="#1157b9"
|
|
|
|
mc:Ignorable="d" Background="#1157b9"
|
|
|
|
Title="配方管理" Height="500" Width="500">
|
|
|
|
Title="配方管理" Height="1000" Width="1200">
|
|
|
|
<Window.Resources>
|
|
|
|
<Window.Resources>
|
|
|
|
<converters:BooleanToOppositeBooleanConverter x:Key="InverseBooleanConverter" />
|
|
|
|
<converters:BooleanToOppositeBooleanConverter x:Key="InverseBooleanConverter" />
|
|
|
|
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
|
|
|
|
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
|
|
|
@ -70,29 +70,50 @@
|
|
|
|
<Grid>
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="6*"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<StackPanel Orientation="horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center">
|
|
|
|
<StackPanel Grid.Row="0" Background="#1157b9" Margin="1,1,5,5" Orientation="Horizontal" >
|
|
|
|
<Label Content="相机模版Key:" FontSize="20" Foreground="White"/>
|
|
|
|
<TextBlock Text="型号:" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="100 0 0 0"/>
|
|
|
|
<TextBox Text="{Binding KeyTxt,Mode=TwoWay}" Width="100" FontSize="20" Foreground="White" Margin="0 0 30 0" />
|
|
|
|
<TextBox IsReadOnly="True" Text="{Binding MaterialType}" FontSize="20" Width="200" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" Margin="10 0 0 0"/>
|
|
|
|
<Label Content="冰箱型号参数:" Width="130" FontSize="20" Foreground="White"/>
|
|
|
|
|
|
|
|
<TextBox Text="{Binding ValueTxt,Mode=TwoWay}" Width="300" FontSize="20" Foreground="White" Margin="0 0 30 0" />
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
Content="添 加" Command="{Binding AddCommand}"
|
|
|
|
|
|
|
|
Style="{StaticResource MaterialDesignRaisedSecondaryDarkButton}" Background="LimeGreen" Margin="0 0 100 0"/>
|
|
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Row="1" Background="#1157b9" Margin="1,1,5,5" Orientation="Horizontal">
|
|
|
|
<UniformGrid Grid.Row="1">
|
|
|
|
<TextBlock Text="是否检测:" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="100 0 0 0"/>
|
|
|
|
<DataGrid x:Name="listDataGrid" Grid.Row="0" ItemsSource="{Binding LogoFormulaDataGrid}" Background="#00000000"
|
|
|
|
|
|
|
|
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
|
|
|
|
|
|
|
|
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="20"
|
|
|
|
|
|
|
|
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto" LoadingRow="dgvMH_LoadingRow"
|
|
|
|
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
|
|
|
|
|
|
|
|
Foreground="White" >
|
|
|
|
|
|
|
|
<!--修改选中字体颜色-->
|
|
|
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
|
|
|
|
<DataGridTemplateColumn Width="55" Header="序号" >
|
|
|
|
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
|
|
|
<TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" FontSize="18" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"></TextBlock>
|
|
|
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Key}" Header="相机模版Key" Width="*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Value}" Header="冰箱型号参数" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DataGridTemplateColumn Header="操作" Width="1.5*">
|
|
|
|
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
|
|
|
<Button Content="删除" Background="Red" Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
|
|
|
|
|
|
|
CommandParameter="{Binding Key}"/>
|
|
|
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
|
|
|
</DataGrid.Columns>
|
|
|
|
|
|
|
|
</DataGrid>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</UniformGrid>
|
|
|
|
|
|
|
|
|
|
|
|
<RadioButton Foreground="White" Content="是" GroupName="DetectionOptions" IsChecked="{Binding IsDetectionChecked, Mode=TwoWay}" VerticalAlignment="Center" Margin="10 0 0 0"/>
|
|
|
|
|
|
|
|
<RadioButton Foreground="White" Content="否" GroupName="DetectionOptions" IsChecked="{Binding IsDetectionChecked, Converter={StaticResource InverseBooleanConverter}, Mode=TwoWay}" VerticalAlignment="Center" Margin="10 0 0 0"/>
|
|
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="2" Background="#1157b9" Margin="1,1,5,5" Orientation="Horizontal" >
|
|
|
|
|
|
|
|
<TextBlock Text="识别类型:" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="100 0 0 0"/>
|
|
|
|
|
|
|
|
<TextBox Text="{Binding MaterialType}" FontSize="20" Width="200" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" Margin="10 0 0 0"/>
|
|
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<Border Grid.Row="3" Background="#1157b9" Margin="1,1,5,5" >
|
|
|
|
|
|
|
|
<Button Content="保 存" Command="{Binding SaveCommand}" Width="80"
|
|
|
|
|
|
|
|
Style="{StaticResource MaterialDesignRaisedSecondaryDarkButton}" Background="Green" HorizontalContentAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Border>
|
|
|
|