|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <Window
- x:Class="BPASmartClient.JXJFoodSmallStation.View.NewMaterialView"
- 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.JXJFoodSmallStation.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
- Title="NewMateritalView"
- Width="600"
- Height="600"
- AllowsTransparency="True"
- Background="{x:Null}"
- Topmost="True"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
- <Window.DataContext>
- <vm:NewMaterialViewModel />
- </Window.DataContext>
- <Window.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
-
- <ResourceDictionary>
-
- <!--#region ListBox样式-->
- <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
- <Setter Property="OverridesDefaultStyle" Value="True" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="BorderBrush" Value="{x:Null}" />
- <Setter Property="Foreground" Value="White" />
- <Setter Property="FontSize" Value="20" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border x:Name="border" CornerRadius="8">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
- </ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </Window.Resources>
-
- <Border Name="br" BorderThickness="1">
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
- </Border.Background>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="5" />
- <RowDefinition Height="*" />
- <RowDefinition Height="40" />
- <RowDefinition Height="5" />
- <RowDefinition Height="5*" />
- </Grid.RowDefinitions>
- <StackPanel
- Grid.Row="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- Margin="10,0,0,0"
- Background="Transparent"
- FontSize="20"
- Foreground="#FF2AB2E7"
- Text="请输入原料名称:" />
-
-
-
- <TextBox
- Grid.Column="1"
- Width="200"
- Height="30"
- Margin="10"
- FontSize="16"
- Text="{Binding MaterialName}" />
-
- <Button
- Width="80"
- Height="30"
- Margin="10"
- Command="{Binding SaveCommand}"
- Content="保存"
- Cursor="Hand" />
- <Button
- Name="btClose"
- Width="80"
- Height="30"
- Margin="10"
- Click="btClose_Click"
- Content="取消" />
-
- </StackPanel>
- <TextBlock
- Grid.Row="2"
- Margin="0,0,5,0"
- HorizontalAlignment="Center"
- Background="Transparent"
- FontSize="16"
- Foreground="Red"
- Text="{Binding ErrorInfo}" />
- <Grid Grid.Row="4">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <TextBlock
- HorizontalAlignment="Center"
- FontSize="25"
- Foreground="#FF2AB2E7"
- Text="本地原料" />
- <Border
- Grid.Row="1"
- Margin="100,10"
- BorderBrush="#FF2AB2E7"
- BorderThickness="1">
- <ScrollViewer
- Grid.Row="1"
- BorderBrush="#FF2AB2E7"
- BorderThickness="1">
- <ItemsControl Margin="10" ItemsSource="{Binding Materials}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <RadioButton GroupName="all">
- <RadioButton.Template>
- <ControlTemplate TargetType="RadioButton">
- <Grid Name="gr" Height="40">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="2*" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <TextBlock
- Name="tb"
- Grid.Column="0"
- Width="150"
- Height="29"
- Margin="3,1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Text="{Binding RawMaterialName}" />
-
- <Button
- Grid.Column="1"
- Margin="10,0,10,0"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RawMaterialId}"
- Content="删除" />
- </Grid>
-
-
- </ControlTemplate>
- </RadioButton.Template>
- </RadioButton>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Border>
- </Grid>
-
- </Grid>
-
- </Border>
- </Window>
|