UcSectionError.xaml 6.85 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<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>

潘栩锋's avatar
潘栩锋 committed
22
        <Border Style="{StaticResource Styles.ParamSection.Border}">
潘栩锋's avatar
潘栩锋 committed
23 24 25
            <TextBlock Text="报警提示" />
        </Border>
        <StackPanel Grid.Column="1">
26
            <GroupBox Style="{x:Null}" Margin="{StaticResource ControlMargin}">
潘栩锋's avatar
潘栩锋 committed
27
                <GroupBox.Header>
28
                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="音乐" VerticalAlignment="Bottom"/>
潘栩锋's avatar
潘栩锋 committed
29 30 31 32 33 34 35 36
                </GroupBox.Header>
                <StackPanel>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <StackPanel Orientation="Horizontal">
37
                            <StackPanel Orientation="Vertical" Margin="{StaticResource ControlMargin}">
潘栩锋's avatar
潘栩锋 committed
38
                                <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="持续时间" />
潘栩锋's avatar
潘栩锋 committed
39
                                <StackPanel Orientation="Horizontal">
潘栩锋's avatar
潘栩锋 committed
40 41
                                    <TextBox Style="{StaticResource Styles.Text.FieldContent.Input}" Text="{Binding WarningDurationSec}" MaxWidth="120" HorizontalAlignment="Left"/>
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="秒"/>
潘栩锋's avatar
潘栩锋 committed
42 43
                                </StackPanel>
                            </StackPanel>
44
                            <Button Style="{StaticResource Styles.Button.Icon.Rectangle}" Command="{Binding PlayCmd}" >
潘栩锋's avatar
潘栩锋 committed
45 46 47 48
                                <iconPacks:PackIconMaterial Kind="Play" />
                            </Button>
                        </StackPanel>
                        <Grid Grid.Column="1">
49
                            <StackPanel Grid.Column="1" Margin="{StaticResource ControlMargin}">
潘栩锋's avatar
潘栩锋 committed
50
                                <StackPanel Orientation="Horizontal">
51 52
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="音乐文件路径" VerticalAlignment="Bottom"/>
                                    <Button Style="{StaticResource Styles.Button.Icon}" Command="{Binding OpenCmd}" >
潘栩锋's avatar
潘栩锋 committed
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
                                        <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>
69
            <GroupBox Style="{x:Null}" Margin="{StaticResource ControlMargin}">
潘栩锋's avatar
潘栩锋 committed
70
                <GroupBox.Header>
71
                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="USB继电器" VerticalAlignment="Bottom"/>
潘栩锋's avatar
潘栩锋 committed
72 73 74
                </GroupBox.Header>
                <StackPanel>
                    <StackPanel Orientation="Horizontal">
75
                        <StackPanel Margin="{StaticResource ControlMargin}">
潘栩锋's avatar
潘栩锋 committed
76
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="使能" />
77
                            <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding LCUS1_Enable}" />
潘栩锋's avatar
潘栩锋 committed
78
                        </StackPanel>
79
                        <StackPanel Margin="{StaticResource ControlMargin}">
潘栩锋's avatar
潘栩锋 committed
80
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="串口地址" />
潘栩锋's avatar
潘栩锋 committed
81
                            <StackPanel Orientation="Horizontal">
潘栩锋's avatar
潘栩锋 committed
82
                                <TextBox Style="{StaticResource Styles.Text.FieldContent.Input}" Text="{Binding LCUS1_PortName}" HorizontalAlignment="Left" Tag="Full"/>
潘栩锋's avatar
潘栩锋 committed
83 84 85 86
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">

87
                            <Button Style="{StaticResource Styles.Button.Icon.Rectangle}" Command="{Binding BellRingCmd}" >
潘栩锋's avatar
潘栩锋 committed
88 89 90
                                <iconPacks:PackIconMaterial Kind="BellRing" />
                            </Button>

91
                            <Button Style="{StaticResource Styles.Button.Icon.Rectangle}" Command="{Binding BellOffCmd}" Background="{StaticResource Brushes.NoAct}">
潘栩锋's avatar
潘栩锋 committed
92 93 94 95 96
                                <iconPacks:PackIconMaterial Kind="BellOff" />
                            </Button>
  
                        </StackPanel>
                    </StackPanel>
97 98 99
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" >
                        状态:<Run Text="{Binding LCUS1.ErrMsg,Mode=OneWay}"/>
                    </TextBlock>
潘栩锋's avatar
潘栩锋 committed
100 101 102
                </StackPanel>

            </GroupBox>
103
            <GroupBox Style="{x:Null}" Margin="{StaticResource ControlMargin}">
潘栩锋's avatar
潘栩锋 committed
104
                <GroupBox.Header>
105
                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="大屏显示扫描报警" VerticalAlignment="Bottom"/>
潘栩锋's avatar
潘栩锋 committed
106 107
                </GroupBox.Header>
                <StackPanel Orientation="Horizontal" x:Name="spErrCodes">
108 109
                    <StackPanel Margin="{StaticResource ControlMargin}">
                        <StackPanel Margin="{StaticResource ControlMargin}">
潘栩锋's avatar
潘栩锋 committed
110 111
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="使能" />
                            <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding EnableScanErrBigTip}" />
潘栩锋's avatar
潘栩锋 committed
112 113 114 115 116 117 118 119 120
                        </StackPanel>
                    </StackPanel>
                </StackPanel>

            </GroupBox>
        </StackPanel>

    </Grid>
</UserControl>