Newer
Older
Correlator / Correlator / View / PictureFileWindow.xaml~RF534153e.TMP
<Window
    x:Class="Correlator.View.PictureFileWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:hc="https://handyorg.github.io/handycontrol"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Title="PictureFileWindow"
    Width="1366"
    Height="768"
    Background="#224f86"
    DataContext="{Binding PictureFile, Source={StaticResource Locator}}"
    ResizeMode="NoResize"
    ShowInTaskbar="True"
    Topmost="True"
    WindowStartupLocation="CenterScreen"
    WindowStyle="None"
    mc:Ignorable="d">

    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Loaded">
            <i:InvokeCommandAction Command="{Binding WindowLoadedCommand}" />
        </i:EventTrigger>
    </i:Interaction.Triggers>
    
    <Grid Width="1366" Height="768">
        <Grid Margin="10" Background="White">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="6.5*" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid>
                <StackPanel Margin="20,0,0,0" Orientation="Horizontal">
                    <Button
                        Width="80"
                        Height="40"
                        Margin="10,0"
                        Command="{Binding GoBackCommand}">
                        <StackPanel Orientation="Horizontal">
                            <Image
                                Width="18"
                                Height="18"
                                Margin="0,0,5,0"
                                Source="/Correlator;component/Image/return_g.png" />
                            <TextBlock
                                FontSize="14"
                                Foreground="#949494"
                                Text="返回" />
                        </StackPanel>
                    </Button>

                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="0.9*" />
                        </Grid.RowDefinitions>
                        <TextBlock
                            VerticalAlignment="Bottom"
                            FontSize="24"
                            Foreground="#6c6c6c"
                            Text="文件列表" />
                        <TextBlock
                            Grid.Row="1"
                            VerticalAlignment="Top"
                            FontSize="16"
                            Foreground="#cecece"
                            Text="File list" />
                    </Grid>
                </StackPanel>
            </Grid>

            <DataGrid
                Grid.Row="1"
                Width="1250"
                hc:DataGridAttach.CanUnselectAllWithBlankArea="True"
                AutoGenerateColumns="False"
                FontSize="16"
                Foreground="#545454"
                HeadersVisibility="All"
                ItemsSource="{Binding PictureFiles}"
                RowHeaderWidth="60"
                RowHeight="60">

                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="SelectionChanged">
                        <i:InvokeCommandAction Command="{Binding ItemSelectedCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>

                <DataGrid.RowHeaderTemplate>
                    <DataTemplate>
                        <CheckBox IsChecked="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=DataGridRow}}" />
                    </DataTemplate>
                </DataGrid.RowHeaderTemplate>

                <DataGrid.Columns>
                    <DataGridTextColumn
                        Width="100"
                        Binding="{Binding Order}"
                        CanUserResize="False"
                        FontSize="16"
                        Foreground="#545454"
                        Header="序号"
                        IsReadOnly="True" />
                    <DataGridTextColumn
                        Width="*"
                        Binding="{Binding FileName}"
                        CanUserResize="False"
                        FontSize="16"
                        Foreground="#545454"
                        Header="名称"
                        IsReadOnly="True" />
                    <DataGridTextColumn
                        Width="240"
                        Binding="{Binding CreationTime}"
                        CanUserResize="False"
                        FontSize="16"
                        Foreground="#545454"
                        Header="生成时间"
                        IsReadOnly="True" />
                    <DataGridTextColumn
                        Width="150"
                        Binding="{Binding FileSize}"
                        CanUserResize="False"
                        FontSize="16"
                        Foreground="#545454"
                        Header="文件大小"
                        IsReadOnly="True" />
                    <DataGridTemplateColumn CanUserResize="False" Header="操作">
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Button
                                    Width="50"
                                    Height="38"
                                    Background="Transparent"
                                    BorderThickness="0"
                                    Command="{Binding ShowPictureCommand}">
                                    <Image Source="/Correlator;component/Image/icon_pic1.png" />
                                </Button>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                </DataGrid.Columns>
            </DataGrid>

            <Grid Grid.Row="2" Width="1250">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <Button
                    Grid.Column="0"
                    Width="80"
                    Height="35"
                    HorizontalAlignment="Left">
                    <StackPanel Orientation="Horizontal">
                        <Image
                            Width="18"
                            Height="18"
                            Margin="0,0,5,0"
                            Source="/Correlator;component/Image/tubiao_46.png" />
                        <TextBlock FontSize="14" Text="删除" />
                    </StackPanel>
                </Button>

                <hc:Pagination
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    IsJumpEnabled="True"
                    MaxPageCount="{Binding MaxPage}"
                    PageIndex="{Binding PageIndex}">
                    <hc:Interaction.Triggers>
                        <hc:EventTrigger EventName="PageUpdated">
                            <hc:EventToCommand Command="{Binding PageUpdatedCmd}" PassEventArgsToCommand="True" />
                        </hc:EventTrigger>
                    </hc:Interaction.Triggers>
                </hc:Pagination>

                <Button
                    Grid.Column="2"
                    Width="80"
                    Height="35"
                    HorizontalAlignment="Left">
                    <StackPanel Orientation="Horizontal">
                        <Image
                            Width="18"
                            Height="18"
                            Margin="0,0,5,0"
                            Source="/Correlator;component/Image/tubiao_39.png" />
                        <TextBlock FontSize="14" Text="刷新" />
                    </StackPanel>
                </Button>
            </Grid>
        </Grid>
    </Grid>
</Window>