RiskControlNoticeView.xaml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <windows:TradeAccountWindow x:Class="Muchinfo.MTPClient.Account.Views.RiskControlNoticeView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:convert="clr-namespace:Muchinfo.MTPClient.Infrastructure.Converters;assembly=Client.Infrastructure"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:dataGrid="clr-namespace:Muchinfo.WPF.Controls.DataGrid;assembly=Client.WPF.Controls"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:password="clr-namespace:Muchinfo.WPF.Controls.Password;assembly=Client.WPF.Controls"
  9. xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
  10. xmlns:windows="clr-namespace:Muchinfo.MTPClient.Infrastructure.Windows;assembly=Client.Infrastructure"
  11. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  12. x:Name="riskWindow"
  13. Title="{x:Static resource:Client_Resource.Risk_Title}"
  14. Width="700"
  15. Height="500"
  16. Style="{DynamicResource WindowBaseStyle}"
  17. d:DesignHeight="300"
  18. d:DesignWidth="500"
  19. mc:Ignorable="d">
  20. <Window.Resources>
  21. <convert:FontColorConvert x:Key="colorConvert" />
  22. <Style TargetType="{x:Type TextBlock}">
  23. <Setter Property="Foreground" Value="{DynamicResource MuchinfoBrush105}" />
  24. </Style>
  25. </Window.Resources>
  26. <xctk:BusyIndicator BusyContent="{x:Static resource:Client_Resource.Content_Busy}" IsBusy="{Binding IsBusy, Mode=TwoWay}">
  27. <Grid>
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="5*" />
  30. <RowDefinition Height="40" />
  31. <RowDefinition Height="3*" />
  32. <RowDefinition Height="*" />
  33. </Grid.RowDefinitions>
  34. <dataGrid:MuchinfoDataGrid Grid.Row="0"
  35. ItemsSource="{Binding CurrentPageMessages}"
  36. SelectedItem="{Binding CurrentRiskMessage,
  37. Mode=TwoWay}"
  38. Style="{DynamicResource NoticeMuchinfoDataGridStyle}">
  39. <DataGrid.Columns>
  40. <DataGridTextColumn Width="50"
  41. MinWidth="50"
  42. Binding="{Binding ReadStatusString}"
  43. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  44. Header="{x:Static resource:Client_Resource.Content_State}" />
  45. <DataGridTextColumn Width="*"
  46. MinWidth="100"
  47. Binding="{Binding Title}"
  48. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  49. Header="{x:Static resource:Client_Resource.Content_Theme}" />
  50. <DataGridTextColumn Width="50"
  51. MinWidth="50"
  52. Binding="{Binding RiskLevelString}"
  53. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  54. Header="{x:Static resource:Client_Resource.Risk_Level}" />
  55. <DataGridTextColumn Width="*"
  56. MinWidth="80"
  57. Binding="{Binding PublishDateString}"
  58. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  59. Header="{x:Static resource:Client_Resource.Content_ReleascDates}" />
  60. </DataGrid.Columns>
  61. </dataGrid:MuchinfoDataGrid>
  62. <StackPanel Grid.Row="1"
  63. HorizontalAlignment="Center"
  64. VerticalAlignment="Center"
  65. Orientation="Horizontal">
  66. <Button Width="82"
  67. Height="30"
  68. Margin="10,0,10,0"
  69. Command="{Binding PrevCommand}"
  70. Content="{x:Static resource:Client_Resource.SystemAnnouncementView_PrevPage}"
  71. Style="{DynamicResource CommonButtonStyle}" />
  72. <TextBlock Margin="10,0,10,0"
  73. HorizontalAlignment="Center"
  74. VerticalAlignment="Center"
  75. Text="{Binding CurrentPageIndex}" />
  76. <TextBlock HorizontalAlignment="Center"
  77. VerticalAlignment="Center"
  78. Text="/" />
  79. <TextBlock Margin="10,0,10,0"
  80. HorizontalAlignment="Center"
  81. VerticalAlignment="Center"
  82. Text="{Binding TotalPageCount}" />
  83. <Button Width="82"
  84. Height="30"
  85. Margin="10,0,10,0"
  86. Command="{Binding NextCommand}"
  87. Content="{x:Static resource:Client_Resource.SystemAnnouncementView_NextPage}"
  88. Style="{DynamicResource CommonButtonStyle}" />
  89. <TextBlock Margin="10,0,10,0"
  90. HorizontalAlignment="Center"
  91. VerticalAlignment="Center"
  92. Text="{x:Static resource:Client_Resource.SystemAnnouncementView_GoTo}" />
  93. <TextBox Name="pageCount"
  94. Width="50"
  95. Height="20"
  96. Margin="10,0,10,0" />
  97. <TextBlock Margin="10,0,10,0"
  98. HorizontalAlignment="Center"
  99. VerticalAlignment="Center"
  100. Text="{x:Static resource:Client_Resource.SystemAnnouncementView_Page}" />
  101. <Button Width="82"
  102. Height="30"
  103. Margin="10,0,10,0"
  104. Command="{Binding QueryCommand}"
  105. CommandParameter="{Binding ElementName=pageCount}"
  106. Content="{x:Static resource:Client_Resource.SystemAnnouncementView_Go}"
  107. Style="{DynamicResource CommonButtonStyle}" />
  108. </StackPanel>
  109. <Border Grid.Row="2"
  110. Margin="0,0,0,0"
  111. BorderBrush="{DynamicResource MuchinfoBrush67}"
  112. BorderThickness="1">
  113. <ScrollViewer Margin="10,0"
  114. HorizontalScrollBarVisibility="Disabled"
  115. VerticalScrollBarVisibility="Auto">
  116. <Grid Margin="0,10,0,10">
  117. <Grid.RowDefinitions>
  118. <RowDefinition Height="Auto" />
  119. <RowDefinition Height="Auto" />
  120. </Grid.RowDefinitions>
  121. <TextBlock Grid.Row="0"
  122. HorizontalAlignment="Center"
  123. VerticalAlignment="Top"
  124. FontSize="15"
  125. Foreground="{Binding CurrentRiskLevel,
  126. Converter={StaticResource colorConvert}}"
  127. Text="{Binding CurrentRiskTitle}" />
  128. <TextBlock Grid.Row="1"
  129. Margin="10"
  130. HorizontalAlignment="Left"
  131. VerticalAlignment="Top"
  132. Foreground="{Binding CurrentRiskLevel,
  133. Converter={StaticResource colorConvert}}"
  134. Text="{Binding CurrentRiskContent}"
  135. TextWrapping="Wrap" />
  136. </Grid>
  137. </ScrollViewer>
  138. </Border>
  139. <StackPanel Grid.Row="3"
  140. HorizontalAlignment="Right"
  141. VerticalAlignment="Center"
  142. Orientation="Horizontal">
  143. <CheckBox VerticalAlignment="Center"
  144. Content="{x:Static resource:Client_Resource.Notice_NoShowSameNotice}"
  145. Style="{DynamicResource mtpCheckBoxStyle}"
  146. Visibility="Collapsed" />
  147. <Button Width="82"
  148. Height="30"
  149. Margin="10,0,10,0"
  150. VerticalAlignment="Center"
  151. Command="{Binding ClosedCommand}"
  152. CommandParameter="{Binding ElementName=riskWindow}"
  153. Content="{x:Static resource:Client_Resource.Button_Close}"
  154. Style="{DynamicResource CommonButtonStyle}" />
  155. </StackPanel>
  156. </Grid>
  157. </xctk:BusyIndicator>
  158. </windows:TradeAccountWindow>