<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="800"
        d:DesignWidth="1500" FontFamily="Microsoft YaHei"
        MinHeight="1080" MinWidth="1800" WindowState="Normal"  
        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="45" Foreground="White" FontWeight="Bold"/>
                    </StackPanel>

                    <StackPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="白班" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,30,0"/>
                            <TextBlock Grid.Column="1" Text="|" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,30,0"/>
                            <TextBlock Grid.Column="2" Text="SCADA" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,10,0"/>
                        </Grid>
                    </StackPanel>
                </Grid>

            </Border>

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

            <DockPanel  Grid.Row="2" Margin="5 0 0 3">
                <Border  BorderBrush="#0288d1"   BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch"  VerticalAlignment="Bottom">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="2*" />
                        </Grid.RowDefinitions>
                        <StackPanel  Grid.Row="1" Height="60" Orientation="Horizontal"  Margin="5 0" HorizontalAlignment="Left">
                            <Button Content="计划下发" x:Name="FirstPage"  Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FirstPage}"  />
                            <Button Content="设备监控" x:Name="LogPage" Margin="5 0" Command="{Binding SwitchPagesCommand}"  CommandParameter="{Binding Name,ElementName=LogPage}" />
                            <Button Content="统    计" x:Name="StatisticsPage" Margin="5 0" Command="{Binding SwitchPagesCommand}"  CommandParameter="{Binding Name,ElementName=StatisticsPage}" />
                            <Button Content="键    盘" x:Name="TabTip" Margin="5 0"  Command="{Binding FormControlCommand}"  CommandParameter="{Binding Name,ElementName=TabTip}"  />
                            <Button Content="最小化" x:Name="Minimized" Margin="5 0"  Command="{Binding FormControlCommand}"  CommandParameter="{Binding Name,ElementName=Minimized}"   Background="#FF9900" BorderBrush="#FF9900" />
                            <Button Content="退    出" x:Name="Exit"  Margin="5 0" Command="{Binding FormControlCommand}"  CommandParameter="{Binding Name,ElementName=Exit}"  Background="#FF0033" BorderBrush="#FF0033" />
                        </StackPanel>
                        <StackPanel  Grid.Row="2" Height="50" Margin="5 0" Orientation="Horizontal"   HorizontalAlignment="Right">
                            <TextBlock x:Name="BeforPLcState" Text="箱壳PLC" VerticalAlignment="Center" Foreground="white" FontSize="15" Margin="10,0"/>
                            <Border Width="30" Height="30" CornerRadius="15">
                                <Border.Background>
                                    <ImageBrush x:Name="BeforPLcStateColor" ImageSource="/Assets/Images/Green.png"/>
                                </Border.Background>
                            </Border>
                            <TextBlock x:Name="AfterPlcState" Text="后板PLC" VerticalAlignment="Center" Foreground="white" FontSize="15" Margin="10,0"/>
                            <Border Width="30" Height="30" CornerRadius="15">
                                <Border.Background>
                                    <ImageBrush x:Name="AfterPlcStateColor" ImageSource="/Assets/Images/Green.png"/>
                                </Border.Background>
                            </Border>
                            <TextBlock x:Name="DB" Text="数据库" VerticalAlignment="Center" Foreground="white" FontSize="15" Margin="10,0"/>
                            <Border Width="30" Height="30" CornerRadius="15" >
                                <Border.Background>
                                    <ImageBrush x:Name="PlcStatusImage" ImageSource="/Assets/Images/Green.png"/>
                                </Border.Background>
                            </Border>
                        </StackPanel>
                    </Grid>
                </Border>
            </DockPanel>
        </Grid>
    </Border>

</Window>