mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
5c5fafee94
- 主界面布局修改, 添加`第一次启动失败`按钮 SettingEditor: - 设置主页面修改, 添加`全部重置`按钮, 列表项右键菜单功能移至页面右侧 - 模组管理页面修复名称和描述未载入翻译的问题 SaveViewer: - 存档列表添加`哈希`列
176 lines
7.6 KiB
XML
176 lines
7.6 KiB
XML
<pu:WindowX
|
|
x:Class="VPet.Solution.Views.SaveViewer.SaveWindow"
|
|
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:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
|
|
xmlns:local="clr-namespace:VPet.Solution"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:vm="clr-namespace:VPet.Solution.ViewModels.SaveViewer"
|
|
Title="{ll:Str 'VPET 存档查看器'}"
|
|
Width="800"
|
|
Height="450"
|
|
MinWidth="400"
|
|
MinHeight="200"
|
|
d:DataContext="{d:DesignInstance Type=vm:SaveWindowVM}"
|
|
WindowStartupLocation="CenterScreen"
|
|
mc:Ignorable="d">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" MinWidth="100" />
|
|
<ColumnDefinition MinWidth="300" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBox
|
|
pu:TextBoxHelper.Watermark="{ll:Str 搜索存档}"
|
|
Style="{DynamicResource StandardTextBoxStyle}"
|
|
Text="{Binding SearchSave, UpdateSourceTrigger=PropertyChanged}" />
|
|
<DataGrid
|
|
x:Name="DataGrid_Saves"
|
|
Grid.Row="1"
|
|
d:ItemsSource="{d:SampleData ItemCount=5}"
|
|
AutoGenerateColumns="False"
|
|
CanUserAddRows="False"
|
|
ItemsSource="{Binding ShowSaves}"
|
|
SelectedItem="{Binding CurrentSave}">
|
|
<DataGrid.RowStyle>
|
|
<Style BasedOn="{StaticResource {x:Type DataGridRow}}" TargetType="DataGridRow">
|
|
<Setter Property="Tag" Value="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window}}" />
|
|
<Setter Property="ToolTip" Value="{Binding FilePath}" />
|
|
<Setter Property="ContextMenu">
|
|
<Setter.Value>
|
|
<ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Mode=Self}}">
|
|
<MenuItem
|
|
Command="{Binding PlacementTarget.Tag.OpenFileCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding}"
|
|
Header="{ll:Str 打开文件}" />
|
|
<MenuItem
|
|
Command="{Binding PlacementTarget.Tag.OpenFileInExplorerCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding}"
|
|
Header="{ll:Str 从资源管理器打开文件}" />
|
|
</ContextMenu>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</DataGrid.RowStyle>
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn
|
|
Binding="{Binding Name}"
|
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
|
Header="{ll:Str 名称}"
|
|
IsReadOnly="True" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding DateSaved, StringFormat='yyyy/MM/dd HH:mm:ss'}"
|
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
|
Header="{ll:Str 保存时间}"
|
|
IsReadOnly="True" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding TotalTime}"
|
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
|
Header="{ll:Str 游玩时长}"
|
|
IsReadOnly="True" />
|
|
<DataGridTextColumn
|
|
Binding="{Binding HashChecked}"
|
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
|
Header="{ll:Str 哈希}"
|
|
IsReadOnly="True" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</Grid>
|
|
<Grid Grid.Column="1" IsEnabled="{Binding SelectedItem, ElementName=DataGrid_Saves, Converter={StaticResource NullToFalse}}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<ListBox x:Name="ListBox_Pages" Style="{DynamicResource SideMenuListBoxStyle}">
|
|
<ListBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ListBox.ItemsPanel>
|
|
<ListBoxItem x:Name="ListBoxItem_SaveData" Content="{ll:Str 数据}" />
|
|
<ListBoxItem x:Name="ListBoxItem_SaveStatistic" Content="{ll:Str 统计}" />
|
|
</ListBox>
|
|
<Frame
|
|
x:Name="Frame_Main"
|
|
Grid.Row="1"
|
|
Content="{Binding SelectedItem.Tag, ElementName=ListBox_Pages}"
|
|
ContentRendered="Frame_Main_ContentRendered"
|
|
NavigationUIVisibility="Hidden" />
|
|
<!--<TabControl
|
|
x:Name="MainTab"
|
|
Grid.Column="1"
|
|
Margin="5"
|
|
d:SelectionChanged="MainTab_SelectionChanged"
|
|
pu:TabControlHelper.CanHeaderPanelScroll="True"
|
|
pu:TabControlHelper.ItemsCornerRadius="4"
|
|
pu:TabControlHelper.ItemsHeight="NaN"
|
|
pu:TabControlHelper.ItemsHoverBackground="{DynamicResource PrimaryLight}"
|
|
pu:TabControlHelper.ItemsPadding="10,7"
|
|
pu:TabControlHelper.ItemsSelectedBackground="{DynamicResource PrimaryDark}"
|
|
pu:TabControlHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Foreground="{DynamicResource PrimaryText}">
|
|
<TabControl.ContentTemplate>
|
|
<DataTemplate>
|
|
<Border
|
|
Margin="0,5,0,10"
|
|
Background="{DynamicResource DARKPrimaryText}"
|
|
CornerRadius="15">
|
|
<ContentControl Margin="10,5" Content="{Binding}" />
|
|
</Border>
|
|
</DataTemplate>
|
|
</TabControl.ContentTemplate>
|
|
<TabItem
|
|
BorderBrush="{DynamicResource PrimaryDarker}"
|
|
Foreground="{DynamicResource PrimaryText}"
|
|
Header="" />
|
|
<TabItem BorderBrush="{DynamicResource PrimaryDarker}" Header="{ll:Str 系统}" />
|
|
<TabItem BorderBrush="{DynamicResource PrimaryDarker}" Header="{ll:Str 互动}" />
|
|
<TabItem BorderBrush="{DynamicResource PrimaryDarker}" Header="{ll:Str 自定}" />
|
|
<TabItem BorderBrush="{DynamicResource PrimaryDarker}" Header="{ll:Str 诊断}" />
|
|
<TabItem BorderBrush="{DynamicResource PrimaryDarker}" Header="{ll:Str MOD管理}" />
|
|
</TabControl>
|
|
<Label
|
|
x:Name="GameVerison"
|
|
Grid.ColumnSpan="2"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Background="{x:Null}"
|
|
Content="版本v1.0 (655366666)"
|
|
FontSize="10"
|
|
Foreground="Green" />-->
|
|
</Grid>
|
|
<!--<Grid Grid.Column="1">
|
|
<TextBox
|
|
x:Name="tb_seach_menu"
|
|
Margin="3,6,6,0"
|
|
VerticalAlignment="Top"
|
|
d:TextChanged="tb_seach_menu_textchange"
|
|
pu:TextBoxHelper.Watermark="{ll:Str 搜索设置}"
|
|
FontSize="16"
|
|
Style="{DynamicResource StandardTextBoxStyle}" />
|
|
<ListBox
|
|
x:Name="ListMenu"
|
|
Margin="3,40,6,3"
|
|
pu:ListBoxHelper.CornerRadius="5"
|
|
pu:ListBoxHelper.ItemsHoverBackground="{DynamicResource Primary}"
|
|
pu:ListBoxHelper.ItemsSelectedBackground="{DynamicResource SecondaryLight}"
|
|
Background="{DynamicResource SecondaryLighter}"
|
|
BorderBrush="{DynamicResource Primary}"
|
|
BorderThickness="2"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto" />
|
|
</Grid>-->
|
|
</Grid>
|
|
</pu:WindowX>
|