|
|
|
<UserControl x:Class="StartServerWPF.Modules.MseedChart.Views.ChartPlotRealDataView"
|
|
|
|
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:StartServerWPF.Modules.MseedChart.Converters"
|
|
|
|
mc:Ignorable="d" Background="#FFEEF1F3"
|
|
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
d:DesignHeight="450" d:DesignWidth="800"
|
|
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
|
|
prism:ViewModelLocator.AutoWireViewModel="True">
|
|
|
|
<UserControl.Resources>
|
|
|
|
<converter:Bool2VisibilityConverter x:Key="Bool2Visibility"/>
|
|
|
|
<Style TargetType="RadioButton" x:Key="NormalRButtonStyle">
|
|
|
|
<Setter Property="Foreground" Value="White"/>
|
|
|
|
<Setter Property="Width" Value="50"/>
|
|
|
|
<Setter Property="Height" Value="50"/>
|
|
|
|
<Setter Property="Background"
|
|
|
|
Value="#673ab7"/>
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="RadioButton">
|
|
|
|
<Border Background="{TemplateBinding Background}" CornerRadius="4">
|
|
|
|
<Border Background="Transparent" Name="back" CornerRadius="4">
|
|
|
|
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"/>
|
|
|
|
</Border>
|
|
|
|
</Border>
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
<Setter Property="Background" Value="#11000000" TargetName="back"/>
|
|
|
|
</Trigger>
|
|
|
|
<Trigger Property="IsChecked" Value="True">
|
|
|
|
<Setter Property="Background"
|
|
|
|
Value="lightgray" TargetName="back"/>
|
|
|
|
</Trigger>
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
<Style TargetType="Button" x:Key="NormalButtonStyle">
|
|
|
|
<Setter Property="Foreground" Value="White"/>
|
|
|
|
<Setter Property="Background"
|
|
|
|
Value="#673ab7"/>
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
|
<Border Background="{TemplateBinding Background}" CornerRadius="5">
|
|
|
|
<Border Background="Transparent" Name="back" CornerRadius="5" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
|
|
|
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"/>
|
|
|
|
</Border>
|
|
|
|
</Border>
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
<Setter Property="Background" Value="#11000000" TargetName="back"/>
|
|
|
|
</Trigger>
|
|
|
|
<Trigger Property="IsPressed" Value="True">
|
|
|
|
<Setter Property="Background"
|
|
|
|
Value="lightgray" TargetName="back"/>
|
|
|
|
</Trigger>
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
|
|
<i:Interaction.Triggers>
|
|
|
|
<i:EventTrigger EventName="Loaded">
|
|
|
|
<i:InvokeCommandAction Command="{Binding Path=LoadedCommand}"/>
|
|
|
|
</i:EventTrigger>
|
|
|
|
<i:EventTrigger EventName="Unloaded">
|
|
|
|
<i:InvokeCommandAction Command="{Binding Path=UnloadedCommand}"/>
|
|
|
|
</i:EventTrigger>
|
|
|
|
</i:Interaction.Triggers>
|
|
|
|
<!--<Border Background="White">
|
|
|
|
<TextBlock Text="{Binding Title}" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" Margin="10,0,10,0"/>
|
|
|
|
</Border>-->
|
|
|
|
<Border Background="White" CornerRadius="5" Margin="10">
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="50"/>
|
|
|
|
<RowDefinition Height="1000*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<!--实时波形-->
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Button Grid.Column="1" Content="开始接收" Width="90" Height="40" IsEnabled="{Binding IsEnableStartRealtime}"
|
|
|
|
Command="{Binding RealTimeDataCommand}" CommandParameter="True" Margin="10,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
|
|
</Button>
|
|
|
|
<Button Grid.Column="1" Height="40" Content="停止接收" Width="90" IsEnabled="{Binding IsEnableStopRealtime}"
|
|
|
|
Command="{Binding RealTimeDataCommand}" CommandParameter="False" Margin="20,0,20,0" VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
<TextBlock Text="通道:" VerticalAlignment="Center"/>
|
|
|
|
<CheckBox Content="Z" IsChecked="{Binding SHZChannel}" VerticalAlignment="Center" Style="{x:Null}" />
|
|
|
|
<CheckBox Content="E" IsChecked="{Binding SHEChannel}" VerticalAlignment="Center" Style="{x:Null}" Margin="5,0,5,0"/>
|
|
|
|
<CheckBox Content="N" IsChecked="{Binding SHNChannel}" VerticalAlignment="Center" Style="{x:Null}" />
|
|
|
|
<TextBlock Text="台站数:" VerticalAlignment="Center" Margin="20,0,0,0"/>
|
|
|
|
<ComboBox SelectedIndex="{Binding StationsNumberIndex}" VerticalAlignment="Center">
|
|
|
|
<ComboBoxItem Content="3"/>
|
|
|
|
<ComboBoxItem Content="6"/>
|
|
|
|
<ComboBoxItem Content="9"/>
|
|
|
|
<ComboBoxItem Content="All"/>
|
|
|
|
</ComboBox>
|
|
|
|
<Button Content="确认选择" x:Name="cBoxAllChannel" Margin="10,0,0,0" Height="40" Width="90" Command="{Binding SureCommand}" VerticalAlignment="Center" />
|
|
|
|
<Button Content="台站选择" Margin="10,0,0,0" Height="40" Width="90" Command="{Binding StationSelectCommand}" IsEnabled="{Binding IsEnableStartRealtime}" VerticalAlignment="Center" />
|
|
|
|
<!--<TextBlock VerticalAlignment="Center" Margin="20,0,0,0">时间间隔:</TextBlock>
|
|
|
|
<TextBox Text="{Binding XaisInterval}" Width="60" VerticalAlignment="Center"/>
|
|
|
|
<Button Command="{Binding IntervalSureCommand}" Background="#FF66B1FF" HorizontalAlignment="Right">确认</Button>-->
|
|
|
|
<TextBox Text="{Binding IntervalTime}" Visibility="Collapsed" Width="60" VerticalAlignment="Center"></TextBox>
|
|
|
|
</StackPanel>
|
|
|
|
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
|
|
|
<ContentControl x:Name="contentControl" Content="{Binding ChildContent}" Grid.Row="1"/>
|
|
|
|
</ScrollViewer>
|
|
|
|
<TextBlock Text="{Binding CurrentTime}" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="0,0,0,46"></TextBlock>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</UserControl>
|