<UserControl x:Class="Txgy.EWS.Client.PageModule.Views.ReportDayListView"
             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:prism="http://prismlibrary.com/"
             xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:hc="https://handyorg.github.io/handycontrol"
             xmlns:oxy="http://oxyplot.org/wpf"
             xmlns:lcu="http://schemas.arction.com/charting/ultimate/"
             d:DesignHeight="2000"
             d:DesignWidth="1600"
             mc:Ignorable="d">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="120" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <!-- 数据预览 -->
        <md:Card Margin="5,5,5,0"
                 UniformCornerRadius="5"
                 Background="White">
            <StackPanel Margin="5,0"
                        VerticalAlignment="Center"
                        Cursor="">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Margin="10"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               Text="日期："
                               FontSize="16" />
                    <!--<DatePicker Width="120" SelectedDate="{Binding ReportStartTime}">
                        <DatePicker.Resources>
                            <Style TargetType="DatePicker">
                                <Setter Property="BorderThickness" Value="0" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate>
                                            <TextBox x:Name="PART_TextBox" Text="{Binding Path=SelectedDate, StringFormat={}{0:yyyy年MM月dd日}, RelativeSource={RelativeSource AncestorType={x:Type DatePicker}}}" />
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </DatePicker.Resources>
                    </DatePicker>-->
                    <hc:DatePicker x:Name="dpSearchDate"
                                   Width="140"
                                   Height="36"
                                   Margin="10,0"
                                   HorizontalAlignment="Center"
                                   VerticalAlignment="Center"
                                   Foreground="#FF673Ab7" />
                    <!--<TextBlock Margin="10"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               Text="结束日期"
                               FontSize="16" />
                    <hc:DatePicker Width="140"
                                   Height="36"
                                   Margin="10,0"
                                   HorizontalAlignment="Center"
                                   VerticalAlignment="Center"
                                   DisplayDate="{Binding ReportEndTime, StringFormat={}{0:yyyy-MM-dd}}"
                                   SelectedDate="{Binding ReportEndTime, StringFormat={}{0:yyyy-MM-dd}}">-->

                    <!--</hc:DatePicker>-->
                    <TextBlock Margin="10,5"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               Text="最小震级："
                               FontSize="16" />
                    <hc:NumericUpDown x:Name="nudMinML"
                                      Width="78"
                                      Margin="10"
                                      VerticalAlignment="Center"
                                      FontSize="12"
                                      Foreground="#FF673Ab7"
                                      DecimalPlaces="2"
                                      Increment="0.1"
                                      Maximum="0"
                                      Minimum="-3.0" />
                    <TextBlock Margin="10,0,10,0"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               Text="最大震级："
                               FontSize="16" />
                    <hc:NumericUpDown x:Name="nudMaxML"
                                      Width="78"
                                      Margin="10"
                                      VerticalAlignment="Center"
                                      FontSize="12"
                                      Foreground="#FF673Ab7"
                                      DecimalPlaces="2"
                                      Increment="0.1"
                                      Maximum="0"
                                      Minimum="-3.0" />
                    <TextBlock Margin="10,0,10,0"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               Text="中等能量："
                               FontSize="16" />
                    <TextBox x:Name="tbMiddleEnergy"
                             Width="60"
                             Margin="10,0,0,0"
                             VerticalAlignment="Center"
                             FontSize="12"
                             Foreground="#FF673Ab7"
                             TextAlignment="Right" />
                    <TextBlock VerticalAlignment="Center" Text="J" />
                    <TextBlock Margin="10,0,0,0"
                               VerticalAlignment="Center"
                               Text="事件数量："
                               FontSize="16" />
                    <TextBlock x:Name="tbEventsCount"
                               Margin="10,0,0,0"
                               VerticalAlignment="Center"
                               Text="0"
                               Foreground="#FF673Ab7"
                               FontSize="16" />
                </StackPanel>

                <StackPanel Margin="10,5"
                            HorizontalAlignment="Center"
                            Orientation="Horizontal">
                    <Button x:Name="btnSearch"
                            Width="80"
                            Height="34"
                            Click="btnSearch_Click"
                            Content="预览"
                            FontSize="16"
                            Style="{StaticResource MaterialDesignRaisedDarkButton}" />
                    <Button x:Name="btnExport"
                            Width="80"
                            Height="34"
                            Margin="60,0"
                            Click="btnExport_Click"
                            IsEnabled="False"
                            Content="导出"
                            FontSize="16"
                            Style="{StaticResource MaterialDesignRaisedDarkButton}" />
                </StackPanel>
            </StackPanel>
        </md:Card>
        <!-- 视图 -->
        <!--<ContentControl Content="{Binding StereoImage}" />-->
        <ScrollViewer x:Name="scrolls"
                      Grid.Row="1"
                      Margin="5"
                      VerticalScrollBarVisibility="Auto"
                      HorizontalScrollBarVisibility="Auto">
            <ScrollViewer.Content>
                <StackPanel>
                    <oxy:PlotView x:Name="oxyplotDayFreq"
                                  Height="600"
                                  Background="Red"
                                  IsMouseWheelEnabled="False" />
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Canvas x:Name="canvasPlan"
                                Height="590"
                                Margin="0,5,0,5"
                                Background="Green" />
                        <Grid Name="gridChart"
                              Grid.Column="1"
                              Margin="5"
                              Background="Blue"
                              IsHitTestVisible="False">
                            <ContentControl Margin="310,60,0,0"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Top"
                                            Content="ContentControl" />
                        </Grid>
                    </Grid>
                    <StackPanel Height="600"
                                HorizontalAlignment="Center"
                                Orientation="Horizontal">


                        <lcu:LightningChart x:Name="chartStereo"
                                            Width="612"
                                            Margin="5"
                                            Background="Blue" />
                    </StackPanel>
                    <ListView Name="lvUsers"
                              Height="500"
                              Background="Aqua"
                              ItemsSource="{Binding SearchEvents, Mode=TwoWay}">
                        <ListView.View>
                            <GridView>
                                <GridViewColumn Width="60" Header="选择">
                                    <GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <CheckBox IsChecked="{Binding IsSelected}" />
                                        </DataTemplate>
                                    </GridViewColumn.CellTemplate>
                                </GridViewColumn>
                                <GridViewColumn Width="60"
                                                Header="ID"
                                                DisplayMemberBinding="{Binding EventID}" />
                                <GridViewColumn Width="190"
                                                Header="发震时刻"
                                                DisplayMemberBinding="{Binding EventTime}" />
                                <GridViewColumn Width="150"
                                                Header="东"
                                                DisplayMemberBinding="{Binding Y, StringFormat=0.00}" />
                                <GridViewColumn Width="150"
                                                Header="北"
                                                DisplayMemberBinding="{Binding X, StringFormat=0.00}" />
                                <GridViewColumn Width="100"
                                                Header="海拔"
                                                DisplayMemberBinding="{Binding Z, StringFormat=0.00}" />
                                <GridViewColumn Width="100"
                                                Header="ML"
                                                DisplayMemberBinding="{Binding ML, StringFormat=0.00}" />
                                <GridViewColumn Width="100"
                                                Header="能量"
                                                DisplayMemberBinding="{Binding Energy}" />

                            </GridView>
                        </ListView.View>
                    </ListView>
                </StackPanel>
            </ScrollViewer.Content>
        </ScrollViewer>
    </Grid>
</UserControl>
