| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384 |
- <UserControl x:Class="Muchinfo.MTPClient.Account.Views.TradeHeaderView"
- 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:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
- xmlns:utilities="clr-namespace:Muchinfo.MTPClient.Account.Utilities"
- Margin="0,0"
- DataContext="{Binding TradeHeader,
- Source={StaticResource Locator}}"
- FontSize="{DynamicResource MuchinfoFontSize_S}"
- mc:Ignorable="d">
- <UserControl.Resources>
- <BooleanToVisibilityConverter x:Key="ToVisibilityConverter" />
- <converters:BoolVisibilityExConverter x:Key="BoolOpposedVisibility" />
- <converters:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
- <DataTemplate x:Key="AccountFunstionStyle">
- <StackPanel Margin="20,6"
- VerticalAlignment="Center"
- Orientation="Horizontal "
- Visibility="{Binding CurrentTradeAccount.IsShowHeaderFundInfoEx,
- Converter={StaticResource BoolOpposedVisibility}}">
- <TextBlock>
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_NetValue}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding CurrentNetWorthDisplay,
- Mode=OneWay}" />
- </TextBlock>
- <TextBlock Margin="20,0">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_CanUseMoney}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding AvailMarginDisplay,
- Mode=OneWay}" />
- </TextBlock>
- <TextBlock>
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_OccupyCash}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding UsedMarginDisplay,
- Mode=OneWay}" />
- </TextBlock>
- <TextBlock Margin="20,0">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_Floating}" />
- <Run FontWeight="Bold"
- Foreground="{Binding FloatPLBrush,
- Mode=OneWay}"
- Text="{Binding FloatPL,
- Mode=OneWay}" />
- </TextBlock>
- <Grid Visibility="{Binding IsHiddenWithoutFullPay, Converter={StaticResource ToVisibilityConverter}}">
- <TextBlock>
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Domain_RiskRatio}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding RiskRatioDisplay,
- Mode=OneWay}" />
- </TextBlock>
- </Grid>
- </StackPanel>
- </DataTemplate>
- </UserControl.Resources>
- <ScrollViewer HorizontalScrollBarVisibility="Auto"
- Style="{DynamicResource QuoteMarketStyle}"
- VerticalScrollBarVisibility="Hidden">
- <Grid Height="33" Background="{DynamicResource AccountInfoBackground}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <StackPanel Grid.ColumnSpan="2" Orientation="Horizontal">
- <StackPanel Orientation="Horizontal">
- <Button Width="28"
- Height="24"
- Margin="20,0,5,0"
- VerticalAlignment="Center"
- Command="{Binding BackCommand}"
- Style="{DynamicResource ImageButtonStyle}"
- ToolTip="{x:Static resource:Client_Resource.Tools_Text_Back}">
- <Image Source="{DynamicResource BackImageSource}" Stretch="Uniform" />
- </Button>
- <Button Width="28"
- Height="24"
- Margin="5,0"
- VerticalAlignment="Center"
- Command="{Binding RefreshCommand}"
- Style="{DynamicResource ImageButtonStyle}"
- ToolTip="{x:Static resource:Client_Resource.Tools_Text_Reflash}">
- <Image Source="{DynamicResource ReflashImageSource}" Stretch="Uniform" />
- </Button>
- <Button Width="28"
- Height="24"
- Margin="5,0"
- VerticalAlignment="Center"
- Command="{Binding TradeSetCommand}"
- Style="{DynamicResource ImageButtonStyle}"
- ToolTip="{x:Static resource:Client_Resource.Tools_Text_TradeSet}">
- <Image Source="{DynamicResource TradeSetImageSource}" Stretch="Uniform" />
- </Button>
- <CheckBox x:Name="CheckBox"
- Width="28"
- Height="24"
- Margin="5,0,0,0"
- VerticalContentAlignment="Center"
- IsChecked="{Binding IsTradeVisible}"
- Padding="0"
- Style="{DynamicResource AccountInfoCheckBoxStyle}"
- Visibility="{Binding IsAccountLogin,
- Converter={StaticResource ToVisibilityConverter}}">
- <Grid>
- <Image Source="{DynamicResource TradeHideImageSource}"
- Stretch="Uniform"
- ToolTip="{x:Static resource:Client_Resource.Tools_Text_HideTrade}"
- Visibility="{Binding IsChecked,
- Converter={StaticResource ToVisibilityConverter},
- ElementName=CheckBox}" />
- <Image Source="{DynamicResource TradeExpandImageSource}"
- Stretch="Uniform"
- ToolTip="{x:Static resource:Client_Resource.Tools_Text_ExpandTrade}"
- Visibility="{Binding IsChecked,
- Converter={StaticResource BoolOpposedVisibility},
- ElementName=CheckBox}" />
- </Grid>
- </CheckBox>
- </StackPanel>
- <Grid DataContext="{Binding CurrentTradeAccount}" Visibility="Collapsed">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="2*" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- <!-- <ColumnDefinition Width="2*" /> -->
- </Grid.ColumnDefinitions>
- <Image Grid.Row="0"
- Width="12"
- Height="12"
- Margin="10,0,5,0"
- Source="{DynamicResource AccountIcon}" />
- <TextBlock Grid.Column="1"
- VerticalAlignment="Center"
- Foreground="{DynamicResource AccountInfoForeground2}">
- <Run Text="{x:Static resource:Client_Resource.Moduel_AccountLogin}" />
- <Run Text="{Binding LoginCode, Mode=OneWay}" />
- </TextBlock>
- <TextBlock Grid.Column="2"
- Margin="20,0,0,0"
- VerticalAlignment="Center"
- Foreground="{DynamicResource TextBlockForeground2}">
- <Run Text="{Binding CustomerName, Mode=OneWay}" />
- </TextBlock>
- <Separator Grid.Column="3"
- Width="1"
- Height="34"
- Margin="50,0,0,0"
- BorderBrush="{DynamicResource AccountInfoVerBorderBrush}"
- Style="{DynamicResource ThinSeparatorStyle}" />
- </Grid>
- <StackPanel Orientation="Horizontal" Visibility="{Binding MarkMenuTypeVisibility, Mode=TwoWay}">
- <Button x:Name="btn_BuyCommand"
- Width="70"
- Height="24"
- Margin="20,0,0,0"
- VerticalAlignment="Center"
- Command="{Binding BuyCommand}"
- Content="{x:Static resource:Client_Resource.Content_Purchase}"
- IsDefault="False"
- Style="{DynamicResource CommonButtonStyle}"
- Visibility="{Binding IsBidAskVbs,
- Converter={StaticResource BoolVisibilityConverter}}" />
- <Button x:Name="btn_SellCommand"
- Width="70"
- Height="24"
- Margin="10,0,0,0"
- VerticalAlignment="Center"
- Command="{Binding SellCommand}"
- Content="{x:Static resource:Client_Resource.Content_SellOut}"
- IsDefault="False"
- Style="{DynamicResource CommonButtonStyle}"
- Visibility="{Binding IsBidAskVbs,
- Converter={StaticResource BoolVisibilityConverter}}" />
- <Button Width="70"
- Height="24"
- Margin="10,0,0,0"
- VerticalAlignment="Center"
- Command="{Binding ListingCommand}"
- Content="{x:Static resource:Client_Resource.ListingMarket_Listing_btn}"
- IsDefault="False"
- Style="{DynamicResource CommonButtonStyle}"
- Visibility="{Binding IsShowListing,
- Converter={StaticResource BoolVisibilityConverter}}" />
- <Button Width="90"
- Height="24"
- Margin="10,0,0,0"
- VerticalAlignment="Center"
- Command="{Binding HoldCommand}"
- Content="{x:Static resource:Client_Resource.Button_HolderSummary}"
- Style="{DynamicResource CommonButtonStyle}" />
- <!--
- <Button Width="70"
- Height="24"
- Margin="10,0,0,0"
- VerticalAlignment="Center"
- Command="{Binding CancelCommand}"
- Content="{x:Static resource:Client_Resource.Button_Cancellation}"
- IsEnabled="{Binding IsCancelEnable}"
- Style="{DynamicResource CommonButtonStyle}" />
- -->
- </StackPanel>
- </StackPanel>
- <!-- 投资者信息 -->
- <StackPanel Grid.Column="2"
- Margin="20,6"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Orientation="Horizontal "
- Visibility="{Binding CurrentTradeAccount.IsShowHeaderFundInfo,
- Converter={StaticResource BoolOpposedVisibility}}">
- <!-- 登录账号 -->
- <TextBlock DataContext="{Binding CurrentTradeAccount}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_LoginID}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding LoginID}" />
- </TextBlock>
- <!-- 净值 -->
- <TextBlock Margin="10,0" DataContext="{Binding CurrentTradeAccount.FundsAccounts}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_NetValue}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding SumCurrentNetWorthDisplay,
- Mode=OneWay}" />
- </TextBlock>
- <!-- 市值 -->
- <Grid Visibility="{Binding IsHiddenWithoutMagin, Converter={StaticResource ToVisibilityConverter}}">
- <TextBlock Margin="10,0" DataContext="{Binding CurrentTradeAccount.FundsAccounts}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Content_PayNetWorth}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding PayNetWorthDisplay,
- Mode=OneWay}" />
- </TextBlock>
- </Grid>
- <!--
- 期初权益
- <TextBlock Margin="10,0" DataContext="{Binding CurrentTradeAccount.FundsAccounts}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Account_Amount_Balance}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding BalanceDisplay,
- Mode=OneWay}" />
- </TextBlock>
- -->
- <!-- 可用资金 -->
- <TextBlock Margin="10,0" DataContext="{Binding CurrentTradeAccount.FundsAccounts}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_CanUseMoney}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding AvailMarginDisplay,
- Mode=OneWay}" />
- </TextBlock>
- <!-- 占用资金 -->
- <Grid Visibility="{Binding IsHiddenWithoutFullPay, Converter={StaticResource ToVisibilityConverter}}">
- <TextBlock Margin="10,0" DataContext="{Binding CurrentTradeAccount.FundsAccounts}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_OccupyCash}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding UsedMarginDisplay,
- Mode=OneWay}" />
- </TextBlock>
- </Grid>
- <!--
- 总冻结保证金=冻结资金
- <Grid Visibility="{Binding IsHiddenWithoutFullPay, Converter={StaticResource ToVisibilityConverter}}">
- <TextBlock Margin="10,0" DataContext="{Binding CurrentTradeAccount.FundsAccounts}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Content_FreezeMargin}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding SumFreezeMarginDisplay,
- Mode=OneWay}" />
- </TextBlock>
- </Grid>
- -->
- <!-- 浮动盈亏 -->
- <Grid Visibility="{Binding IsHiddenWithoutFullPay, Converter={StaticResource ToVisibilityConverter}}">
- <TextBlock Margin="10,0" DataContext="{Binding CurrentTradeAccount.FundsAccounts}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_Floating}" />
- <Run FontWeight="Bold"
- Foreground="{Binding FloatPLBrush,
- Mode=OneWay}"
- Text="{Binding FloatPLDisplay,
- Mode=OneWay}" />
- </TextBlock>
- </Grid>
- <!-- 平仓盈亏 -->
- <Grid Visibility="{Binding IsHiddenWithoutFullPay, Converter={StaticResource ToVisibilityConverter}}">
- <TextBlock Margin="10,0" DataContext="{Binding CurrentTradeAccount.FundsAccounts}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Report_ClosePL}" />
- <Run FontWeight="Bold"
- Foreground="{Binding ClosePLBrush,
- Mode=OneWay}"
- Text="{Binding ClosePLDisplay,
- Mode=OneWay}" />
- </TextBlock>
- </Grid>
- <!-- 币种 -->
- <TextBlock Margin="10,0" DataContext="{Binding CurrentTradeAccount.FundsAccounts}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_Currency}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding Currency,
- Mode=OneWay}" />
- </TextBlock>
- <!-- 风险率 -->
- <TextBlock Margin="10,0"
- DataContext="{Binding CurrentTradeAccount.CurrentFundsAccount}"
- Visibility="{Binding IsHiddenWithoutFullPay,
- Converter={StaticResource ToVisibilityConverter}}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Domain_RiskRatio}" />
- <Run FontWeight="Bold"
- Foreground="{DynamicResource AccountTextForeground}"
- Text="{Binding RiskRatioDisplay,
- Mode=OneWay}" />
- </TextBlock>
- </StackPanel>
- <!--
- <StackPanel Grid.Column="2"
- Margin="20,6"
- VerticalAlignment="Center"
- Orientation="Horizontal "
- Visibility="{Binding CurrentTradeAccount.IsShowHeaderFundInfoEx,
- Converter={StaticResource BoolOpposedVisibility}}">
- <TextBlock DataContext="{Binding CurrentTradeAccount.MemberAccountInfo}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_NetValue}" />
- <Run Foreground="{DynamicResource AccountTextForeground}" Text="{Binding NetWorthDisplay, Mode=OneWay}" />
- </TextBlock>
- -->
- <!--
- 期初权益
- <TextBlock Margin="10,0" DataContext="{Binding CurrentTradeAccount.FundsAccounts}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Account_Amount_Balance}" />
- <Run Foreground="{DynamicResource AccountTextForeground}" Text="{Binding BalanceDisplay, Mode=OneWay}" />
- </TextBlock>
- -->
- <!--
- <TextBlock Margin="20,0" DataContext="{Binding CurrentTradeAccount.MemberAccountInfo}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_CanUseMoney}" />
- <Run Foreground="{DynamicResource AccountTextForeground}" Text="{Binding AvailMarginDisplay, Mode=OneWay}" />
- </TextBlock>
- <Grid Visibility="{Binding IsHiddenWithoutFullPay, Converter={StaticResource ToVisibilityConverter}}">
- <TextBlock Margin="20,0" DataContext="{Binding CurrentTradeAccount.MemberAccountInfo}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Moduel_OccupyCash}" />
- <Run Foreground="{DynamicResource AccountTextForeground}" Text="{Binding UsedMarginDisplay, Mode=OneWay}" />
- </TextBlock>
- </Grid>
- <Grid Visibility="{Binding IsHiddenWithoutFullPay, Converter={StaticResource ToVisibilityConverter}}">
- <TextBlock DataContext="{Binding CurrentTradeAccount.MemberAccountInfo}">
- <Run Foreground="{DynamicResource TextBlockForeground}" Text="{x:Static resource:Client_Resource.Domain_RiskRatio}" />
- <Run Foreground="{DynamicResource AccountTextForeground}" Text="{Binding RateDisplay, Mode=OneWay}" />
- </TextBlock>
- </Grid>
- </StackPanel>
- -->
- </Grid>
- </ScrollViewer>
- </UserControl>
|