<Window x:Class="YoseenPTZ.ShellView"
        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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        xmlns:mdix="http://materialdesigninxaml.net/winfx/xaml/themes"
        xmlns:mvvm="clr-namespace:MVVM;assembly=MVVM"
        xmlns:mvvmhelpers="clr-namespace:MVVM.Helpers;assembly=MVVM"
        
        xmlns:local="clr-namespace:YoseenPTZ"
        xmlns:resdef="clr-namespace:YoseenPTZ.ResourceDef"
        xmlns:coredef="clr-namespace:YoseenPTZ.CoreDef"
        xmlns:viewdef="clr-namespace:YoseenPTZ.ViewDef"
        
        Background="{StaticResource MaterialDesignPaper}"
        TextElement.Foreground="{StaticResource MaterialDesignBody}"
        Style="{StaticResource MaterialDesignWindow}"
        mvvmhelpers:WindowHelper.ShowMinimizeButton="True"
        mvvmhelpers:WindowHelper.ShowMaximizeButton="True"
        Title="{x:Static resdef:Loc.AppName2}" Height="600" Width="1300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="200"></RowDefinition>
        </Grid.RowDefinitions>

        <coredef:DeviceView Grid.Row="0" x:Name="deviceView"></coredef:DeviceView>

        <GridSplitter Grid.Row="1" Style="{StaticResource gridsplitter_updown}"></GridSplitter>

        <Grid Grid.Row="2">
            <Grid.Resources>
                <Style TargetType="Button" BasedOn="{StaticResource MaterialDesignIconButton2}"></Style>
                <Style TargetType="ToggleButton" BasedOn="{StaticResource MaterialDesignActionToggleButton2}"></Style>
            </Grid.Resources>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>

            <Grid Grid.Column="0" Style="{StaticResource style_grid}">
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>

                <Button Grid.Row="0" Grid.Column="0" x:Name="btnPlay" Click="btnPlay_Click">
                    <mdix:PackIcon Kind="Play"></mdix:PackIcon>
                </Button>
                <Button Grid.Row="0" Grid.Column="1" x:Name="btnStop" Click="btnStop_Click">
                    <mdix:PackIcon Kind="Stop"></mdix:PackIcon>
                </Button>
                <ToggleButton Grid.Row="0" Grid.Column="2" ToolTip="鼠标测温" Style="{StaticResource MaterialDesignFlatToggleButton2}" x:Name="btnEnableMouseMeasure"  Click="btnEnableMouseMeasure_Click">
                    <mdix:PackIcon Kind="CursorDefault"></mdix:PackIcon>
                </ToggleButton>

                <Button Grid.Row="1" Grid.Column="0" x:Name="btnSaveJpg" ToolTip="截图" Click="btnSaveJpg_Click">
                    <mdix:PackIcon Kind="FileImage"></mdix:PackIcon>
                </Button>
                <ToggleButton Grid.Row="1" Grid.Column="1" x:Name="btnSaveMp4" ToolTip="录视频" Click="btnSaveMp4_Click">
                    <mdix:PackIcon Kind="FileVideo"></mdix:PackIcon>
                    <mdix:ToggleButtonAssist.OnContent>
                        <mdix:PackIcon Kind="Record"></mdix:PackIcon>
                    </mdix:ToggleButtonAssist.OnContent>
                </ToggleButton>
                <ToggleButton Grid.Row="1" Grid.Column="3" x:Name="btnSaveStream" ToolTip="录温度" Click="btnSaveStream_Click">
                    <mdix:PackIcon Kind="Thermometer"></mdix:PackIcon>
                    <mdix:ToggleButtonAssist.OnContent>
                        <mdix:PackIcon Kind="Record"></mdix:PackIcon>
                    </mdix:ToggleButtonAssist.OnContent>
                </ToggleButton>

                <Button Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Content="系统配置" x:Name="btnConfigSystem" Click="btnConfigSystem_Click" Margin="4" Style="{StaticResource MaterialDesignOutlinedButton}">
                </Button>
                <Button Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" Content="发现设备" x:Name="btnDiscoverCameras" Click="btnDiscoverCameras_Click" Margin="4" Style="{StaticResource MaterialDesignOutlinedButton}">
                </Button>
            </Grid>

            <Grid Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="300"></ColumnDefinition>
                </Grid.ColumnDefinitions>

                <viewdef:PTZView x:Name="ptzView"></viewdef:PTZView>

                <Grid Grid.Column="2" Style="{StaticResource style_grid}" >
                    <TextBox x:Name="txtEcho" FontSize="16" TextWrapping="WrapWithOverflow"></TextBox>
                </Grid>
            </Grid>
        </Grid>
    </Grid>
</Window>
