2023-08-18 16:31:48 +00:00
|
|
|
|
<Page
|
2023-08-19 21:52:13 +00:00
|
|
|
|
x:Class="VPet.Plugin.ModMaker.Views.ModEdit.LowTextEdit.LowTextPage"
|
2023-08-18 16:31:48 +00:00
|
|
|
|
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"
|
2023-08-19 21:52:13 +00:00
|
|
|
|
xmlns:local="clr-namespace:VPet.Plugin.ModMaker.Views.ModEdit.LowTextEdit"
|
2023-08-18 16:31:48 +00:00
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
2023-08-19 21:52:13 +00:00
|
|
|
|
xmlns:vm="clr-namespace:VPet.Plugin.ModMaker.ViewModels.ModEdit.LowTextEdit"
|
2023-08-18 16:31:48 +00:00
|
|
|
|
Title="Page_LowText"
|
|
|
|
|
d:DesignHeight="450"
|
|
|
|
|
d:DesignWidth="800"
|
|
|
|
|
mc:Ignorable="d">
|
2023-08-19 21:52:13 +00:00
|
|
|
|
<d:Page.DataContext>
|
|
|
|
|
<vm:LowTextPageVM />
|
|
|
|
|
</d:Page.DataContext>
|
2023-08-18 16:31:48 +00:00
|
|
|
|
<Page.Resources>
|
|
|
|
|
<ResourceDictionary>
|
2023-08-19 21:52:13 +00:00
|
|
|
|
<ContextMenu x:Key="ContextMenu_DataGridRow" x:Shared="false">
|
2023-08-18 16:31:48 +00:00
|
|
|
|
<MenuItem
|
2023-08-19 21:52:13 +00:00
|
|
|
|
Command="{Binding DataContext.EditLowTextCommand, RelativeSource={RelativeSource AncestorType=Page, Mode=FindAncestor}}"
|
|
|
|
|
CommandParameter="{Binding DataContext, RelativeSource={RelativeSource AncestorType=DataGridRow, Mode=FindAncestor}}"
|
|
|
|
|
Header="修改低状态文本" />
|
2023-08-18 16:31:48 +00:00
|
|
|
|
<MenuItem
|
2023-08-19 21:52:13 +00:00
|
|
|
|
Command="{Binding DataContext.RemoveLowTextCommand, RelativeSource={RelativeSource AncestorType=Page, Mode=FindAncestor}}"
|
|
|
|
|
CommandParameter="{Binding DataContext, RelativeSource={RelativeSource AncestorType=DataGridRow, Mode=FindAncestor}}"
|
|
|
|
|
Header="删除低状态文本" />
|
2023-08-18 16:31:48 +00:00
|
|
|
|
</ContextMenu>
|
|
|
|
|
</ResourceDictionary>
|
|
|
|
|
</Page.Resources>
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<TextBox
|
|
|
|
|
x:Name="TextBox_SearchFood"
|
|
|
|
|
pu:TextBoxHelper.Watermark="搜索文本"
|
2023-08-19 21:52:13 +00:00
|
|
|
|
Text="{Binding FilterLowText.Value, UpdateSourceTrigger=PropertyChanged}" />
|
2023-08-18 16:31:48 +00:00
|
|
|
|
<DataGrid
|
|
|
|
|
x:Name="DataGrid_LowText"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
d:ItemsSource="{d:SampleData ItemCount=5}"
|
|
|
|
|
pu:DataGridHelper.ColumnHeaderHorizontalContentAlignment="Center"
|
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
|
CanUserAddRows="False"
|
|
|
|
|
GridLinesVisibility="Horizontal"
|
2023-08-19 21:52:13 +00:00
|
|
|
|
ItemsSource="{Binding ShowLowTexts.Value}"
|
2023-08-18 16:31:48 +00:00
|
|
|
|
MouseDoubleClick="DataGrid_Food_MouseDoubleClick"
|
|
|
|
|
RowDetailsVisibilityMode="Visible"
|
|
|
|
|
RowHeight="64"
|
|
|
|
|
VirtualizingStackPanel.IsVirtualizing="True"
|
|
|
|
|
VirtualizingStackPanel.VirtualizationMode="Recycling">
|
|
|
|
|
<DataGrid.RowStyle>
|
|
|
|
|
<Style BasedOn="{StaticResource {x:Type DataGridRow}}" TargetType="DataGridRow">
|
|
|
|
|
<Setter Property="Height" Value="64" />
|
|
|
|
|
<Setter Property="Tag" Value="{Binding}" />
|
|
|
|
|
<Setter Property="ContextMenu" Value="{StaticResource ContextMenu_DataGridRow}" />
|
|
|
|
|
</Style>
|
|
|
|
|
</DataGrid.RowStyle>
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
|
<DataGridTextColumn
|
2023-08-19 21:52:13 +00:00
|
|
|
|
Binding="{Binding CurrentI18nData.Value.Text.Value}"
|
2023-08-18 16:31:48 +00:00
|
|
|
|
CanUserSort="True"
|
|
|
|
|
IsReadOnly="True"
|
|
|
|
|
SortMemberPath="Name">
|
|
|
|
|
<DataGridTextColumn.Header>
|
|
|
|
|
<Label Content="文本" />
|
|
|
|
|
</DataGridTextColumn.Header>
|
|
|
|
|
</DataGridTextColumn>
|
|
|
|
|
<DataGridTextColumn
|
2023-08-19 21:52:13 +00:00
|
|
|
|
Binding="{Binding Mode.Value}"
|
2023-08-18 16:31:48 +00:00
|
|
|
|
CanUserSort="True"
|
|
|
|
|
IsReadOnly="True"
|
|
|
|
|
SortMemberPath="Type">
|
|
|
|
|
<DataGridTextColumn.Header>
|
|
|
|
|
<Label Content="状态" />
|
|
|
|
|
</DataGridTextColumn.Header>
|
|
|
|
|
</DataGridTextColumn>
|
|
|
|
|
<DataGridTextColumn
|
2023-08-19 21:52:13 +00:00
|
|
|
|
Binding="{Binding Strength.Value}"
|
2023-08-18 16:31:48 +00:00
|
|
|
|
CanUserSort="True"
|
|
|
|
|
IsReadOnly="True"
|
|
|
|
|
SortMemberPath="StrengthFood">
|
|
|
|
|
<DataGridTextColumn.Header>
|
|
|
|
|
<Label Content="口渴/饥饿需求" />
|
|
|
|
|
</DataGridTextColumn.Header>
|
|
|
|
|
</DataGridTextColumn>
|
|
|
|
|
<DataGridTextColumn
|
2023-08-19 21:52:13 +00:00
|
|
|
|
Binding="{Binding Like.Value}"
|
2023-08-18 16:31:48 +00:00
|
|
|
|
CanUserSort="True"
|
|
|
|
|
IsReadOnly="True"
|
|
|
|
|
SortMemberPath="StrengthDrink">
|
|
|
|
|
<DataGridTextColumn.Header>
|
|
|
|
|
<Label Content="好感需求" />
|
|
|
|
|
</DataGridTextColumn.Header>
|
|
|
|
|
</DataGridTextColumn>
|
|
|
|
|
</DataGrid.Columns>
|
|
|
|
|
</DataGrid>
|
|
|
|
|
<Button
|
|
|
|
|
x:Name="Button_AddLowText"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
VerticalAlignment="Bottom"
|
2023-08-19 21:52:13 +00:00
|
|
|
|
Command="{Binding AddLowTextCommand}"
|
2023-08-18 16:31:48 +00:00
|
|
|
|
Content="➕"
|
|
|
|
|
Style="{StaticResource AddButton}" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</Page>
|