MessageDialogView.xaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <UserControl x:Class="OpenSEMI.ClientBase.MessageDialogView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  7. xmlns:cal="http://www.caliburn.org"
  8. xmlns:micro="clr-namespace:Caliburn.Micro"
  9. Background="Transparent">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="auto"/>
  13. <RowDefinition/>
  14. <RowDefinition Height="10"/>
  15. </Grid.RowDefinitions>
  16. <Grid.Effect>
  17. <DropShadowEffect BlurRadius="6" ShadowDepth="6" Opacity="0.6"/>
  18. </Grid.Effect>
  19. <Grid MinWidth="300" MaxWidth="650" MinHeight="200" MaxHeight="400" Margin="0,0,10,10">
  20. <Grid.RowDefinitions>
  21. <RowDefinition Height="auto"/>
  22. <RowDefinition />
  23. <RowDefinition Height="10"/>
  24. </Grid.RowDefinitions>
  25. <Border x:Name="DialogWindow" BorderThickness="1,1,0,0" BorderBrush="{DynamicResource Color_BD_Dialog}" MinWidth="300" MinHeight="200" MaxWidth="600" MaxHeight="400" Grid.Row="1" Background="{DynamicResource Color_BG_Dialog}" >
  26. <Border BorderBrush="{DynamicResource Color_BG_Dialog_Shadow}" BorderThickness="0,0,1,1">
  27. <Grid>
  28. <Grid.RowDefinitions>
  29. <RowDefinition />
  30. <RowDefinition Height="Auto"/>
  31. </Grid.RowDefinitions>
  32. <Rectangle Margin="5" Grid.RowSpan="2" Fill="{DynamicResource Color_BG_Dialog_Inner}"/>
  33. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" CanContentScroll="True" Margin="20,20,20,0">
  34. <Grid>
  35. <Grid.ColumnDefinitions>
  36. <ColumnDefinition Width="40"/>
  37. <ColumnDefinition/>
  38. </Grid.ColumnDefinitions>
  39. <Grid VerticalAlignment="Top">
  40. <Grid x:Name="Warning" Width="40" Height="40">
  41. <Grid Width="30" Height="30">
  42. <Ellipse Fill="#FF8B5D00">
  43. <Ellipse.Effect>
  44. <DropShadowEffect Color="White" ShadowDepth="0" BlurRadius="10"/>
  45. </Ellipse.Effect>
  46. </Ellipse>
  47. <Ellipse Margin="3,3,3,1.5">
  48. <Ellipse.Effect>
  49. <BlurEffect Radius="10"/>
  50. </Ellipse.Effect>
  51. <Ellipse.Fill>
  52. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  53. <GradientStop Color="#FFEB9E00" Offset="0"/>
  54. <GradientStop Color="#FFFDFA00" Offset="1"/>
  55. </LinearGradientBrush>
  56. </Ellipse.Fill>
  57. </Ellipse>
  58. <Ellipse Margin="5,2.5,5,12">
  59. <Ellipse.Fill>
  60. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  61. <GradientStop Color="White" Offset="0.2"/>
  62. <GradientStop Offset="1"/>
  63. </LinearGradientBrush>
  64. </Ellipse.Fill>
  65. </Ellipse>
  66. <TextBlock TextWrapping="Wrap" Text="!" FontWeight="Bold" FontFamily="Belwe Bd BT" FontSize="26.667" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF682600">
  67. <TextBlock.Effect>
  68. <DropShadowEffect ShadowDepth="0" Color="White"/>
  69. </TextBlock.Effect>
  70. </TextBlock>
  71. </Grid>
  72. <Grid.Style>
  73. <Style>
  74. <Setter Property="Grid.Visibility" Value="Collapsed"/>
  75. <Style.Triggers>
  76. <DataTrigger Binding="{Binding DialogType}" Value="WARNING">
  77. <Setter Property="Grid.Visibility" Value="Visible"/>
  78. </DataTrigger>
  79. </Style.Triggers>
  80. </Style>
  81. </Grid.Style>
  82. </Grid>
  83. <Grid x:Name="Information" Width="40" Height="40">
  84. <Grid Width="30" Height="30">
  85. <Ellipse Fill="#FF00628B">
  86. <Ellipse.Effect>
  87. <DropShadowEffect Color="White" ShadowDepth="0" BlurRadius="10"/>
  88. </Ellipse.Effect>
  89. </Ellipse>
  90. <Ellipse Margin="3,3,3,1.5">
  91. <Ellipse.Effect>
  92. <BlurEffect Radius="10"/>
  93. </Ellipse.Effect>
  94. <Ellipse.Fill>
  95. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  96. <GradientStop Color="#FF007BDA" Offset="0"/>
  97. <GradientStop Color="#FF68C6D8" Offset="1"/>
  98. </LinearGradientBrush>
  99. </Ellipse.Fill>
  100. </Ellipse>
  101. <Ellipse Margin="5,2.5,5,12">
  102. <Ellipse.Fill>
  103. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  104. <GradientStop Color="White" Offset="0.2"/>
  105. <GradientStop Offset="1"/>
  106. </LinearGradientBrush>
  107. </Ellipse.Fill>
  108. </Ellipse>
  109. <TextBlock TextWrapping="Wrap" Text="i" FontSize="26.667" Foreground="#FF002368" FontFamily="Monotype Corsiva" Margin="9.5,2.5,6.5,-2.5" FontWeight="Bold">
  110. <TextBlock.Effect>
  111. <DropShadowEffect ShadowDepth="0" Color="White"/>
  112. </TextBlock.Effect>
  113. </TextBlock>
  114. </Grid>
  115. <Grid.Style>
  116. <Style>
  117. <Setter Property="Grid.Visibility" Value="Collapsed"/>
  118. <Style.Triggers>
  119. <DataTrigger Binding="{Binding DialogType}" Value="INFO">
  120. <Setter Property="Grid.Visibility" Value="Visible"/>
  121. </DataTrigger>
  122. </Style.Triggers>
  123. </Style>
  124. </Grid.Style>
  125. </Grid>
  126. <Grid x:Name="Error" Width="40" Height="40">
  127. <Grid Width="30" Height="30">
  128. <Ellipse Fill="#FFB60000">
  129. <Ellipse.Effect>
  130. <DropShadowEffect Color="White" ShadowDepth="0" BlurRadius="10"/>
  131. </Ellipse.Effect>
  132. </Ellipse>
  133. <Ellipse Margin="3,3,3,1.5">
  134. <Ellipse.Effect>
  135. <BlurEffect Radius="10"/>
  136. </Ellipse.Effect>
  137. <Ellipse.Fill>
  138. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  139. <GradientStop Color="#FFFF2F00" Offset="0"/>
  140. <GradientStop Color="#FFFF9D6F" Offset="1"/>
  141. </LinearGradientBrush>
  142. </Ellipse.Fill>
  143. </Ellipse>
  144. <Ellipse Margin="5,2.5,5,12">
  145. <Ellipse.Fill>
  146. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  147. <GradientStop Color="White" Offset="0.2"/>
  148. <GradientStop Offset="1"/>
  149. </LinearGradientBrush>
  150. </Ellipse.Fill>
  151. </Ellipse>
  152. <TextBlock TextWrapping="Wrap" Text="×" FontWeight="Bold" FontFamily="Arial Black" FontSize="24" HorizontalAlignment="Center" Foreground="#FF740000" Margin="0,2,0,0">
  153. <TextBlock.Effect>
  154. <DropShadowEffect ShadowDepth="0" Color="White"/>
  155. </TextBlock.Effect>
  156. </TextBlock>
  157. </Grid>
  158. <Grid.Style>
  159. <Style>
  160. <Setter Property="Grid.Visibility" Value="Collapsed"/>
  161. <Style.Triggers>
  162. <DataTrigger Binding="{Binding DialogType}" Value="ERROR">
  163. <Setter Property="Grid.Visibility" Value="Visible"/>
  164. </DataTrigger>
  165. </Style.Triggers>
  166. </Style>
  167. </Grid.Style>
  168. </Grid>
  169. <Grid x:Name="Confirm" Width="40" Height="40">
  170. <Grid Width="30" Height="30">
  171. <Ellipse Fill="#FF006A28">
  172. <Ellipse.Effect>
  173. <DropShadowEffect Color="White" ShadowDepth="0" BlurRadius="10"/>
  174. </Ellipse.Effect>
  175. </Ellipse>
  176. <Ellipse Margin="3,3,3,1.5">
  177. <Ellipse.Effect>
  178. <BlurEffect Radius="10"/>
  179. </Ellipse.Effect>
  180. <Ellipse.Fill>
  181. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  182. <GradientStop Color="#FF68EB00" Offset="0"/>
  183. <GradientStop Color="#FFE1FF82" Offset="1"/>
  184. </LinearGradientBrush>
  185. </Ellipse.Fill>
  186. </Ellipse>
  187. <Ellipse Margin="5,2.5,5,12">
  188. <Ellipse.Fill>
  189. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  190. <GradientStop Color="White" Offset="0.2"/>
  191. <GradientStop Offset="1"/>
  192. </LinearGradientBrush>
  193. </Ellipse.Fill>
  194. </Ellipse>
  195. <Path Data="M0,0 L4,0 4,3.8890872 16.010408,3.8890872 16.010408,7.8890872 0.010407538,7.8890872 0.010407538,3.9999998 0,3.9999998 z" Fill="#FF005601" Margin="8,9.5,6,12.5" RenderTransformOrigin="0.500325027316656,0.746485246105757" Stretch="Fill">
  196. <Path.RenderTransform>
  197. <TransformGroup>
  198. <ScaleTransform/>
  199. <SkewTransform/>
  200. <RotateTransform Angle="-50"/>
  201. <TranslateTransform/>
  202. </TransformGroup>
  203. </Path.RenderTransform>
  204. </Path>
  205. </Grid>
  206. <Grid.Style>
  207. <Style>
  208. <Setter Property="Grid.Visibility" Value="Collapsed"/>
  209. <Style.Triggers>
  210. <DataTrigger Binding="{Binding DialogType}" Value="CONFIRM">
  211. <Setter Property="Grid.Visibility" Value="Visible"/>
  212. </DataTrigger>
  213. </Style.Triggers>
  214. </Style>
  215. </Grid.Style>
  216. </Grid>
  217. </Grid>
  218. <TextBlock Grid.Column="1" TextAlignment="Left" Text="{Binding Text}" VerticalAlignment="Top" Margin="0,10,0,0" TextWrapping="Wrap" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource Color_FG_Black}"></TextBlock>
  219. </Grid>
  220. </ScrollViewer>
  221. <ListBox ItemsSource="{Binding Buttons}" BorderThickness="0" Grid.Row="1" Background="{x:Null}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,10">
  222. <ListBox.ItemsPanel>
  223. <ItemsPanelTemplate>
  224. <VirtualizingStackPanel Orientation="Horizontal"></VirtualizingStackPanel>
  225. </ItemsPanelTemplate>
  226. </ListBox.ItemsPanel>
  227. <ListBox.ItemTemplate>
  228. <DataTemplate>
  229. <Button Content="{Binding Name}" Width="75" Height="30" IsCancel="{Binding IsCancel}" IsDefault="{Binding IsDefault}" Margin="5,0">
  230. <i:Interaction.Triggers>
  231. <i:EventTrigger EventName="Click">
  232. <micro:ActionMessage MethodName="OnButtonClick">
  233. <micro:Parameter Value="$source" />
  234. </micro:ActionMessage>
  235. </i:EventTrigger>
  236. </i:Interaction.Triggers>
  237. </Button>
  238. </DataTemplate>
  239. </ListBox.ItemTemplate>
  240. </ListBox>
  241. </Grid>
  242. </Border>
  243. </Border>
  244. <Path Data="M8,0 L8,4 4,0" Fill="{DynamicResource Color_BG_Dialog}" HorizontalAlignment="Right" Margin="0,-2,40,0" Stretch="Fill" Width="8" Grid.Row="2" Stroke="{DynamicResource Color_BG_Dialog_Shadow}"/>
  245. </Grid>
  246. </Grid>
  247. </UserControl>