|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- <Window
- x:Class="BPASmartClient.DosingSystem.View.NewOutletView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:con="clr-namespace:BPASmartClient.CustomResource.Converters;assembly=BPASmartClient.CustomResource"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
- Title="NewOutletView"
- Width="600"
- Height="400"
- AllowsTransparency="True"
- Background="{x:Null}"
- Topmost="True"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
-
- <Window.DataContext>
- <vm:NewOutletViewModel />
- </Window.DataContext>
-
- <Grid>
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/容器边框.png" />
- </Grid.Background>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="0.18*" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="{StaticResource FontColor}"
- Text="新建出料口" />
-
- <Grid Grid.Row="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="0.2*" />
- <RowDefinition Height="0.2*" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
-
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Margin="15,0,0,0"
- HorizontalAlignment="Left"
- FontSize="16"
- Style="{StaticResource TextBlockStyle}"
- Text="出料口名称:" />
-
- <TextBox
- Name="outName"
- Width="180"
- Height="35"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding OutletName}" />
-
- <TextBlock
- Margin="15,0,0,0"
- HorizontalAlignment="Left"
- FontSize="16"
- Style="{StaticResource TextBlockStyle}"
- Text="出料口位置:" />
-
- <TextBox
- Name="outLoc"
- Width="180"
- Height="35"
- Margin="5,0,0,0"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding OutletLoc}" />
- </StackPanel>
-
-
-
- <StackPanel
- Grid.Row="1"
- Margin="10,0,0,0"
- HorizontalAlignment="Right"
- Orientation="Horizontal">
-
- <!--<TextBox
- Name="outName"
- Width="180"
- Height="35"
- Margin="5,0,0,0"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}" />-->
-
- <TextBlock
- Margin="0,0,5,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#FFF53F62"
- Text="{Binding ErrorInfo}" />
-
- <Button
- Width="90"
- Height="30"
- Margin="5,0,5,0"
- Command="{Binding AddCommand}"
- Content="添加原料"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
-
- <Button
- Width="90"
- Height="30"
- Margin="5,0,5,0"
- Command="{Binding CancelCommand}"
- Content="取消"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
-
- <Button
- Grid.Column="1"
- Width="90"
- Height="30"
- Margin="5,0,5,0"
- Command="{Binding SaveCommand}"
- Content="保存"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- </StackPanel>
-
- <Grid Grid.Row="2" Margin="15,0,10,10">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="35" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <!--#region 表格标题栏设置-->
- <Grid Margin="0,10,0,0" Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="0.68*" />
- </Grid.ColumnDefinitions>
-
-
- <TextBlock
- Grid.Column="0"
- Style="{StaticResource TitleTextblockStyle}"
- Text="原料" />
-
- <Grid Grid.Column="1">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="功能操作" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Border
- Grid.ColumnSpan="2"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
-
- </Grid>
- <!--#endregion-->
-
- <ScrollViewer
- Grid.Row="1"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding SiloInfos}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <!--<RadioButton Content="{Binding RawMaterialName}" Name="rb" GroupName="all">
- <RadioButton.Template>
- <ControlTemplate TargetType="RadioButton">-->
- <Grid Name="gr" Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="0.68*" />
- </Grid.ColumnDefinitions>
-
- <ComboBox
- Name="cb"
- Grid.Column="0"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Left"
- BorderBrush="#FF074B92"
- BorderThickness="1"
- FontFamily="楷体"
- FontSize="20"
- Foreground="#FF2AB2E7"
- IsEditable="False"
- ItemsSource="{Binding DataContext.SileName, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- SelectedIndex="{Binding SelectIndex}"
- Style="{StaticResource ComboBoxStyle}"
- Text="{Binding RawMaterialName}" />
-
- <Button
- Grid.Column="1"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RawMaterialName}"
- Content="删除"
- FontSize="16"
- Style="{StaticResource ControlButtonStyle}" />
-
- <!--<Button
- Grid.Column="1"
- Width="80"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RawMaterialName}"
- Content="删除" />-->
-
- </Grid>
-
-
- <!--</ControlTemplate>
- </RadioButton.Template>
- </RadioButton>-->
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
-
- </Grid>
-
-
-
- </Grid>
-
- </Grid>
- </Window>
|