LogoffView.xaml 6.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <UserControl x:Class="VirgoUI.Client.LogoffView"
  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. mc:Ignorable="d"
  7. xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  8. xmlns:cal="http://www.caliburn.org">
  9. <Border Height="480" Width="600" BorderBrush="{DynamicResource Color_BD_Logoff}" BorderThickness="5" Background="{DynamicResource Color_BG_Logoff}">
  10. <Grid>
  11. <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,25">
  12. <StackPanel.Effect>
  13. <DropShadowEffect BlurRadius="10" ShadowDepth="0" Color="White" Opacity="0.7"/>
  14. </StackPanel.Effect>
  15. <Button Content="Logoff" Width="100" Height="40" Margin="0,0,6,0">
  16. <i:Interaction.Triggers>
  17. <i:EventTrigger EventName="Click">
  18. <cal:ActionMessage MethodName="Logoff">
  19. </cal:ActionMessage>
  20. </i:EventTrigger>
  21. </i:Interaction.Triggers>
  22. </Button>
  23. <Button Content="Exit" Width="100" Height="40" Margin="0,0,6,0">
  24. <i:Interaction.Triggers>
  25. <i:EventTrigger EventName="Click">
  26. <cal:ActionMessage MethodName="Exit">
  27. </cal:ActionMessage>
  28. </i:EventTrigger>
  29. </i:Interaction.Triggers>
  30. </Button>
  31. <Button Content="ShutDown" Width="100" Height="40" Margin="0,0,6,0">
  32. <i:Interaction.Triggers>
  33. <i:EventTrigger EventName="Click">
  34. <cal:ActionMessage MethodName="ShutDown">
  35. </cal:ActionMessage>
  36. </i:EventTrigger>
  37. </i:Interaction.Triggers>
  38. <Button.Style>
  39. <Style TargetType="{x:Type Button}" BasedOn="{StaticResource ResourceKey={x:Type Button}}">
  40. <Setter Property="Button.IsEnabled" Value="False" />
  41. <Style.Triggers>
  42. <MultiDataTrigger>
  43. <MultiDataTrigger.Conditions>
  44. <Condition Binding="{Binding HasToken}" Value="True"></Condition>
  45. <Condition Binding="{Binding AllowShowDown}" Value="True"></Condition>
  46. </MultiDataTrigger.Conditions>
  47. <Setter Property="Button.IsEnabled" Value="True"/>
  48. </MultiDataTrigger>
  49. </Style.Triggers>
  50. </Style>
  51. </Button.Style>
  52. </Button>
  53. <Button Content="Cancel" Width="100" Height="40">
  54. <i:Interaction.Triggers>
  55. <i:EventTrigger EventName="Click">
  56. <cal:ActionMessage MethodName="Cancel">
  57. </cal:ActionMessage>
  58. </i:EventTrigger>
  59. </i:Interaction.Triggers>
  60. </Button>
  61. </StackPanel>
  62. <Border BorderBrush="{DynamicResource Color_BD_Logoff_Info}" BorderThickness="5" Width="440" Height="200" Margin="0,0,0,50" Padding="1">
  63. <Grid SnapsToDevicePixels="True" Background="{DynamicResource Color_BG_Logoff_Info}">
  64. <Grid.RowDefinitions>
  65. <RowDefinition Height="30"/>
  66. <RowDefinition Height="30"/>
  67. <RowDefinition />
  68. </Grid.RowDefinitions>
  69. <TextBlock Text="Login information" FontFamily="Arial" FontSize="18" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource Color_FG_TextBlack}">
  70. </TextBlock>
  71. <StackPanel Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Center" Margin="5,2">
  72. <TextBlock Text="User:" TextWrapping="Wrap" FontFamily="Arial" FontSize="14" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{DynamicResource Color_FG_TextBlack}">
  73. </TextBlock>
  74. <TextBlock Text="{Binding LoginName}" Margin="5,0,0,0" TextWrapping="Wrap" FontFamily="Arial" FontSize="14" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{DynamicResource Color_FG_InfoBar}">
  75. </TextBlock>
  76. <TextBlock Text="Logined as:" Margin="20,0,0,0" TextWrapping="Wrap" FontFamily="Arial" FontSize="14" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{DynamicResource Color_FG_TextBlack}">
  77. </TextBlock>
  78. <TextBlock Text="{Binding RoleName}" Margin="5,0,0,0" TextWrapping="Wrap" FontFamily="Arial" FontSize="14" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{DynamicResource Color_FG_InfoBar}">
  79. </TextBlock>
  80. </StackPanel>
  81. <Border Grid.Row="2" Padding="5,2" Background="{DynamicResource Color_BG_Logoff_Info}" Margin="10,0,10,10" BorderBrush="{DynamicResource Color_BD_Logoff_Info}" BorderThickness="1">
  82. <StackPanel>
  83. <TextBlock Text="Login Date:" TextWrapping="Wrap" FontFamily="Arial" FontSize="14" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{DynamicResource Color_FG_TextBlack}">
  84. </TextBlock>
  85. <TextBlock Text="{Binding LoginTime}" Margin="0,5,0,0" TextWrapping="Wrap" FontFamily="Arial" FontSize="14" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{DynamicResource Color_FG_InfoBar}">
  86. </TextBlock>
  87. </StackPanel>
  88. </Border>
  89. </Grid>
  90. </Border>
  91. </Grid>
  92. </Border>
  93. </UserControl>