Newer
Older
Correlator / PipeGallery / View / AuditionView.xaml
<UserControl x:Class="PipeGallery.View.AuditionView"
             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:converter="clr-namespace:PipeGallery.Converter"
             mc:Ignorable="d" 
             d:DesignHeight="768" d:DesignWidth="1366" Background="#224f86">
    <UserControl.Resources>
        <converter:SignalIntensityImageConverter x:Key="signalIntensityImageConverter"/>
    </UserControl.Resources>
    <Grid>
        <Viewbox>
            <Grid Width="1366" Height="768">
                <Grid Background="White" Margin="10,36,10,10">
                    <Grid.RowDefinitions>
                        <RowDefinition  Height="*"/>
                        <RowDefinition  Height="3.2*"/>
                        <RowDefinition  Height="3.8*"/>
                    </Grid.RowDefinitions>
                    <Grid>
                        <StackPanel Orientation="Horizontal" Margin="20,0,0,0">
                            <Button x:Name="btnReturn" Margin="10,0,20,0" Style="{StaticResource BtnReturnStyle}" />
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition  Height="*"/>
                                    <RowDefinition  Height="0.9*"/>
                                </Grid.RowDefinitions>
                                <TextBlock  Text="听音"  Foreground="#6c6c6c" FontSize="24" VerticalAlignment="Top" Margin="0,20,0,0"/>
                                <TextBlock  Text="Sound of hearing"  Grid.Row="1" Foreground="#cecece" FontSize="16" VerticalAlignment="Top"/>
                            </Grid>
                        </StackPanel>
                    </Grid>
                    <Grid Grid.Row="1">
                        <Grid Width="1100" Height="250" VerticalAlignment="Bottom">
                            <Canvas x:Name="canvasCoordinates"  Width="{Binding ElementName=gridChart,Path=ActualWidth}" Height="{Binding ElementName=gridContainer,Path=ActualHeight}"/>
                        </Grid>
                        <Grid x:Name="gridContainer" Width="1120" Height="250" VerticalAlignment="Bottom">
                            <Border Height="230" Width="1120" VerticalAlignment="Top" >
                                <Border.Background>
                                    <ImageBrush ImageSource="/PipeGallery;component/Image/background_03.png" />
                                </Border.Background>
                            </Border>
                            <Grid x:Name="gridChart" Height="200" Width="1100" VerticalAlignment="Top" >                              
                                <Grid.Clip>
                                    <PathGeometry>
                                        <PathFigure StartPoint="15,0" IsClosed="False">
                                            <LineSegment Point="1085,0"></LineSegment>
                                            <ArcSegment Point="1100,15" Size="15,15"  SweepDirection="Clockwise"/>
                                            <LineSegment Point="1100,185"></LineSegment>
                                            <ArcSegment Point="1085,200" Size="15,15"  SweepDirection="Clockwise"/>
                                            <LineSegment Point="15,200"></LineSegment>
                                            <ArcSegment Point="0,185" Size="15,15"  SweepDirection="Clockwise"/>
                                            <LineSegment Point="0,15"></LineSegment>
                                            <ArcSegment Point="15,0" Size="15,15"  SweepDirection="Clockwise"/>
                                        </PathFigure>
                                    </PathGeometry>
                                </Grid.Clip>
                                <Grid x:Name="gridAudiochart">
                                    <Grid x:Name="gridChartContainer" >

                                    </Grid>
                                </Grid>
                            </Grid>
                        </Grid>
                    </Grid>
                    <Grid Grid.Row="2">
                        <Border Margin="55,30"  BorderThickness="1" BorderBrush="#cecece" CornerRadius="10" >
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <CheckBox x:Name="btnRed"  HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding SensorAIsEnable}">
                                    <CheckBox.Template>
                                        <ControlTemplate TargetType="{x:Type CheckBox}">
                                            <Viewbox x:Name="vb" Width="104" Height="110">
                                                <StackPanel Orientation="Vertical">
                                                    <Grid>
                                                        <Image x:Name="img" Width="104" Height="94"  Source="{Binding SensorASignalIntensity,Converter={StaticResource signalIntensityImageConverter},ConverterParameter=6}">
                                                        </Image>
                                                        <Image x:Name="img2" Visibility="Collapsed" Width="104" Height="94"  Source="{Binding SensorASignalIntensity,Converter={StaticResource signalIntensityImageConverter},ConverterParameter=8}">
                                                        </Image>
                                                    </Grid>
                                                    <TextBlock Text="传感器" x:Name="txt" Foreground="#8e8e8e" FontSize="14" Margin="0" HorizontalAlignment="Left"/>
                                                </StackPanel>
                                            </Viewbox>
                                            <ControlTemplate.Triggers>
                                                <Trigger Property="IsChecked" Value="True">
                                                    <Setter Property="Visibility" TargetName="img" Value="Collapsed" />
                                                    <Setter Property="Visibility" TargetName="img2" Value="Visible" />
                                                    <Setter Property="Width" TargetName="vb" Value="156" />
                                                    <Setter Property="Height" TargetName="vb" Value="165" />
                                                    <Setter Property="HorizontalAlignment" TargetName="txt" Value="Center" />
                                                </Trigger>
                                            </ControlTemplate.Triggers>
                                        </ControlTemplate>
                                    </CheckBox.Template>
                                </CheckBox>
                                <CheckBox x:Name="btnBlue" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding SensorBIsEnable}">
                                    <CheckBox.Template>
                                        <ControlTemplate TargetType="{x:Type CheckBox}">
                                            <Viewbox x:Name="vb" Width="104" Height="110">
                                                <StackPanel  Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
                                                    <Grid>
                                                        <Image x:Name="img" Width="104" Height="94" Source="{Binding SensorBSignalIntensity,Converter={StaticResource signalIntensityImageConverter},ConverterParameter=7 }"/>
                                                        <Image x:Name="img2" Visibility="Collapsed" Width="104" Height="94"  Source="{Binding SensorASignalIntensity,Converter={StaticResource signalIntensityImageConverter},ConverterParameter=9}">
                                                        </Image>
                                                    </Grid>
                                                    <TextBlock x:Name="txt" Text="传感器"  Foreground="#8e8e8e" FontSize="14" Margin="0" HorizontalAlignment="Left"/>
                                                </StackPanel>
                                            </Viewbox>
                                            <ControlTemplate.Triggers>
                                                <Trigger Property="IsChecked" Value="True">
                                                    <Setter Property="Visibility" TargetName="img" Value="Collapsed" />
                                                    <Setter Property="Visibility" TargetName="img2" Value="Visible" />
                                                    <Setter Property="Width" TargetName="vb" Value="156" />
                                                    <Setter Property="Height" TargetName="vb" Value="165" />
                                                    <Setter Property="HorizontalAlignment" TargetName="txt" Value="Center" /> 
                                                </Trigger>
                                            </ControlTemplate.Triggers>
                                        </ControlTemplate>
                                    </CheckBox.Template>
                                </CheckBox>
                                <CheckBox  x:Name="btnMute" Grid.Column="2" HorizontalAlignment="Center" Tag="1" Content="静音"  Style="{StaticResource ChkMuteStyle}" >
                                </CheckBox>
                                <StackPanel Grid.Column="3" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
                                </StackPanel>
                            </Grid>
                        </Border>
                    </Grid>
                </Grid>
            </Grid>
        </Viewbox>
    </Grid>
</UserControl>