Hakoyu e53acb283a 新增:
- 在宠物列表页面添加 `不显示本体宠物` 按钮 (默认开启)

更新:
- *自动设置食物推荐价格* 可在当前模组编辑时继承
- 历史编辑按最后编辑时间倒序排序
2023-12-14 23:27:08 +08:00

160 lines
6.7 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<Page
x:Class="VPet.ModMaker.Views.ModEdit.MoveEdit.MovePage"
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.ModMaker.Views.ModEdit.MoveEdit"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pu="https://opensource.panuon.com/wpf-ui"
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.MoveEdit"
Title="MovePage"
d:DataContext="{d:DesignInstance Type=vm:MovePageVM}"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox pu:TextBoxHelper.Watermark="{ll:Str 搜索动画}" Text="{Binding Search.Value, UpdateSourceTrigger=PropertyChanged}">
<TextBox.Style>
<Style BasedOn="{StaticResource StandardTextBoxStyle}" TargetType="TextBox">
<Setter Property="IsEnabled" Value="True" />
<Style.Triggers>
<DataTrigger Binding="{Binding SelectedItem, ElementName=ComboBox_Pet}" Value="{x:Null}">
<Setter Property="IsEnabled" Value="False" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<ComboBox
x:Name="ComboBox_Pet"
Grid.Column="1"
pu:ComboBoxHelper.Watermark="{ll:Str 选择宠物}"
ItemsSource="{Binding Pets}"
SelectedItem="{Binding CurrentPet.Value}"
Style="{DynamicResource StandardComboBoxStyle}">
<ComboBox.ItemContainerStyle>
<Style BasedOn="{StaticResource {x:Type ComboBoxItem}}" TargetType="ComboBoxItem">
<Setter Property="ToolTip" Value="{Binding CurrentI18nData.Value.Name.Value}" />
<Setter Property="Visibility">
<Setter.Value>
<MultiBinding Converter="{StaticResource AllTrueToCollapsedConverter}">
<Binding Path="DataContext.ModInfo.DontShowMainPet.Value" RelativeSource="{RelativeSource AncestorType=Page}" />
<Binding Path="FromMain.Value" />
</MultiBinding>
</Setter.Value>
</Setter>
</Style>
</ComboBox.ItemContainerStyle>
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Id.Value}" />
<TextBlock Text="{ll:Str {} (来自本体)}" Visibility="{Binding FromMain.Value, Converter={StaticResource FalseToCollapsedConverter}}" />
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<Grid Grid.Row="1">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="IsEnabled" Value="True" />
<Style.Triggers>
<DataTrigger Binding="{Binding SelectedItem, ElementName=ComboBox_Pet}" Value="{x:Null}">
<Setter Property="IsEnabled" Value="False" />
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<DataGrid
d:ItemsSource="{d:SampleData ItemCount=5}"
pu:DataGridHelper.ColumnHeaderHorizontalContentAlignment="Center"
AutoGenerateColumns="False"
CanUserAddRows="False"
GridLinesVisibility="Horizontal"
ItemsSource="{Binding ShowMoves.Value}"
MouseDoubleClick="DataGrid_MouseDoubleClick"
RowDetailsVisibilityMode="Visible"
RowHeight="50"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.VirtualizationMode="Recycling">
<DataGrid.RowStyle>
<Style BasedOn="{StaticResource {x:Type DataGridRow}}" TargetType="DataGridRow">
<Setter Property="Height" Value="50" />
<Setter Property="Tag" Value="{Binding}" />
<Setter Property="ContextMenu" Value="{StaticResource ContextMenu_DataGridRow}" />
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTextColumn
Binding="{Binding Graph.Value}"
CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 绑定动画}"
IsReadOnly="True"
SortMemberPath="Graph.Value" />
<DataGridTextColumn
Binding="{Binding LocateType.EnumValue.Value}"
CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 定位类型}"
IsReadOnly="True"
SortMemberPath="LocateType.EnumValue.Value" />
<DataGridTextColumn
Binding="{Binding TriggerType.EnumValue.Value}"
CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 触发类型}"
IsReadOnly="True"
SortMemberPath="TriggerType.EnumValue.Value" />
<DataGridTextColumn
Binding="{Binding ModeType.EnumValue.Value}"
CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 状态类型}"
IsReadOnly="True"
SortMemberPath="ModeType.EnumValue.Value" />
<DataGridTextColumn
Binding="{Binding Distance.Value}"
CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 移动距离}"
IsReadOnly="True"
SortMemberPath="Distance.Value" />
<DataGridTextColumn
Binding="{Binding Interval.Value}"
CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 移动间隔}"
IsReadOnly="True"
SortMemberPath="Interval.Value" />
<DataGridTextColumn
Binding="{Binding LocateLength.Value}"
CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 定位长度}"
IsReadOnly="True"
SortMemberPath="LocateLength.Value" />
</DataGrid.Columns>
</DataGrid>
<Button
Grid.Row="1"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Command="{Binding AddCommand}"
Content=""
Style="{StaticResource AddButton}" />
</Grid>
</Grid>
</Page>