<Window x:Class="Txgy.EWS.Client.Start.Views.MainWindow"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Txgy.EWS.Client.Start"
        xmlns:converter="clr-namespace:Txgy.EWS.Client.Common.Converters;assembly=Txgy.EWS.Client.Common"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        xmlns:prism="http://prismlibrary.com/"
        xmlns:global="clr-namespace:Txgy.EWS.Client.Common;assembly=Txgy.EWS.Client.Common"
        xmlns:controls="clr-namespace:Txgy.Controls;assembly=Txgy.Controls"
        xmlns:hc="https://handyorg.github.io/handycontrol"
        Title="{Binding Path=(global:GlobalConfig.SystemNameCN)}"
        d:Width="1920"
        d:Height="1080"
        prism:ViewModelLocator.AutoWireViewModel="True"
        AllowsTransparency="True"
        Background="{DynamicResource MaterialDesignLightBackground}"
        TextElement.Foreground="{DynamicResource MaterialDesignShadowBrush}"
        FontFamily="微软雅黑"
        TextElement.FontSize="13"
        TextElement.FontWeight="Regular"
        TextOptions.TextFormattingMode="Ideal"
        TextOptions.TextRenderingMode="Auto"
        WindowStartupLocation="CenterScreen"
        WindowStyle="None"
        SizeChanged="Window_SizeChanged"
        WindowState="Maximized"
        mc:Ignorable="d">
    <Window.Resources>
        <ResourceDictionary>
            <converter:Bool2BlurConverter x:Key="Bool2Blur" />
            <converter:Bool2VisibilityConverter x:Key="Bool2Visibility" />
        </ResourceDictionary>
    </Window.Resources>
    <materialDesign:DialogHost x:Name="DialogHost"
                               DialogTheme="Light"
                               Identifier="Root">
        <!--<materialDesign:DialogHost.Effect>
        <DropShadowEffect ShadowDepth="0" BlurRadius="{Binding IsLoading,Converter={StaticResource Bool2Blur}}" Opacity="0.8" Color="#AAAAAA"/>
        </materialDesign:DialogHost.Effect>-->
        <materialDesign:DrawerHost x:Name="drawerHost">
            <!--#region 侧边栏-设置窗口-->
            <materialDesign:DrawerHost.LeftDrawerContent>
                <DockPanel MinWidth="220">
                    <!--<StackPanel Margin="0,20" DockPanel.Dock="Top">
                    <Image
                    Width="50"
                    Height="50"
                    Source="/Images/user.jpg">
                    <Image.Clip>
                    <EllipseGeometry
                    Center="25,25"
                    RadiusX="25"
                    RadiusY="25" />
                    </Image.Clip>
                    </Image>
                    <TextBlock
                    Margin="0,10"
                    HorizontalAlignment="Center"
                    Text="{Binding UserName}" />
                    </StackPanel>-->

                    <!--<ListBox
                    x:Name="menuBar"
                    ItemContainerStyle="{StaticResource MyListBoxItemStyle}"
                    ItemsSource="{Binding MenuBars}">
                    -->
                    <!--<i:Interaction.Triggers>
                    <i:EventTrigger EventName="SelectionChanged">
                    <i:InvokeCommandAction Command="{Binding NavigateCommand}"
                    CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ListBox}}" />
                    </i:EventTrigger>
                    </i:Interaction.Triggers>-->
                    <!--
                    <ListBox.ItemTemplate>
                    <DataTemplate>
                    <StackPanel Background="Transparent" Orientation="Horizontal">
                    <materialDesign:PackIcon Margin="15,0" Kind="{Binding Icon}" />
                    <TextBlock Margin="10,0" Text="{Binding Title}" />
                    </StackPanel>
                    </DataTemplate>
                    </ListBox.ItemTemplate>
                    </ListBox>-->
                </DockPanel>
            </materialDesign:DrawerHost.LeftDrawerContent>
            <!--#endregion-->
            <!--#region 主窗口-->
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="230" MinWidth="230" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <!--#region 左窗口-->
                <Border CornerRadius="0,30,30,0" Background="#FF7A40F2">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="105" />
                            <RowDefinition />
                        </Grid.RowDefinitions>

                        <StackPanel Orientation="Horizontal">
                            <Image Width="100"
                                   Height="100"
                                   Margin="0"
                                   Source="pack://application:,,,/Txgy.EWS.Client.Assets;component/Images/hpulogo.png">
                            </Image>
                            <StackPanel Margin="0,0,0,0" VerticalAlignment="Center">
                                <TextBlock Margin="0,0,0,5"
                                           VerticalAlignment="Center"
                                           d:Text="N1100区域"
                                           Text="{Binding Path=(global:GlobalConfig.CommpanyName)}"
                                           FontSize="14"
                                           FontWeight="Bold"
                                           Foreground="White" />
                                <TextBlock Margin="0,0,0,0"
                                           VerticalAlignment="Center"
                                           d:Text="余吾-N1100"
                                           Text="{Binding Path=(global:GlobalConfig.WorkAreaName)}"
                                           FontSize="14"
                                           FontWeight="Bold"
                                           Foreground="White" />
                            </StackPanel>

                        </StackPanel>
                        <ContentControl Grid.Row="1" prism:RegionManager.RegionName="LeftMenuTreeRegion" />
                    </Grid>
                </Border>
                <!--#endregion-->
                <!--#region 右窗口-->
                <Grid Grid.Column="1">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="100" />
                            <RowDefinition />
                        </Grid.RowDefinitions>

                        <!--#region 顶部区域-->
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <!--<ColumnDefinition Width="160" />-->
                            </Grid.ColumnDefinitions>
                            <!--#region 标题栏-->
                            <ContentControl x:Name="ContentTitle" prism:RegionManager.RegionName="TitleRegion" />
                            <!--#endregion-->
                            <!--<controls:CalendarClock2row Height="68"
                            HorizontalAlignment="Left"
                            ForegroundColor="Black" />
                            <StackPanel Grid.Column="1"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center">
                            <TextBlock d:Text="煤矿动力灾害微地震实时预警系统"
                            Text="{Binding Path=(global:GlobalConfig.SystemNameCN)}"
                            FontSize="34" />
                            <TextBlock HorizontalAlignment="Center"
                            d:Text="Microseismic Real-time Monitoring System"
                            Text="{Binding Path=(global:GlobalConfig.SystemNameEN)}"
                            FontSize="24" />
                            </StackPanel>

                            <Grid Grid.Column="2" Height="68">
                            <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="260" />
                            <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            </Grid.RowDefinitions>
                            <TextBlock VerticalAlignment="Center"
                            FontSize="18"
                            Text="运行时长：1天22小时15分20秒" />
                            <TextBlock Grid.Row="1"
                            VerticalAlignment="Center"
                            FontSize="18"
                            Text="事件数量：1个" />
                            <Button Grid.Column="1" Content="设置" />
                            <ToggleButton Grid.Row="1"
                            Grid.Column="1"
                            Width="80" />
                            </Grid>-->
                            <StackPanel Grid.Column="1"
                                        Margin="0,5,5,0"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Top"
                                        Orientation="Horizontal">
                                <Button x:Name="btnMin"
                                        Margin="1"
                                        Content="—"
                                        Style="{StaticResource MaterialDesignFlatMidBgButton}"
                                        Cursor="Hand" />
                                <Button x:Name="btnMax"
                                        Margin="1"
                                        Content="☐"
                                        Style="{StaticResource MaterialDesignFlatMidBgButton}"
                                        Click="btnMax_Click" />
                                <Button x:Name="btnClose"
                                        Margin="1"
                                        Content="✕"
                                        Style="{StaticResource MaterialDesignFlatMidBgButton}" />
                            </StackPanel>
                        </Grid>

                        <!--#region 内容窗口-->
                        <ContentControl Grid.Row="1" prism:RegionManager.RegionName="MainContentRegion" />
                        <!--#endregion-->
                        <!--#region 查询面板-->
                        <!--<ContentControl Grid.Row="1"
                        Grid.Column="1"
                        prism:RegionManager.RegionName="EventListContentRegion" />-->
                    </Grid>
                </Grid>
                <!--#endregion-->
            </Grid>
            <!--#endregion-->
        </materialDesign:DrawerHost>
    </materialDesign:DialogHost>
</Window>
