<Window x:Class="MegaRobo.C00225155App.MenuViews.EditPowderBottlePropertiesWindow"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:common="clr-namespace:Common;assembly=Common"
        xmlns:local="clr-namespace:MegaRobo.C00225155App.MenuViews"
        mc:Ignorable="d"  WindowStyle="ToolWindow"
        Title="粉末原液瓶参数设置" Height="300" Width="450" WindowStartupLocation="CenterScreen" >
    <Grid ShowGridLines="False">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" >
            <TextBlock Text="粉末容量：" Style="{StaticResource txtBlockBaseStyle}" />
            <ComboBox  Width="100"  Height="28"  Background="#FF98B9D6"  SelectedItem="{Binding PowderBottle.PowderBottleType, Mode=TwoWay}"  ItemsSource="{x:Static common:EnumHelper.PowderBottleTypes}"/>
            <TextBlock Text="是否有粉末瓶:" Style="{StaticResource txtBlockBaseStyle}"  Margin="40,0,5,0"/>
            <CheckBox IsChecked="{Binding PowderBottle.HaveBottle,Mode=TwoWay,FallbackValue=False}"  IsEnabled="False" Margin="0,3"/>
        </StackPanel>

        <StackPanel  Orientation="Horizontal" Grid.Row="1" Grid.Column="0"  Grid.ColumnSpan="2" VerticalAlignment="Center" >
            <TextBlock Text="原工装SN：" Style="{StaticResource txtBlockBaseStyle}" />
            <TextBlock Text="{Binding PowderBottle.BoxSNCode,Mode=OneWay}" Style="{StaticResource txtBlockStyle}"/>
            <TextBlock Text="位置:" Style="{StaticResource txtBlockBaseStyle}" Margin="40,0,5,0" />
            <TextBlock Text="{Binding PowderBottle.PosId_InBox,Mode=OneWay}" Style="{StaticResource txtBlockStyle}"/>
           
        </StackPanel>
        <StackPanel  Orientation="Horizontal" Grid.Row="2" Grid.Column="0" >
            <TextBlock Text="粉末名称:"  Style="{StaticResource txtBlockBaseStyle}"/>
            <TextBox Text="{Binding PowderBottle.SourcePowderName}"  Style="{StaticResource textBoxStyle}"/>
        </StackPanel>
        <StackPanel  Orientation="Horizontal" Grid.Row="2" Grid.Column="1" >
            <TextBlock Text="二维码:"  Style="{StaticResource txtBlockBaseStyle}"/>
            <TextBox Text="{Binding PowderBottle.SNCode}"  Style="{StaticResource textBoxStyle}"/>
        </StackPanel>
        <StackPanel  Orientation="Horizontal" Grid.Row="3" Grid.Column="0" >
            <TextBlock Text="粉末重量:" Style="{StaticResource txtBlockBaseStyle}"/>
            <TextBox Text="{Binding PowderBottle.OriginWeight,StringFormat=F3,Mode=TwoWay}"  Style="{StaticResource textBoxStyle}"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal" Grid.Row="3"  Grid.Column="1" >
            <TextBlock Text="粉末剩余重量:"  Style="{StaticResource txtBlockBaseStyle}"/>
            <TextBlock Text="{Binding PowderBottle.RemainWeight,StringFormat=F3,Mode=TwoWay}"  Style="{StaticResource txtBlockStyle}"/>
        </StackPanel>

        <Button Content="保存"  Click="SaveButton_Click"  Style="{DynamicResource okBtnStyle}" Grid.Row="4"  Grid.Column="1"/>
    </Grid>
</Window>
