|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- <UserControl
- x:Class="BPASmartClient.JXJFoodSmallStation.View.DeviceMaterialParView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:con="clr-namespace:BPASmartClient.JXJFoodSmallStation.Converter"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.JXJFoodSmallStation.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
- d:DesignHeight="1080"
- d:DesignWidth="1920"
- mc:Ignorable="d">
-
- <UserControl.DataContext>
- <vm:DeviceMaterialParViewModel />
- </UserControl.DataContext>
-
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.JXJFoodSmallStation;component/Resource/MyStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
-
- <Grid Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition Height="40" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
- <Button
- Width="150"
- Height="40"
- Margin="10,0,10,0"
- Command="{Binding AddCommand}"
- Content="添加原料参数"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- <Button
- Width="150"
- Height="40"
- Margin="10,0,10,0"
- Command="{Binding SaveCommand}"
- Content="保存参数"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- </StackPanel>
-
- <!--#region 表格标题栏设置-->
- <Grid
- Grid.Row="1"
- Margin="0,10,0,0"
- Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
-
- <TextBlock
- Grid.Column="0"
- Style="{StaticResource TitleTextblockStyle}"
- Text="原料名称" />
-
- <Grid Grid.Column="1">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="慢加重量(g)" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="2"
- Style="{StaticResource TitleTextblockStyle}"
- Text="提前关阀重量" />
-
- <Grid Grid.Column="3">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="快加速度" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="4"
- Style="{StaticResource TitleTextblockStyle}"
- Text="慢加速度" />
-
- <Grid Grid.Column="5">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="伺服手动速度" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="6"
- Style="{StaticResource TitleTextblockStyle}"
- Text="料仓上限重量" />
-
- <Grid Grid.Column="7">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="料仓下限重量" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="8"
- Style="{StaticResource TitleTextblockStyle}"
- Text="搅拌速度" />
-
- <Grid Grid.Column="9">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="精度误差阈值(±g)" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="10">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="功能操作" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <Border
- Grid.ColumnSpan="11"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
-
- </Grid>
- <!--#endregion-->
-
- <Grid Grid.Row="2">
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding deviceParModels}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr" Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBox
- Grid.Column="0"
- Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding MaterialName}" />
-
- <Grid Grid.Column="1">
- <TextBox
- Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding SlowlyAddWeight}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBox
- Grid.Column="2"
- Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding PreCloseValveWeight}" />
-
- <Grid Grid.Column="3">
- <TextBox
- Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding RapidAcceleration}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBox
- Grid.Column="4"
- Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding SlowAcceleration}" />
-
- <Grid Grid.Column="5">
- <TextBox
- Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding ServoManualSpeed}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBox
- Grid.Column="6"
- Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding SiloUpperLimitWeight}" />
-
- <Grid Grid.Column="7">
- <TextBox
- Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding LowerLimitWeightOfSilo}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBox
- Grid.Column="8"
- Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding StirringSpeed}" />
-
- <Grid Grid.Column="9">
- <TextBox
- Foreground="Red"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding ErrorRange}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Button
- Grid.Column="10"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding MaterialName}"
- Content="删除"
- FontSize="16"
- Style="{StaticResource ControlButtonStyle}" />
-
- <Border
- Grid.ColumnSpan="11"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,1" />
-
- </Grid>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
-
-
- </Grid>
- </UserControl>
|