<Window x:Class="Aucma.Core.SheetMetal.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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        mc:Ignorable="d"
        Title="澳柯玛钣金生产控制系统" Icon="/Assets/images/Icon.png"
        d:DesignHeight="1080"
        d:DesignWidth="1920" 
        FontFamily="Microsoft YaHei"
        MinHeight="1080" 
        MinWidth="1920" WindowStyle="None"  WindowState="Maximized"
        WindowStartupLocation="CenterScreen" >
    <Window.Background>
        <ImageBrush ImageSource="/Assets/images/background.jpg" />
    </Window.Background>
    <Border Margin="5" Background="Transparent" CornerRadius="10" >
        <Border.Effect>
            <DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
        </Border.Effect>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="6*"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <Border Grid.Row="0" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,2">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="7*"/>
                        <ColumnDefinition Width="2*"/>
                    </Grid.ColumnDefinitions>

                    <StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                        <TextBlock Text="箱壳自动生产控制系统" FontSize="42" Foreground="White" FontWeight="Bold"/>
                    </StackPanel>

                    <StackPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 20 0 0" >
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <StackPanel Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" >
                                <TextBlock Grid.Column="0" Text="{Binding TeamName}" FontSize="25" Foreground="White" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                                <TextBlock Grid.Column="1" Text="{Binding CurrentDateTime}" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                            </StackPanel>
                        </Grid>
                    </StackPanel>
                </Grid>

            </Border>

            <Border Grid.Row="1" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" >
                <ContentControl Content="{Binding UserContent}"/>
            </Border>

            <DockPanel  Grid.Row="2" Margin="5 0 5 5">
                <Border  BorderBrush="#0288d1"   BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch"  VerticalAlignment="Bottom">
                    <Grid>
                       
                        <StackPanel  Grid.Row="1" Height="60" Orientation="Horizontal"  Margin="5 0" HorizontalAlignment="Left">
                            <Button Content="生产计划" x:Name="FirstPage" FontSize="20" Height="40" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FirstPage}"  />
                            <Button Content="设备监控" x:Name="LogPage" FontSize="20" Height="40" Margin="5 0" Command="{Binding SwitchPagesCommand}"  CommandParameter="{Binding Name,ElementName=LogPage}" />
                            <Button Content="统    计" x:Name="StatisticsPage" FontSize="20"  Height="40" Margin="5 0" Command="{Binding SwitchPagesCommand}"  CommandParameter="{Binding Name,ElementName=StatisticsPage}" />
                            <Button Content="BOM设置" x:Name="BomPage" FontSize="20" Height="40" Margin="5 0" Command="{Binding SwitchPagesCommand}"  CommandParameter="{Binding Name,ElementName=BomPage}" />
                            <Button Content="键    盘" x:Name="TabTip" FontSize="20"  Height="40" Margin="5 0"  Command="{Binding FormControlCommand}"  CommandParameter="{Binding Name,ElementName=TabTip}"  />
                            <Button Content="最小化"   x:Name="Minimized" FontSize="20"  Height="40" Margin="5 0"  Command="{Binding FormControlCommand}"  CommandParameter="{Binding Name,ElementName=Minimized}"   Background="#FF9900" BorderBrush="#FF9900" />
                            <Button Content="退    出" x:Name="Exit" FontSize="20"   Height="40" Margin="5 0" Command="{Binding FormControlCommand}"  CommandParameter="{Binding Name,ElementName=Exit}"  Background="#df4642" BorderBrush="#df4642" />
                        </StackPanel>
                        <StackPanel   Height="50" Orientation="Horizontal"   HorizontalAlignment="Right">
                            <Border Width="30" Height="30" CornerRadius="15">
                                <Border.Background>
                                    <ImageBrush x:Name="MesDbStatus" ImageSource="{Binding MesUIIcon}"/>
                                </Border.Background>
                            </Border>
                            <TextBlock x:Name="MesDbStateTxt" Text="{Binding MesDbUIStatusWb}" VerticalAlignment="Center" Foreground="{Binding MesDbUIColor}"  FontSize="15" Margin="10,0"/>
                            <Border Width="30" Height="30" CornerRadius="15">
                                <Border.Background>
                                    <ImageBrush x:Name="PlcStatus" ImageSource="{Binding PlcUIIcon}"/>
                                </Border.Background>
                            </Border>
                            <TextBlock x:Name="PLCState" Text="{Binding PlcUIStatusWb}" VerticalAlignment="Center" Foreground="{Binding PlcUIColor}"  FontSize="15" Margin="10,0"/>
                            <Border Width="30" Height="30" CornerRadius="15">
                                <Border.Background>
                                    <ImageBrush x:Name="Plc2Status" ImageSource="{Binding Plc2UIIcon}"/>
                                </Border.Background>
                            </Border>
                            <TextBlock x:Name="PLC2State" Text="{Binding Plc2UIStatusWb}" VerticalAlignment="Center" Foreground="{Binding Plc2UIColor}"  FontSize="15" Margin="10,0"/>
                        </StackPanel>
                    </Grid>
                </Border>
            </DockPanel>
        </Grid>
    </Border>

</Window>