<UserControl x:Class="Txgy.EWS.Client.PageModule.Views.EventListView"
             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:Txgy.EWS.Client.PageModule.Views"
             xmlns:converter="clr-namespace:Txgy.EWS.Client.Common.Converters;assembly=Txgy.EWS.Client.Common"
             xmlns:prism="http://prismlibrary.com/"
             xmlns:hc="https://handyorg.github.io/handycontrol"
             xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:txc="clr-namespace:Txgy.Controls;assembly=Txgy.Controls"
             xmlns:comm="clr-namespace:Txgy.EWS.Client.Common;assembly=Txgy.EWS.Client.Common"
             xmlns:controls="clr-namespace:Txgy.Controls;assembly=Txgy.Controls"
             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
             xmlns:txgycontrols="clr-namespace:Txgy.Controls;assembly=Txgy.Controls"
             Width="420"
             prism:ViewModelLocator.AutoWireViewModel="True"
             d:DesignHeight="1000"
             d:DesignWidth="420"
             Foreground="#FF673Ab7"
             FontSize="14"
             mc:Ignorable="d">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.DataGrid.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <converter:EnumToCheckedConverter x:Key="EnumToCheckedConverter" />
            <converter:RadioToBoolConverter x:Key="radioToBoolConverter" />
            <converter:SourceCharaInt2StringConverter x:Key="sourceCharaIntToStringConverter" />
            <converter:DateTime2StringConverter x:Key="time2String" />
            <converter:String2ColorConverter x:Key="s2c" />
            <converter:StringFormatConverter x:Key="sfc" />
            <converter:Absolute2RelativeConverter x:Key="a2r" />
            <Style x:Key="LinkButton" TargetType="Button">
                <Setter Property="Width" Value="Auto" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <ContentPresenter VerticalAlignment="Center"
                                              Content="{TemplateBinding Content}"
                                              ContentTemplate="{TemplateBinding ContentTemplate}">
                                <ContentPresenter.Resources>
                                    <Style TargetType="{x:Type TextBlock}">
                                        <Setter Property="TextDecorations" Value="Underline" />
                                    </Style>
                                </ContentPresenter.Resources>
                            </ContentPresenter>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Foreground" Value="Blue" />
                <Setter Property="Cursor" Value="Hand" />
                <Style.Triggers>
                    <Trigger Property="IsMouseOver" Value="true">
                        <Setter Property="Foreground" Value="Red" />
                    </Trigger>
                </Style.Triggers>
            </Style>
            <Style x:Key="blueText" TargetType="TextBlock">
                <Setter Property="Foreground" Value="#FF7A40F2" />
            </Style>
            <ControlTemplate x:Key="StateButtonTemplate" TargetType="ToggleButton">
                <Border Name="back"
                        Width="102"
                        Height="30"
                        BorderBrush="#99EEEEEE"
                        BorderThickness="0"
                        CornerRadius="3"
                        Background="#EEE">
                    <Border.Effect>
                        <BlurEffect Radius="1" />
                    </Border.Effect>
                    <Grid>
                        <TextBlock Margin="8,0"
                                   HorizontalAlignment="Left"
                                   VerticalAlignment="Center"
                                   Text="停止"
                                   FontSize="16"
                                   Foreground="#667A40F2" />
                        <TextBlock Margin="4,0"
                                   HorizontalAlignment="Right"
                                   VerticalAlignment="Center"
                                   Text="运行中"
                                   FontSize="16"
                                   Foreground="#FF7A40F2" />
                        <Border Width="48"
                                Margin="2,2"
                                HorizontalAlignment="Left"
                                Background="#DDD"
                                CornerRadius="2">
                            <TextBlock HorizontalAlignment="Center"
                                       VerticalAlignment="Center"
                                       Text="||"
                                       FontSize="16"
                                       Foreground="#FF673Ab7" />
                            <Border.RenderTransform>
                                <TranslateTransform x:Name="tt" X="48" />
                            </Border.RenderTransform>
                        </Border>
                    </Grid>
                </Border>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsChecked" Value="True">
                        <Trigger.EnterActions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="tt"
                                                     Storyboard.TargetProperty="X"
                                                     To="0"
                                                     Duration="0:0:0.2" />
                                </Storyboard>
                            </BeginStoryboard>
                            <BeginStoryboard>
                                <Storyboard>
                                    <ColorAnimation RepeatBehavior="Forever"
                                                    AutoReverse="True"
                                                    Storyboard.TargetName="back"
                                                    Storyboard.TargetProperty="Background.(SolidColorBrush.Color)"
                                                    To="Orange"
                                                    Duration="0:0:2" />
                                    <!--<DoubleAnimation To="10"
                                                     RepeatBehavior="Forever"
                                                     AutoReverse="True"
                                                     Duration="0:0:2"
                                                     Storyboard.TargetName="back"
                                                     Storyboard.TargetProperty="Effect.(BlurEffect.Radius)" />-->
                                </Storyboard>
                            </BeginStoryboard>
                        </Trigger.EnterActions>
                        <Trigger.ExitActions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="tt"
                                                     Storyboard.TargetProperty="X"
                                                     Duration="0:0:0.2" />
                                    <ColorAnimation Storyboard.TargetName="back"
                                                    Storyboard.TargetProperty="Background.(SolidColorBrush.Color)"
                                                    Duration="0:0:0.2" />
                                </Storyboard>
                            </BeginStoryboard>
                        </Trigger.ExitActions>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
            <DataTrigger x:Key="newAlarm"
                         Binding="{Binding RunEventCnt}"
                         Value="2">
                <DataTrigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <MediaTimeline Source="" />

                        </Storyboard>
                    </BeginStoryboard>
                </DataTrigger.EnterActions>
            </DataTrigger>
            <Storyboard x:Key="OpenMenuSb">
                <DoubleAnimation Storyboard.TargetName="bcl"
                                 Storyboard.TargetProperty="Width"
                                 To="420"
                                 Duration="0:0:0.2" />
            </Storyboard>
            <Storyboard x:Key="CloseMenu">
                <DoubleAnimation Storyboard.TargetName="bcl"
                                 Storyboard.TargetProperty="Width"
                                 To="0"
                                 Duration="0:0:0.2" />
            </Storyboard>
        </ResourceDictionary>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="Button.Click" SourceName="btnOpenMenu">
            <BeginStoryboard Storyboard="{StaticResource OpenMenuSb}" />
        </EventTrigger>
        <EventTrigger RoutedEvent="Button.Click" SourceName="btnCloseMenu">
            <BeginStoryboard Storyboard="{StaticResource CloseMenu}" />
        </EventTrigger>
    </UserControl.Triggers>
    <md:Card Margin="0,5,5,5"
             md:ThemeAssist.Theme="Light"
             UniformCornerRadius="5">
        <Grid>
            <Grid>
                <GroupBox md:ElevationAssist.Elevation="Dp8"
                          UseLayoutRounding="True"
                          BorderThickness="0"
                          Header="事件列表"
                          Style="{StaticResource MaterialDesignGroupBox}">
                    <txgycontrols:myListBox x:Name="ReceivedEventListBox"
                                            Background="White"
                                            BorderThickness="0"
                                            SelectionMode="Single"
                                            ItemsSource="{Binding QueryEventList}"
                                            SelectedItem="{Binding QueryEventListSelected}"
                                            ScrollViewer.VerticalScrollBarVisibility="Visible"
                                            ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                        <!-- ItemsSource="{Binding Path=(comm:GlobalData.QueryEventList)}" -->
                        <!-- SelectedItem="{Binding Path=(comm:GlobalData.QueryEventListSelected)}" -->
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Vertical" />
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                        <ListBox.ItemContainerStyle>
                            <Style TargetType="ListBoxItem">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="ListBoxItem">
                                            <Border x:Name="outsideborder" Margin="5,0,5,0">
                                                <StackPanel>
                                                    <StackPanel Height="56"
                                                                Margin="5"
                                                                VerticalAlignment="Top"
                                                                Orientation="Horizontal">
                                                        <StackPanel MinWidth="150" VerticalAlignment="Center">
                                                            <StackPanel>
                                                                <TextBlock VerticalAlignment="Bottom"
                                                                           Text="Time"
                                                                           Foreground="#939393"
                                                                           FontSize="8" />
                                                                <TextBlock d:Text="2023-05-09T19:21:09"
                                                                           Text="{Binding EventTime}"
                                                                           FontWeight="Bold"
                                                                           FontFamily="SEGOE UI"
                                                                           FontSize="14"
                                                                           Foreground="#FF7A40F2" />
                                                            </StackPanel>

                                                            <StackPanel Orientation="Horizontal">
                                                                <StackPanel VerticalAlignment="Bottom" Orientation="Horizontal">
                                                                    <TextBlock VerticalAlignment="Bottom"
                                                                               Text="ML"
                                                                               Foreground="#939393"
                                                                               FontSize="8" />
                                                                    <TextBlock Margin="5,0,0,0"
                                                                               d:Text="-2.56"
                                                                               Text="{Binding ML, StringFormat={}{0:F2}ml}"
                                                                               FontFamily="SEGOE UI"
                                                                               Foreground="#FF7A40F2"
                                                                               FontSize="16" />
                                                                </StackPanel>
                                                                <StackPanel Margin="15,0,0,0" Orientation="Horizontal">
                                                                    <TextBlock VerticalAlignment="Bottom"
                                                                               Text="能量"
                                                                               Foreground="#939393"
                                                                               FontSize="8" />
                                                                    <TextBlock Margin="5,0,0,0"
                                                                               d:Text="10.87J"
                                                                               Text="{Binding Energy, StringFormat={}{0}J}"
                                                                               FontFamily="SEGOE UI"
                                                                               Foreground="#FF7A40F2"
                                                                               FontSize="16" />
                                                                </StackPanel>
                                                            </StackPanel>
                                                        </StackPanel>
                                                        <StackPanel Margin="20,0,0,0">
                                                            <StackPanel Orientation="Horizontal">
                                                                <StackPanel>
                                                                    <TextBlock Text="东"
                                                                               FontSize="8"
                                                                               Foreground="#939393" />
                                                                    <TextBlock d:Text="38397887.88"
                                                                               Text="{Binding X, StringFormat={}{0:F2}, Converter={StaticResource a2r}, ConverterParameter=E}"
                                                                               FontFamily="SEGOE UI"
                                                                               Foreground="#FF7A40F2" />
                                                                </StackPanel>
                                                                <StackPanel Margin="10,0,0,0">
                                                                    <TextBlock Text="北"
                                                                               FontSize="8"
                                                                               Foreground="#939393" />
                                                                    <TextBlock d:Text="4030285.78"
                                                                               Text="{Binding Y, StringFormat={}{0:F2}, Converter={StaticResource a2r}, ConverterParameter=N}"
                                                                               FontFamily="SEGOE UI"
                                                                               Foreground="#FF7A40F2" />
                                                                </StackPanel>
                                                            </StackPanel>
                                                            <StackPanel VerticalAlignment="Bottom" Orientation="Horizontal">
                                                                <StackPanel>
                                                                    <TextBlock Text="海拔"
                                                                               FontSize="8"
                                                                               Foreground="#939393" />
                                                                    <TextBlock d:Text="647.8"
                                                                               Text="{Binding Z, StringFormat={}{0:F1}}"
                                                                               FontFamily="SEGOE UI"
                                                                               Foreground="#FF7A40F2" />
                                                                </StackPanel>
                                                                <StackPanel Margin="30,0,0,0">
                                                                    <TextBlock VerticalAlignment="Bottom"
                                                                               Text="性质"
                                                                               FontSize="8"
                                                                               Foreground="#939393" />
                                                                    <TextBlock Width="80"
                                                                               d:Text="张性"
                                                                               Text="{Binding SourceChara, Converter={StaticResource sourceCharaIntToStringConverter}}"
                                                                               FontFamily="微软雅黑"
                                                                               FontSize="12"
                                                                               Foreground="#FF7A40F2"
                                                                               Cursor="" />
                                                                </StackPanel>
                                                                <StackPanel Margin="40,0,0,0">
                                                                    <TextBlock VerticalAlignment="Bottom"
                                                                               Text="主频"
                                                                               FontSize="8"
                                                                               Foreground="#939393" />
                                                                    <TextBlock d:Text="14Hz"
                                                                               Text="{Binding DominantFreq, StringFormat={}{0}Hz}"
                                                                               FontFamily="微软雅黑"
                                                                               Foreground="#FF7A40F2" />
                                                                </StackPanel>
                                                            </StackPanel>
                                                        </StackPanel>
                                                    </StackPanel>
                                                    <Border Height="1"
                                                            BorderThickness="1"
                                                            BorderBrush="Gray" />
                                                </StackPanel>
                                            </Border>
                                            <ControlTemplate.Triggers>
                                                <Trigger Property="IsMouseOver" Value="True">
                                                    <Setter TargetName="outsideborder" Property="Background" Value="#e9e9e9" />
                                                </Trigger>
                                                <Trigger Property="IsSelected" Value="True">
                                                    <Setter TargetName="outsideborder" Property="Background" Value="#cccccc" />
                                                </Trigger>
                                            </ControlTemplate.Triggers>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </ListBox.ItemContainerStyle>
                    </txgycontrols:myListBox>
                </GroupBox>
                <Button x:Name="btnOpenMenu"
                        Height="30"
                        Margin="0,2,2,0"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Top"
                        Content="查询"
                        Style="{StaticResource ButtonSuccess}"
                        FontSize="12" />
            </Grid>
            <!--#region 侧滑栏-->
            <Border x:Name="bcl"
                    Width="0"
                    HorizontalAlignment="Right"
                    d:Width="420"
                    Background="#ffffff">
                <Grid>
                    <GroupBox UseLayoutRounding="True"
                              BorderThickness="0"
                              Header="事件查询"
                              Style="{StaticResource MaterialDesignGroupBox}">
                        <StackPanel Margin="0,4,0,0">
                            <StackPanel Margin="15,5"
                                        HorizontalAlignment="Center"
                                        Orientation="Horizontal">
                                <TextBlock Margin="5,0,5,0"
                                           HorizontalAlignment="Center"
                                           VerticalAlignment="Center"
                                           Text="开始时间" />
                                <hc:DateTimePicker x:Name="dpStartTime"
                                                   Width="220"
                                                   Height="36"
                                                   HorizontalAlignment="Center"
                                                   VerticalAlignment="Center"
                                                   DisplayDateTime="{Binding TimeFC.Cond1}"
                                                   SelectedDateTime="{Binding TimeFC.Cond1}"
                                                   FontSize="14" />
                            </StackPanel>
                            <StackPanel Margin="15,5"
                                        HorizontalAlignment="Center"
                                        Orientation="Horizontal">
                                <TextBlock Margin="5,0,5,0"
                                           HorizontalAlignment="Center"
                                           VerticalAlignment="Center"
                                           Text="结束时间" />
                                <hc:DateTimePicker x:Name="dpEntTime"
                                                   Width="220"
                                                   Height="36"
                                                   VerticalAlignment="Center"
                                                   DisplayDateTime="{Binding TimeFC.Cond2}"
                                                   SelectedDateTime="{Binding TimeFC.Cond2}"
                                                   FontSize="14" />
                            </StackPanel>
                            <StackPanel HorizontalAlignment="Center">
                                <Grid Margin="10,0">
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80" />
                                        <ColumnDefinition Width="50" />
                                        <ColumnDefinition Width="100" />
                                        <ColumnDefinition Width="50" />
                                        <ColumnDefinition Width="100" />
                                    </Grid.ColumnDefinitions>

                                    <CheckBox Grid.Row="0"
                                              HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              Content="震级范围"
                                              IsChecked="{Binding MLFC.IsUse}" />
                                    <TextBlock Grid.Row="0"
                                               Grid.Column="1"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Text=" 最小值" />
                                    <TextBox Grid.Row="0"
                                             Grid.Column="2"
                                             Width="100"
                                             Height="36"
                                             HorizontalAlignment="Left"
                                             VerticalAlignment="Center"
                                             HorizontalContentAlignment="Right"
                                             Text="{Binding MLFC.Cond2}" />
                                    <TextBlock Grid.Row="0"
                                               Grid.Column="3"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Text="最大值" />
                                    <TextBox Grid.Row="0"
                                             Grid.Column="4"
                                             Width="100"
                                             Height="36"
                                             Margin="0,5"
                                             HorizontalAlignment="Left"
                                             VerticalAlignment="Center"
                                             HorizontalContentAlignment="Right"
                                             Text="{Binding MLFC.Cond1}" />
                                    <CheckBox Grid.Row="1"
                                              HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              IsEnabled="False"
                                              Content="能量范围"
                                              IsChecked="{Binding EnergyFC.IsUse}" />
                                    <TextBlock Grid.Row="1"
                                               Grid.Column="1"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Text="最小值" />
                                    <TextBox Grid.Row="1"
                                             Grid.Column="2"
                                             Width="100"
                                             Height="36"
                                             HorizontalAlignment="Left"
                                             VerticalAlignment="Center"
                                             HorizontalContentAlignment="Right"
                                             Text="{Binding EnergyFC.Cond2}" />
                                    <TextBlock Grid.Row="1"
                                               Grid.Column="3"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Text="最大值" />
                                    <TextBox Grid.Row="1"
                                             Grid.Column="4"
                                             Width="100"
                                             Height="36"
                                             Margin="0,5"
                                             HorizontalAlignment="Left"
                                             VerticalAlignment="Center"
                                             HorizontalContentAlignment="Right"
                                             Text="{Binding EnergyFC.Cond1}" />
                                    <CheckBox Grid.Row="2"
                                              HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              Content="海拔限定"
                                              IsChecked="{Binding DepthFC.IsUse}" />
                                    <TextBlock Grid.Row="2"
                                               Grid.Column="1"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Text="最小值" />
                                    <TextBox Grid.Row="2"
                                             Grid.Column="2"
                                             Width="100"
                                             Height="36"
                                             HorizontalAlignment="Left"
                                             VerticalAlignment="Center"
                                             HorizontalContentAlignment="Right"
                                             Text="{Binding DepthFC.Cond2}" />
                                    <TextBlock Grid.Row="2"
                                               Grid.Column="3"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Text="最大值" />
                                    <TextBox Grid.Row="2"
                                             Grid.Column="4"
                                             Width="100"
                                             Height="36"
                                             Margin="0,5"
                                             HorizontalAlignment="Left"
                                             VerticalAlignment="Center"
                                             HorizontalContentAlignment="Right"
                                             Text="{Binding DepthFC.Cond1}" />

                                    <CheckBox Grid.Row="3"
                                              HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              Content="东西限定"
                                              IsChecked="{Binding EastFC.IsUse}" />
                                    <TextBlock Grid.Row="3"
                                               Grid.Column="1"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Text="最小值" />
                                    <TextBox Grid.Row="3"
                                             Grid.Column="2"
                                             Width="100"
                                             Height="36"
                                             HorizontalAlignment="Left"
                                             VerticalAlignment="Center"
                                             HorizontalContentAlignment="Right"
                                             Text="{Binding EastFC.Cond2}" />
                                    <TextBlock Grid.Row="3"
                                               Grid.Column="3"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Text="最大值" />
                                    <TextBox Grid.Row="3"
                                             Grid.Column="4"
                                             Width="100"
                                             Height="36"
                                             Margin="0,5"
                                             HorizontalAlignment="Left"
                                             VerticalAlignment="Center"
                                             HorizontalContentAlignment="Right"
                                             Text="{Binding EastFC.Cond1}" />

                                    <CheckBox Grid.Row="4"
                                              HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              Content="南北限定"
                                              IsChecked="{Binding NorthFC.IsUse}" />
                                    <TextBlock Grid.Row="5"
                                               Grid.Column="1"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Text="最小值" />
                                    <TextBox Grid.Row="4"
                                             Grid.Column="2"
                                             Width="100"
                                             Height="36"
                                             HorizontalAlignment="Left"
                                             VerticalAlignment="Center"
                                             HorizontalContentAlignment="Right"
                                             Text="{Binding NorthFC.Cond2}" />
                                    <TextBlock Grid.Row="4"
                                               Grid.Column="3"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Text="最大值" />
                                    <TextBox Grid.Row="4"
                                             Grid.Column="4"
                                             Width="100"
                                             Height="36"
                                             Margin="0,5"
                                             HorizontalAlignment="Left"
                                             VerticalAlignment="Center"
                                             HorizontalContentAlignment="Right"
                                             Text="{Binding NorthFC.Cond1}" />
                                </Grid>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <WrapPanel Grid.Row="0"
                                               Grid.ColumnSpan="5"
                                               Margin="10,5,0,5"
                                               HorizontalAlignment="Left">
                                        <Border Margin="0,0,0,0"
                                                BorderBrush="LightGray"
                                                BorderThickness="1">
                                            <WrapPanel>
                                                <TextBlock Margin="10" Text="排序参数：" />
                                                <StackPanel>
                                                    <StackPanel Orientation="Horizontal">
                                                        <RadioButton Margin="10"
                                                                     Content="时间"
                                                                     GroupName="SelectSortMode"
                                                                     IsChecked="{Binding SelectSortMode, Mode=TwoWay, ConverterParameter=Time, Converter={StaticResource EnumToCheckedConverter}}" />
                                                        <RadioButton Margin="10"
                                                                     Content="震级"
                                                                     GroupName="SelectSortMode"
                                                                     IsChecked="{Binding SelectSortMode, Mode=TwoWay, ConverterParameter=ML, Converter={StaticResource EnumToCheckedConverter}}" />
                                                        <RadioButton Margin="10"
                                                                     Content="能量"
                                                                     GroupName="SelectSortMode"
                                                                     IsChecked="{Binding SelectSortMode, Mode=TwoWay, ConverterParameter=Energy, Converter={StaticResource EnumToCheckedConverter}}" />
                                                        <RadioButton Margin="10,10,20,10"
                                                                     Content="海拔"
                                                                     GroupName="SelectSortMode"
                                                                     IsChecked="{Binding SelectSortMode, Mode=TwoWay, ConverterParameter=Depth, Converter={StaticResource EnumToCheckedConverter}}" />
                                                    </StackPanel>

                                                </StackPanel>
                                            </WrapPanel>
                                        </Border>
                                    </WrapPanel>
                                    <WrapPanel Grid.Row="1"
                                               Margin="10,5,0,5"
                                               HorizontalAlignment="Left">
                                        <Border BorderBrush="LightGray" BorderThickness="1">
                                            <WrapPanel>
                                                <TextBlock Margin="10" Text="排序模式:" />
                                                <RadioButton Margin="20,0,0,0"
                                                             Content="升序"
                                                             GroupName="SortMode"
                                                             IsChecked="{Binding SortMode, Mode=TwoWay, ConverterParameter=1, Converter={StaticResource radioToBoolConverter}}" />
                                                <RadioButton Margin="20,0,10,0"
                                                             Content="降序"
                                                             GroupName="SortMode"
                                                             IsChecked="{Binding SortMode, Mode=TwoWay, ConverterParameter=-1, Converter={StaticResource radioToBoolConverter}}" />
                                            </WrapPanel>
                                        </Border>
                                        <WrapPanel VerticalAlignment="Center">
                                            <TextBlock VerticalAlignment="Center"
                                                       Text="中等能量："
                                                       FontSize="16" />
                                            <TextBox Width="60"
                                                     Height="20"
                                                     VerticalContentAlignment="Bottom"
                                                     d:Text="99999"
                                                     Text="{Binding MiddleEnergy}"
                                                     FontSize="12"
                                                     TextAlignment="Right" />
                                            <TextBlock VerticalAlignment="Center" Text="J" />
                                        </WrapPanel>
                                    </WrapPanel>
                                    <Grid Grid.Row="2" Margin="10">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition />
                                            <ColumnDefinition />
                                            <ColumnDefinition />
                                            <ColumnDefinition />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition />
                                            <RowDefinition />
                                        </Grid.RowDefinitions>

                                        <StackPanel Grid.ColumnSpan="4"
                                                    VerticalAlignment="Center"
                                                    Orientation="Horizontal">
                                            <TextBlock VerticalAlignment="Center"
                                                       Text="事件总数："
                                                       FontSize="16" />
                                            <TextBlock VerticalAlignment="Center"
                                                       d:Text="11142"
                                                       Foreground="Black"
                                                       Text="{Binding SearchCount}"
                                                       FontSize="16" />
                                            <TextBlock Margin="50,0,0,0"
                                                       VerticalAlignment="Center"
                                                       Text="中等能量事件："
                                                       FontSize="16" />
                                            <TextBlock VerticalAlignment="Center"
                                                       d:Text="1000"
                                                       Foreground="Black"
                                                       FontSize="16"
                                                       Text="{Binding MiddleEventCount}"
                                                       Cursor="" />

                                        </StackPanel>
                                    </Grid>
                                    <StackPanel Grid.Row="3" HorizontalAlignment="Center">
                                        <Button Width="70"
                                                Height="34"
                                                HorizontalAlignment="Left"
                                                Content="查询"
                                                FontSize="16"
                                                Style="{StaticResource MaterialDesignRaisedDarkButton}"
                                                Command="{Binding QueryCommand}"
                                                Cursor="Hand" />
                                        <hc:CircleProgressBar Width="40"
                                                              Height="40"
                                                              Margin="10"
                                                              IsIndeterminate="True"
                                                              ArcThickness="10"
                                                              Visibility="{Binding CheckBarVis}"
                                                              Style="{StaticResource ProgressBarWarningCircle}" />
                                    </StackPanel>
                                </Grid>
                            </StackPanel>
                        </StackPanel>
                    </GroupBox>
                    <Button x:Name="btnCloseMenu"
                            Height="30"
                            Margin="0,2,2,0"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Top"
                            Content="关闭"
                            Style="{StaticResource ButtonWarning}"
                            FontSize="12" />
                </Grid>
            </Border>
            <!--#endregion-->
        </Grid>
    </md:Card>
</UserControl>
