<UserControl x:Class="FLY.Thick.Base.UI.CustomSection.UcSectionError"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:FLY.Thick.Base.UI.CustomSection"
             xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
             mc:Ignorable="d" >
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <Border Style="{StaticResource BorderStyle_paramSection}">
            <TextBlock Text="报警提示" />
        </Border>
        <StackPanel Grid.Column="1">
            <GroupBox Style="{x:Null}" Margin="5">
                <GroupBox.Header>
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="音乐" VerticalAlignment="Bottom"/>
                </GroupBox.Header>
                <StackPanel>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <StackPanel Orientation="Horizontal">
                            <StackPanel Orientation="Vertical" Margin="5">
                                <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="持续时间" />
                                <StackPanel Orientation="Horizontal">
                                    <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding WarningDurationSec}" MaxWidth="120" HorizontalAlignment="Left"/>
                                    <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="秒"/>
                                </StackPanel>
                            </StackPanel>
                            <Button Style="{StaticResource ButtonStyle_RectangleIcon}" Command="{Binding PlayCmd}" >
                                <iconPacks:PackIconMaterial Kind="Play" />
                            </Button>
                        </StackPanel>
                        <Grid Grid.Column="1">
                            <StackPanel Grid.Column="1" Margin="5">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="音乐文件路径" VerticalAlignment="Bottom"/>
                                    <Button Style="{StaticResource ButtonStyle_icon}" Command="{Binding OpenCmd}" >
                                        <iconPacks:PackIconMaterial Kind="FolderOpen" />
                                    </Button>
                                </StackPanel>
                                <Viewbox Height="36" HorizontalAlignment="Left" >
                                    <TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding WarningTipPath}" />
                                </Viewbox>

                            </StackPanel>
                        </Grid>
                    </Grid>



                </StackPanel>

            </GroupBox>
            <GroupBox Style="{x:Null}" Margin="5">
                <GroupBox.Header>
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="USB继电器" VerticalAlignment="Bottom"/>
                </GroupBox.Header>
                <StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <StackPanel Margin="{StaticResource ControlMargin}">
                            <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="使能" />
                            <ToggleButton Style="{StaticResource ToggleButtonStyle1}" HorizontalAlignment="Left" IsChecked="{Binding EnableLCUS1}" />
                        </StackPanel>
                        <StackPanel Margin="{StaticResource ControlMargin}">
                            <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="串口地址" />
                            <StackPanel Orientation="Horizontal">
                                <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding LCUS1_PortName}" HorizontalAlignment="Left" Tag="Full"/>
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">

                            <Button Style="{StaticResource ButtonStyle_RectangleIcon}" Command="{Binding BellRingCmd}" >
                                <iconPacks:PackIconMaterial Kind="BellRing" />
                            </Button>

                            <Button Style="{StaticResource ButtonStyle_RectangleIcon}" Command="{Binding BellOffCmd}" Background="{StaticResource Color_theme_noact}">
                                <iconPacks:PackIconMaterial Kind="BellOff" />
                            </Button>
  
                        </StackPanel>
                    </StackPanel>
                    <TextBlock x:Name="textblock_lcus" Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding ErrMsg}" />
                </StackPanel>

            </GroupBox>
            <GroupBox Style="{x:Null}" Margin="5">
                <GroupBox.Header>
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="大屏显示扫描报警" VerticalAlignment="Bottom"/>
                </GroupBox.Header>
                <StackPanel Orientation="Horizontal" x:Name="spErrCodes">
                    <StackPanel Margin="{StaticResource ControlMargin}">
                        <StackPanel Margin="{StaticResource ControlMargin}">
                            <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="使能" />
                            <ToggleButton Style="{StaticResource ToggleButtonStyle1}" HorizontalAlignment="Left" IsChecked="{Binding EnableScanErrBigTip}" />
                        </StackPanel>
                    </StackPanel>
                </StackPanel>

            </GroupBox>
        </StackPanel>

    </Grid>
</UserControl>