| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294 |
- <Window x:Class="Muchinfo.MTPClient.Sale.Views.SaleOrderFrame"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:converters="clr-namespace:Muchinfo.MTPClient.Infrastructure.Converters;assembly=Client.Infrastructure"
- xmlns:resources="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
- xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- x:Name="openOrderWindow"
- Width="450"
- Background="{DynamicResource DialogBackgroundBrush}"
- MouseDown="Window_MouseDown"
- ResizeMode="NoResize"
- ShowInTaskbar="False"
- SizeToContent="Height"
- WindowStyle="None">
- <Window.Resources>
- <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
- <converters:EnumBooleanConvert x:Key="EnumBooleanConvert" />
- <Style TargetType="{x:Type TextBlock}">
- <Setter Property="HorizontalAlignment" Value="Right" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="Foreground" Value="{DynamicResource TextBlockForeground}" />
- </Style>
- <Style TargetType="{x:Type RadioButton}">
- <Setter Property="Foreground" Value="{DynamicResource MainForegroundBrush}" />
- </Style>
- <DataTemplate x:Key="saleGoodsDatatTemplate">
- <TextBlock>
- <Run Text="{Binding GoodsName}" />
- <Run Text=" " />
- <Run Text="{Binding GoodsCode}" />
- </TextBlock>
- </DataTemplate>
- </Window.Resources>
- <Border BorderBrush="{DynamicResource CommonBorderBrush}" BorderThickness="1">
- <xctk:BusyIndicator BusyContent="{Binding BusyTips,
- Mode=OneWay}"
- Foreground="Black"
- IsBusy="{Binding IsBusy,
- Mode=OneWay}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition Height="30" />
- <RowDefinition Height="30" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- <RowDefinition Height="80" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="70" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid Grid.ColumnSpan="2"
- Height="40"
- VerticalAlignment="Top">
- <TextBlock HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="18"
- FontWeight="Bold"
- Foreground="{DynamicResource MainForegroundBrush}">
- <Run Text="{x:Static resources:Client_Resource.Infrastructure_Entrust}" />
- <Run Text="{x:Static resources:Client_Resource.Content_SaleApply}" />
- </TextBlock>
- <Button x:Name="btnClose"
- Width="20"
- Margin="10,2"
- HorizontalAlignment="Right"
- Click="btnClose_Click"
- Padding="2"
- Style="{DynamicResource DialogCloseButtonStyle}" />
- <Path Width="406"
- Height="3"
- VerticalAlignment="Bottom"
- Data="F1M1,2C1,2 1,1 1,1 1,1 405,1 405,1 405,1 405,2 405,2 405,2 1,2 1,2z"
- Fill="#FF3A3232">
- <Path.Effect>
- <DropShadowEffect BlurRadius="0"
- Direction="-270"
- Opacity="0.25"
- ShadowDepth="1"
- Color="#FF010101" />
- </Path.Effect>
- </Path>
- </Grid>
- <TextBlock Grid.Row="1" Text="{x:Static resources:Client_Resource.Trade_Xaml_Accout_Title}" />
- <TextBlock Grid.Row="1"
- Grid.Column="1"
- Margin="20,0,0,0"
- HorizontalAlignment="Left"
- TextTrimming="CharacterEllipsis"
- TextWrapping="NoWrap">
- <Run Text="{Binding CurrentAccount.AccountId, Mode=OneWay}" />
- <Run Text=" " />
- <Run Text="{Binding CurrentAccount.CustomerName, Mode=OneWay}" />
- </TextBlock>
- <TextBlock Grid.Row="2" Text="{x:Static resources:Client_Resource.Trade_Xaml_Goods_Title}" />
- <ComboBox Grid.Row="2"
- Grid.Column="1"
- Width="200"
- Margin="20,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- ItemTemplate="{StaticResource saleGoodsDatatTemplate}"
- ItemsSource="{Binding SaleGoodses}"
- SelectedIndex="0"
- SelectedItem="{Binding CurrentSaleGoods,
- Mode=TwoWay}"
- Style="{DynamicResource SimpleComboBoxStyle}" />
- <StackPanel Grid.Row="3" Grid.ColumnSpan="2">
- <StackPanel Style="{DynamicResource NoTitleExpanderStyle}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="70" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Row="0" Text="{x:Static resources:Client_Resource.Trade_Xaml_OrderDir_Title}" />
- <StackPanel Grid.Row="0"
- Grid.Column="2"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <RadioButton Margin="20,0"
- Content="{x:Static resources:Client_Resource.Order_Sale_Buy}"
- IsChecked="{Binding Direction,
- Converter={StaticResource EnumBooleanConvert},
- ConverterParameter=0}"
- IsEnabled="False"
- Style="{DynamicResource RadioButtonStyle}" />
- <RadioButton Margin="20,0"
- Content="{x:Static resources:Client_Resource.Content_SellOut}"
- IsChecked="{Binding Direction,
- Converter={StaticResource EnumBooleanConvert},
- ConverterParameter=1}"
- IsEnabled="False"
- Style="{DynamicResource RadioButtonStyle}"
- Visibility="Collapsed" />
- </StackPanel>
- <StackPanel Grid.Row="1"
- Grid.Column="1"
- VerticalAlignment="Center"
- Orientation="Horizontal"
- Visibility="Collapsed">
- <RadioButton x:Name="RadMarketPrice"
- Margin="20,0"
- Content="{x:Static resources:Client_Resource.EntrustOrderFrame_Market}"
- IsEnabled="False"
- Style="{DynamicResource RadioButtonStyle}" />
- <RadioButton x:Name="radLimitPrice"
- Margin="20,0"
- Content="{x:Static resources:Client_Resource.EntrustOrderFrame_Limit}"
- IsChecked="True"
- IsEnabled="False"
- Style="{DynamicResource RadioButtonStyle}" />
- </StackPanel>
- </Grid>
- </StackPanel>
- <StackPanel Orientation="Vertical">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="40" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="70" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Row="0" Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Price}" />
- <xctk:DecimalUpDown Grid.Column="1"
- Width="180"
- Margin="20,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FormatString="{Binding PriceFormat}"
- Increment="{Binding PriceMinUnit}"
- IsEnabled="False"
- Style="{DynamicResource DecimalNewUpDownStyle}"
- TabIndex="5"
- Text="{Binding QuotePrice,
- Mode=TwoWay,
- UpdateSourceTrigger=PropertyChanged}"
- Visibility="{Binding IsChecked,
- ElementName=radLimitPrice,
- Converter={StaticResource BooleanToVisibilityConverter}}" />
- <xctk:DecimalUpDown Grid.Column="1"
- Width="180"
- Margin="20,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FormatString="{Binding PriceFormat}"
- Increment="{Binding PriceMinUnit}"
- IsEnabled="False"
- Style="{DynamicResource DecimalNewUpDownStyle}"
- TabIndex="5"
- Text="{Binding ExecutePrice,
- Mode=TwoWay,
- UpdateSourceTrigger=PropertyChanged}"
- Visibility="{Binding IsChecked,
- ElementName=radLimitPrice,
- Converter={StaticResource BooleanToVisibilityConverter}}" />
- <TextBlock Grid.Row="1" Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Lot}" />
- <StackPanel Grid.Row="1"
- Grid.Column="1"
- Orientation="Horizontal">
- <xctk:DecimalUpDown Width="120"
- Margin="20,0,0,0"
- VerticalAlignment="Center"
- DefaultValue="0"
- DisplayDefaultValueOnEmptyText="True"
- KeyDown="DecimalUpDown_KeyDown"
- Minimum="{Binding PerOrderQty}"
- Style="{DynamicResource DecimalNewUpDownStyle}"
- TabIndex="5"
- Value="{Binding Lot,
- Mode=TwoWay}" />
- <TextBlock Margin="5,0" Text="{x:Static resources:Client_Resource.EntrustOrderFrame_Hand}" />
- <TextBox Width="60"
- Margin="60,0,0,0"
- VerticalAlignment="Center"
- Style="{DynamicResource RectangleTextBox}"
- Text="{Binding AgreeUnitLot}" />
- <TextBlock Margin="10,0,0,0" Text="{Binding CurrentSaleGoods.AgreeUnitString}" />
- </StackPanel>
- <TextBlock Grid.Row="2"
- Grid.Column="1"
- Margin="20,0,0,0"
- HorizontalAlignment="Left">
- <Run Text="{Binding MinLot, Mode=OneWay}" />
- <Run Text="≤" />
- <Run Text="{x:Static resources:Client_Resource.SaleOrderFrame_CanBuyQty}" />
- <Run Text="≤" />
- <Run Text="{Binding MaxLot, Mode=OneWay}" />
- <Run Text="{x:Static resources:Client_Resource.SaleOrderFrame_AndMust}" />
- <Run Text="{Binding PerOrderQty, Mode=OneWay}" />
- <Run Text="{x:Static resources:Client_Resource.SaleOrderFrame_NumsDoulbe}" />
- </TextBlock>
- </Grid>
- </StackPanel>
- </StackPanel>
- <!-- 确定 -->
- <StackPanel Grid.Row="10"
- Grid.ColumnSpan="3"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <Button Width="82"
- Height="26"
- Command="{Binding OKCommand}"
- CommandParameter="{Binding ElementName=openOrderWindow}"
- Content="{x:Static resources:Client_Resource.Button_Confirm}"
- IsEnabled="{Binding OKButtonEnabled}"
- Style="{DynamicResource CommonButtonStyle}" />
- <Button Width="82"
- Height="26"
- Margin="60,0,0,0"
- Command="{Binding CancelCommand}"
- CommandParameter="{Binding ElementName=openOrderWindow}"
- Content="{x:Static resources:Client_Resource.Button_Cancel}"
- IsCancel="True"
- Style="{DynamicResource CommonButtonStyle}" />
- </StackPanel>
- <Button Grid.Row="10"
- Grid.Column="1"
- Margin="0,0,10,10"
- HorizontalAlignment="Right"
- VerticalAlignment="Bottom"
- Content="{x:Static resources:Client_Resource.EntrustOrderFrame_SetTrade}"
- Style="{DynamicResource TextButtonStyle}"
- Visibility="Collapsed" />
- </Grid>
- </xctk:BusyIndicator>
- </Border>
- </Window>
|