SystemAnnouncementView.xaml 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <windows1:WindowBase x:Class="Muchinfo.MTPClient.Account.Views.SystemAnnouncementView"
  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=Muchinfo.MTPClient.Infrastructure"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:dataGrid="clr-namespace:Muchinfo.WPF.Controls.DataGrid;assembly=Muchinfo.WPF.Controls"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Muchinfo.MTPClient.Resources"
  9. xmlns:windows1="clr-namespace:Muchinfo.WPF.Controls.Windows;assembly=Muchinfo.WPF.Controls"
  10. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  11. x:Name="announcementWindow"
  12. Title="{x:Static resource:Muchinfo_Resource.SystemAnnouncementView_Title}"
  13. Width="700"
  14. Height="500"
  15. ShowInTaskbar="False"
  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:Muchinfo_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 CurrentAnnouncementMessage,
  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:Muchinfo_Resource.Content_State}" />
  45. <DataGridTextColumn Width="*"
  46. MinWidth="100"
  47. Binding="{Binding Title}"
  48. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  49. Header="{x:Static resource:Muchinfo_Resource.Content_Theme}" />
  50. <DataGridTextColumn Width="*"
  51. MinWidth="80"
  52. Binding="{Binding PubExchName}"
  53. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  54. Header="{x:Static resource:Muchinfo_Resource.SystemAnnouncementView_Publisher}" />
  55. <DataGridTextColumn Width="*"
  56. MinWidth="80"
  57. Binding="{Binding PublishDateString}"
  58. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  59. Header="{x:Static resource:Muchinfo_Resource.Content_ReleascDates}" />
  60. <!--
  61. 隐藏过期时间<DataGridTextColumn Width="*"
  62. MinWidth="80"
  63. Binding="{Binding ValidDateString}"
  64. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  65. Header="{x:Static resource:Muchinfo_Resource.SystemAnnouncementView_ValidDate}" />
  66. -->
  67. </DataGrid.Columns>
  68. </dataGrid:MuchinfoDataGrid>
  69. <StackPanel Grid.Row="1"
  70. HorizontalAlignment="Center"
  71. VerticalAlignment="Center"
  72. Orientation="Horizontal">
  73. <Button Width="82"
  74. Height="30"
  75. Margin="10,0,10,0"
  76. Command="{Binding PrevCommand}"
  77. Content="{x:Static resource:Muchinfo_Resource.SystemAnnouncementView_PrevPage}"
  78. Style="{DynamicResource CommonButtonStyle}" />
  79. <TextBlock Margin="10,0,10,0"
  80. HorizontalAlignment="Center"
  81. VerticalAlignment="Center"
  82. Text="{Binding CurrentPageIndex}" />
  83. <TextBlock HorizontalAlignment="Center"
  84. VerticalAlignment="Center"
  85. Text="/" />
  86. <TextBlock Margin="10,0,10,0"
  87. HorizontalAlignment="Center"
  88. VerticalAlignment="Center"
  89. Text="{Binding TotalPageCount}" />
  90. <Button Width="82"
  91. Height="30"
  92. Margin="10,0,10,0"
  93. Command="{Binding NextCommand}"
  94. Content="{x:Static resource:Muchinfo_Resource.SystemAnnouncementView_NextPage}"
  95. Style="{DynamicResource CommonButtonStyle}" />
  96. <TextBlock Margin="10,0,10,0"
  97. HorizontalAlignment="Center"
  98. VerticalAlignment="Center"
  99. Text="{x:Static resource:Muchinfo_Resource.SystemAnnouncementView_GoTo}" />
  100. <TextBox Name="pageCount"
  101. Width="50"
  102. Height="20"
  103. Margin="10,0,10,0" />
  104. <TextBlock Margin="10,0,10,0"
  105. HorizontalAlignment="Center"
  106. VerticalAlignment="Center"
  107. Text="{x:Static resource:Muchinfo_Resource.SystemAnnouncementView_Page}" />
  108. <Button Width="82"
  109. Height="30"
  110. Margin="10,0,10,0"
  111. Command="{Binding QueryCommand}"
  112. CommandParameter="{Binding ElementName=pageCount}"
  113. Content="{x:Static resource:Muchinfo_Resource.SystemAnnouncementView_Go}"
  114. Style="{DynamicResource CommonButtonStyle}" />
  115. </StackPanel>
  116. <Border Grid.Row="2"
  117. BorderBrush="{DynamicResource MuchinfoBrush67}"
  118. BorderThickness="1">
  119. <ScrollViewer Margin="10,0"
  120. HorizontalScrollBarVisibility="Disabled"
  121. VerticalScrollBarVisibility="Auto">
  122. <Grid Margin="0,10,0,10">
  123. <Grid.RowDefinitions>
  124. <RowDefinition Height="Auto" />
  125. <RowDefinition Height="Auto" />
  126. </Grid.RowDefinitions>
  127. <TextBlock HorizontalAlignment="Center"
  128. VerticalAlignment="Top"
  129. FontSize="15"
  130. Foreground="{Binding AnnouncementRiskLevel,
  131. Converter={StaticResource colorConvert}}"
  132. Text="{Binding AnnouncementTitle}" />
  133. <TextBlock Grid.Row="1"
  134. Margin="10"
  135. HorizontalAlignment="Left"
  136. VerticalAlignment="Top"
  137. Foreground="{Binding AnnouncementRiskLevel,
  138. Converter={StaticResource colorConvert}}"
  139. Text="{Binding AnnouncementContent}"
  140. TextWrapping="Wrap" />
  141. </Grid>
  142. </ScrollViewer>
  143. </Border>
  144. <StackPanel Grid.Row="3"
  145. HorizontalAlignment="Right"
  146. VerticalAlignment="Center"
  147. Orientation="Horizontal">
  148. <CheckBox Margin="0"
  149. VerticalAlignment="Center"
  150. Content="{x:Static resource:Muchinfo_Resource.Notice_NoShowSameNotice}"
  151. IsChecked="{Binding IsChecked,
  152. Mode=TwoWay}"
  153. Style="{DynamicResource mtpCheckBoxStyle}" />
  154. <Button Width="82"
  155. Height="30"
  156. Margin="10,0,10,0"
  157. VerticalAlignment="Center"
  158. Command="{Binding ClosedCommand}"
  159. CommandParameter="{Binding ElementName=announcementWindow}"
  160. Content="{x:Static resource:Muchinfo_Resource.Button_Close}"
  161. Style="{DynamicResource CommonButtonStyle}" />
  162. </StackPanel>
  163. </Grid>
  164. </xctk:BusyIndicator>
  165. </windows1:WindowBase>