<Page x:Class="FLY.Thick.FilmCasting.UI.PgScanWarning"
      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.FilmCasting.UI"
      mc:Ignorable="d" 
      d:DesignHeight="768" d:DesignWidth="1024"
      Background="WhiteSmoke"
	Title="Page_WarningSystem">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.Thick.FilmCasting.UI;component/Themes/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Page.Resources>
    <Grid d:DataContext="{d:DesignInstance local:PgScanWarningVm}">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Background="{StaticResource Brushes.TitleBar.Background}">
            <Button Style="{StaticResource Styles.TitleBar.BackButton2}" Command="BrowseBack"/>
            <TextBlock Style="{StaticResource Styles.TitleBar.Text}"  Text="扫描报警"/>
        </StackPanel>
        <ScrollViewer PanningMode="Both" Grid.Row="1" >
            <StackPanel Margin="{StaticResource ControlMargin}">
                <Border Style="{StaticResource Styles.Card.Border}">
                    <StackPanel>
                        <TextBlock Style="{StaticResource Styles.Card.Title}"
                                   Text="参数"/>

                        <StackPanel  Grid.Column="1">
                            <StackPanel Orientation="Horizontal">
                                <StackPanel  Margin="{StaticResource ControlMargin}" >
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="使能" />
                                    <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding Enable}" />
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
                                <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="纵向混合" />
                                <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding Mix}" />
                                <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="幅图,"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
                                <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="连续" />
                                <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding AlarmCnt}" />
                                <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="分区"/>
                                <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="超出" />
                                <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="公差" Foreground="DarkRed" />
                                <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding AlarmPercent}" />
                                <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="%"/>
                                <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="报警。" />
                            </StackPanel>

                        </StackPanel>
                    </StackPanel>
                </Border>
            </StackPanel>
        </ScrollViewer>

        <Button Style="{StaticResource Styles.Button.Apply}" VerticalAlignment="Bottom" Margin="10" 
                    Command="{Binding ApplyCmd}"/>
    </Grid>
</Page>
