<UserControl
    x:Class="MECF.Framework.UI.Client.CenterViews.LogOnOff.LogoffView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:lex="http://wpflocalizeextension.codeplex.com"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:micro="clr-namespace:Caliburn.Micro"
    lex:LocalizeDictionary.DesignCulture="zh"
    lex:ResxLocalizationProvider.DefaultAssembly="Sicentury.Localization"
    lex:ResxLocalizationProvider.DefaultDictionary="lang_messagebox"
    mc:Ignorable="d">
    <Border
        Width="600"
        Height="480"
        Background="{DynamicResource Color_BG_Logoff}"
        BorderBrush="{DynamicResource Color_BD_Logoff}"
        BorderThickness="5">
        <Grid>
            <StackPanel
                Margin="0,0,0,25"
                HorizontalAlignment="Center"
                VerticalAlignment="Bottom"
                Orientation="Horizontal">
                <StackPanel.Effect>
                    <DropShadowEffect
                        BlurRadius="10"
                        Opacity="0.7"
                        ShadowDepth="0"
                        Color="White" />
                </StackPanel.Effect>
                <Button
                    x:Name="ID_BTN_Logoff_Content"
                    Width="100"
                    Height="40"
                    Margin="0,0,6,0"
                    Content="{lex:Loc}"
                    ToolTip="{lex:Loc ID_BTN_Logoff_ToolTip}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <micro:ActionMessage MethodName="Logoff" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
                <Button
                    x:Name="ID_BTN_Exit_UI_Content"
                    Width="100"
                    Height="40"
                    Margin="0,0,6,0"
                    Content="{lex:Loc}"
                    ToolTip="{lex:Loc ID_BTN_Exit_UI_ToolTip}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <micro:ActionMessage MethodName="Exit" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
                <Button
                    x:Name="ID_BTN_Shut_Down_Content"
                    Width="100"
                    Height="40"
                    Margin="0,0,6,0"
                    Content="{lex:Loc}"
                    ToolTip="{lex:Loc ID_BTN_Shut_Down_ToolTip}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <micro:ActionMessage MethodName="ShutDown" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    <Button.Style>
                        <Style BasedOn="{StaticResource ResourceKey={x:Type Button}}" TargetType="{x:Type Button}">
                            <Setter Property="Button.IsEnabled" Value="True" />
                            <Style.Triggers>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding HasToken}" Value="True" />
                                        <Condition Binding="{Binding AllowShowDown}" Value="True" />
                                    </MultiDataTrigger.Conditions>
                                    <Setter Property="Button.IsEnabled" Value="True" />
                                </MultiDataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Button.Style>
                </Button>
                <Button
                    x:Name="ID_BTN_Cancel_Content"
                    Width="100"
                    Height="40"
                    lex:ResxLocalizationProvider.DefaultDictionary="lang_common"
                    Content="{lex:Loc}"
                    ToolTip="{lex:Loc ID_BTN_Cancel_ToolTip}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <micro:ActionMessage MethodName="Cancel" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            </StackPanel>
            <Border
                Width="440"
                Height="200"
                Margin="0,0,0,50"
                Padding="1"
                BorderBrush="{DynamicResource Color_BD_Logoff_Info}"
                BorderThickness="5">
                <Grid Background="{DynamicResource Color_BG_Logoff_Info}" SnapsToDevicePixels="True">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30" />
                        <RowDefinition Height="30" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <TextBlock
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        FontFamily="Arial"
                        FontSize="18"
                        FontWeight="Bold"
                        Foreground="{DynamicResource Color_FG_TextBlack}"
                        Text="{lex:Loc ID_TXT_Login_Information}" />
                    <StackPanel
                        Grid.Row="1"
                        Margin="5,2"
                        VerticalAlignment="Center"
                        Orientation="Horizontal">
                        <TextBlock
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top"
                            FontFamily="Arial"
                            FontSize="14"
                            FontWeight="Bold"
                            Foreground="{DynamicResource Color_FG_TextBlack}"
                            Text="{lex:Loc ID_TXT_User}"
                            TextWrapping="Wrap" />
                        <TextBlock
                            FontFamily="Arial"
                            FontSize="14"
                            FontWeight="Bold">
                            :
                        </TextBlock>
                        <TextBlock
                            Margin="5,0,0,0"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top"
                            FontFamily="Arial"
                            FontSize="14"
                            Foreground="{DynamicResource Color_FG_InfoBar}"
                            Text="{Binding LoginName}"
                            TextWrapping="Wrap" />
                        <TextBlock
                            Margin="20,0,0,0"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top"
                            FontFamily="Arial"
                            FontSize="14"
                            FontWeight="Bold"
                            Foreground="{DynamicResource Color_FG_TextBlack}"
                            Text="{lex:Loc ID_TXT_Logined_as}"
                            TextWrapping="Wrap" />
                        <TextBlock
                            FontFamily="Arial"
                            FontSize="14"
                            FontWeight="Bold">
                            :
                        </TextBlock>
                        <TextBlock
                            Margin="5,0,0,0"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top"
                            FontFamily="Arial"
                            FontSize="14"
                            Foreground="{DynamicResource Color_FG_InfoBar}"
                            Text="{Binding RoleName}"
                            TextWrapping="Wrap" />
                    </StackPanel>
                    <Border
                        Grid.Row="2"
                        Margin="10,0,10,10"
                        Padding="5,2"
                        Background="{DynamicResource Color_BG_Logoff_Info}"
                        BorderBrush="{DynamicResource Color_BD_Logoff_Info}"
                        BorderThickness="1">
                        <StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Top"
                                    FontFamily="Arial"
                                    FontSize="14"
                                    FontWeight="Bold"
                                    Foreground="{DynamicResource Color_FG_TextBlack}"
                                    Text="{lex:Loc ID_TXT_Login_Date}"
                                    TextWrapping="Wrap" />
                                <TextBlock
                                    FontFamily="Arial"
                                    FontSize="14"
                                    FontWeight="Bold">
                                    :
                                </TextBlock>
                            </StackPanel>

                            <TextBlock
                                Margin="0,5,0,0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top"
                                FontFamily="Arial"
                                FontSize="14"
                                Foreground="{DynamicResource Color_FG_InfoBar}"
                                Text="{Binding LoginTime}"
                                TextWrapping="Wrap" />
                        </StackPanel>
                    </Border>
                </Grid>
            </Border>
        </Grid>
    </Border>
</UserControl>
