<Window x:Class="BPASmartClient.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:BPASmartClient"
        xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
        Title="MainWindow" Width="1600"
        Height="900"
        AllowsTransparency="True"
        Background="{x:Null}"
        Topmost="False"
        WindowStartupLocation="CenterScreen"
        WindowStyle="None"
        mc:Ignorable="d">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml"/>
                <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <Geometry x:Key="Icon_Desgin">M61.141068 400.532698L3.815672 725.688936l61.197513 74.337875 83.560965-473.80941H-0.067734zM79.169555 298.333642h74.315297l-61.208801-74.315297zM359.011862 660.653173l-13.095206 74.337875 53.566168 65.024474 13.095207-74.326586zM455.171319 484.138819v0.011289H287.959077l59.3687 72.068792L107.64034 716.398113 92.908233 800.015522l347.508401-232.259293 1.648189-9.302112h0.011289l13.106496-74.304009h-0.011289zM494.490806 261.181638H187.904926l-13.095207 74.315297 61.208802 74.315298 19.676677-111.478591h157.921418l-26.201702 148.641884h74.315297l32.771884-185.793888h-0.011289z M617.224501 400.543987l-57.359263 325.156238 61.23138 74.326586 83.527098-473.80941H556.00441zM635.23041 298.344931h74.315297L648.325616 224.018345zM982.783966 224.018345h-74.326586l-32.749306 185.805177H717.7415l30.626979 37.163293H869.137893l-62.224809 353.039996 87.410504-74.326586 49.140891-278.71341h74.315298l6.558892-37.163293h-74.326586z</Geometry>

        </ResourceDictionary>
    </Window.Resources>
    <Border Style="{DynamicResource border主窗体背景}" x:Name="br" >
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="60"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            
            <!--标题-->
            <Grid Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="300"></ColumnDefinition>
                    <ColumnDefinition ></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Border Grid.ColumnSpan="2" Style="{DynamicResource bordertop矩形}"></Border>
                <Border Style="{DynamicResource bordertopL}"></Border>
                <Image Margin="10,0,0,0" VerticalAlignment="Center" Style="{DynamicResource imagetop_Title}" ></Image>
                <Grid Grid.Column="1">
                    <TabControl>
                        <TabItem Header="    状态监视    "></TabItem>
                        <TabItem Header="    产品制作    "></TabItem>
                        <TabItem Header="    综合查询    "></TabItem>
                        <TabItem Header="    功能列表    "></TabItem>
                        <TabItem Header="    参数配置    "></TabItem>
                        <TabItem Header="    系统帮助    "></TabItem>
                    </TabControl>
                </Grid>
                <StackPanel Grid.Column="4" Orientation="Horizontal" HorizontalAlignment="Right" Height="50" VerticalAlignment="Top">
                    <Border Style="{DynamicResource border竖线}" />
                    <ToggleButton VerticalAlignment="Center"  ToolTip="告警消息" HorizontalAlignment="Center" Style="{DynamicResource StatusBtnStyle告警}" DataContext="{Binding GaoJingMessage}"  Cursor="Hand"/>
                    <Border Style="{DynamicResource border竖线}" />
                    <Grid Margin="10,0,10,0"  VerticalAlignment="Center" >
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <StackPanel Orientation="Horizontal" Grid.Row="0">
                            <TextBlock x:Name="time"  FontSize="16" Text="18:00:00"/>
                            <Image Style="{DynamicResource timeImage}" Margin="10,0,0,0"/>
                        </StackPanel>
                        <StackPanel Grid.Row="1"  Orientation="Horizontal">
                            <TextBlock x:Name="dateRL"  FontSize="10"  >星期一</TextBlock>
                            <TextBlock x:Name="date" Margin="10,0,0,0" FontSize="10" >2021-11-13</TextBlock>
                        </StackPanel>
                    </Grid>
                    <Border Style="{DynamicResource border竖线}" />
                    <Button x:Name="ButClose" Grid.Column="4" Margin="10,0,20,0" Style="{DynamicResource CommonBtnStyle退出按钮}"  VerticalAlignment="Center"  ToolTip="退出程序"  Cursor="Hand"  Content="退出"/>
                </StackPanel>
            </Grid>

            <!--底部窗体-->
            <Grid Grid.Row="1" Margin="10">
                <Border Style="{DynamicResource border窗体背景1}" Visibility="Collapsed" Width="500"  HorizontalAlignment="Left" VerticalAlignment="Stretch">
                    <Grid Margin="20">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="40"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <TextBlock HorizontalAlignment="Center" Margin="0,10,0,0">相关设备状态</TextBlock>

                        <DataGrid x:Name="datagrid" Margin="0,50,0,0" ItemsSource="{Binding EquiPment, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1">
                            <DataGrid.Columns>
                                <DataGridTemplateColumn Header="    " Width="24">
                                    <DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <Ellipse Width="12" Height="12" ToolTip="{Binding Status, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Fill="{Binding color, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                                        </DataTemplate>
                                    </DataGridTemplateColumn.CellTemplate>
                                </DataGridTemplateColumn>
                                <DataGridTemplateColumn Header="设备名称" Width="4.4*">
                                    <DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <TextBlock HorizontalAlignment="Center" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="#00ccff"/>
                                        </DataTemplate>
                                    </DataGridTemplateColumn.CellTemplate>
                                </DataGridTemplateColumn>
                                <DataGridTemplateColumn Header="设备状态" Width="4.4*">
                                    <DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <TextBlock HorizontalAlignment="Center" Text="{Binding Status, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="#00ccff"/>
                                        </DataTemplate>
                                    </DataGridTemplateColumn.CellTemplate>
                                </DataGridTemplateColumn>
                                <DataGridTemplateColumn Header="维护" Width="4.4*">
                                    <DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <Image Width="12" Height="12" ToolTip="设备维护" Style="{DynamicResource image个人信息}" Cursor="Hand" x:Name="ShowFromButton"/>
                                        </DataTemplate>
                                    </DataGridTemplateColumn.CellTemplate>
                                </DataGridTemplateColumn>
                            </DataGrid.Columns>
                        </DataGrid>
                    </Grid>
                </Border>
                <Button Grid.Row="2" Content="测试" HorizontalAlignment="Center"  Margin="153,123,0,0" VerticalAlignment="Top" Click="Button_Click"/>

            </Grid>
            

        </Grid>
    </Border>
</Window>
