This commit is contained in:
Hakoyu 2023-10-31 23:48:33 +08:00
parent 46f4709fb7
commit 18fbc60f87
12 changed files with 354 additions and 441 deletions

View File

@ -13,7 +13,10 @@ namespace HKW.HKWViewModels.SimpleObservable;
/// </summary> /// </summary>
/// <typeparam name="T"></typeparam> /// <typeparam name="T"></typeparam>
[DebuggerDisplay("{Value}")] [DebuggerDisplay("{Value}")]
public class ObservableValue<T> : INotifyPropertyChanging, INotifyPropertyChanged public class ObservableValue<T>
: INotifyPropertyChanging,
INotifyPropertyChanged,
IEquatable<ObservableValue<T>>
{ {
[DebuggerBrowsable(DebuggerBrowsableState.Never)] [DebuggerBrowsable(DebuggerBrowsableState.Never)]
private T _value = default!; private T _value = default!;
@ -81,14 +84,6 @@ public class ObservableValue<T> : INotifyPropertyChanging, INotifyPropertyChange
} }
#endregion #endregion
#region Overwrite
/// <inheritdoc/>
public override string ToString()
{
return Value?.ToString()!;
}
#endregion
#region NotifyReceiver #region NotifyReceiver
/// <summary> /// <summary>
/// 添加通知属性改变后接收器 /// 添加通知属性改变后接收器
@ -132,6 +127,57 @@ public class ObservableValue<T> : INotifyPropertyChanging, INotifyPropertyChange
NotifyReceived?.Invoke(ref temp); NotifyReceived?.Invoke(ref temp);
Value = temp; Value = temp;
} }
#endregion
#region Other
/// <inheritdoc/>
public override string ToString()
{
return Value?.ToString() ?? string.Empty;
}
/// <inheritdoc/>
public override bool Equals(object? obj)
{
return Equals(obj as ObservableValue<T>);
}
/// <inheritdoc/>
public override int GetHashCode()
{
return Value?.GetHashCode() ?? 0;
}
/// <inheritdoc/>
public bool Equals(ObservableValue<T>? other)
{
return Value?.Equals(other) is true;
}
/// <summary>
/// 判断 <see cref="Value"/> 相等
/// </summary>
/// <param name="value1">左值</param>
/// <param name="value2">右值</param>
/// <returns>相等为 <see langword="true"/> 否则为 <see langword="false"/></returns>
public static bool operator ==(ObservableValue<T> value1, ObservableValue<T> value2)
{
return value1.Value?.Equals(value2.Value) is true;
}
/// <summary>
/// 判断 <see cref="Value"/> 不相等
/// </summary>
/// <param name="value1">左值</param>
/// <param name="value2">右值</param>
/// <returns>不相等为 <see langword="true"/> 否则为 <see langword="false"/></returns>
public static bool operator !=(ObservableValue<T> value1, ObservableValue<T> value2)
{
return value1.Value?.Equals(value2.Value) is not true;
}
#endregion #endregion
#region Event #region Event

View File

@ -19,6 +19,20 @@
TargetType="TextBlock"> TargetType="TextBlock">
<Setter Property="TextWrapping" Value="Wrap" /> <Setter Property="TextWrapping" Value="Wrap" />
</Style> </Style>
<Style
x:Key="TextBlock_Center"
BasedOn="{StaticResource {x:Type TextBlock}}"
TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
<Style
x:Key="TextBlock_LeftCenter"
BasedOn="{StaticResource {x:Type TextBlock}}"
TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style <Style
x:Key="TextBox_Wrap" x:Key="TextBox_Wrap"
BasedOn="{StaticResource {x:Type TextBox}}" BasedOn="{StaticResource {x:Type TextBox}}"
@ -27,6 +41,20 @@
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Top" /> <Setter Property="VerticalContentAlignment" Value="Top" />
</Style> </Style>
<Style
x:Key="TextBox_Center"
BasedOn="{StaticResource {x:Type TextBox}}"
TargetType="TextBox">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
<Style
x:Key="TextBox_LeftCenter"
BasedOn="{StaticResource {x:Type TextBox}}"
TargetType="TextBox">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style x:Key="WindowXStyle" TargetType="pu:WindowX"> <Style x:Key="WindowXStyle" TargetType="pu:WindowX">
<Setter Property="pu:WindowXCaption.Background" Value="{DynamicResource DARKPrimary}" /> <Setter Property="pu:WindowXCaption.Background" Value="{DynamicResource DARKPrimary}" />
<Setter Property="pu:WindowXCaption.Foreground" Value="{DynamicResource DARKPrimaryText}" /> <Setter Property="pu:WindowXCaption.Foreground" Value="{DynamicResource DARKPrimaryText}" />

View File

@ -160,27 +160,19 @@ public class ModEditWindowVM
/// </summary> /// </summary>
private void Save() private void Save()
{ {
if (ValidationData(ModInfo.Value) is false)
return;
if ( if (
MessageBox.Show("确定保存吗".Translate(), "", MessageBoxButton.YesNo) MessageBox.Show("确定保存吗".Translate(), "", MessageBoxButton.YesNo)
is not MessageBoxResult.Yes is not MessageBoxResult.Yes
) )
return; return;
if (string.IsNullOrEmpty(ModInfo.Value.SourcePath.Value)) if (string.IsNullOrEmpty(ModInfo.Value.SourcePath.Value))
{ {
MessageBox.Show("源路径为空, 请使用 保存至".Translate()); MessageBox.Show("源路径为空, 请使用 保存至".Translate());
return; return;
} }
try SaveTo(ModInfo.Value.SourcePath.Value);
{
ModInfo.Value.SaveTo(ModInfo.Value.SourcePath.Value);
}
catch (Exception ex)
{
MessageBox.Show("保存失败 错误信息:\n{0}".Translate(ex));
return;
}
MessageBox.Show("保存成功".Translate());
} }
/// <summary> /// <summary>
@ -197,25 +189,32 @@ public class ModEditWindowVM
Filter = $"LPS文件|*.lps;".Translate(), Filter = $"LPS文件|*.lps;".Translate(),
FileName = "info.lps".Translate() FileName = "info.lps".Translate()
}; };
if (saveFileDialog.ShowDialog() is true) if (saveFileDialog.ShowDialog() is not true)
{ return;
var pending = PendingBox.Show("保存中".Translate()); SaveTo(Path.GetDirectoryName(saveFileDialog.FileName));
//try }
//{
var path = Path.GetDirectoryName(saveFileDialog.FileName); /// <summary>
ModInfo.Value.SaveTo(path); /// 保存至
if (string.IsNullOrWhiteSpace(ModInfo.Value.SourcePath.Value)) /// </summary>
ModInfo.Value.SourcePath.Value = path; /// <param name="path"></param>
pending.Close(); private void SaveTo(string path)
MessageBox.Show(ModEditWindow, "保存成功".Translate()); {
//} var pending = PendingBox.Show("保存中".Translate());
//catch (Exception ex) //try
//{ //{
// pending.Close(); ModInfo.Value.SaveTo(path);
// MessageBox.Show("保存失败 错误信息:\n{0}".Translate(ex)); if (string.IsNullOrWhiteSpace(ModInfo.Value.SourcePath.Value))
// return; ModInfo.Value.SourcePath.Value = path;
//} pending.Close();
} MessageBox.Show(ModEditWindow, "保存成功".Translate());
//}
//catch (Exception ex)
//{
// pending.Close();
// MessageBox.Show("保存失败 错误信息:\n{0}".Translate(ex));
// return;
//}
} }
/// <summary> /// <summary>

View File

@ -25,7 +25,7 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBox pu:TextBoxHelper.Watermark="{ll:Str 搜索Id}" Text="{Binding Search.Value, UpdateSourceTrigger=PropertyChanged}"> <TextBox pu:TextBoxHelper.Watermark="{ll:Str 搜索Id}" Text="{Binding Search.Value, UpdateSourceTrigger=PropertyChanged}">
<TextBox.Style> <TextBox.Style>
<Style BasedOn="{StaticResource {x:Type TextBox}}" TargetType="TextBox"> <Style BasedOn="{StaticResource StandardTextBoxStyle}" TargetType="TextBox">
<Setter Property="IsEnabled" Value="True" /> <Setter Property="IsEnabled" Value="True" />
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding SelectedItem, ElementName=ComboBox_Pet}" Value="{x:Null}"> <DataTrigger Binding="{Binding SelectedItem, ElementName=ComboBox_Pet}" Value="{x:Null}">
@ -41,7 +41,8 @@
pu:ComboBoxHelper.Watermark="{ll:Str 选择宠物}" pu:ComboBoxHelper.Watermark="{ll:Str 选择宠物}"
DisplayMemberPath="Id.Value" DisplayMemberPath="Id.Value"
ItemsSource="{Binding Pets}" ItemsSource="{Binding Pets}"
SelectedItem="{Binding CurrentPet.Value}"> SelectedItem="{Binding CurrentPet.Value}"
Style="{DynamicResource StandardComboBoxStyle}">
<ComboBox.ItemContainerStyle> <ComboBox.ItemContainerStyle>
<Style BasedOn="{StaticResource {x:Type ComboBoxItem}}" TargetType="ComboBoxItem"> <Style BasedOn="{StaticResource {x:Type ComboBoxItem}}" TargetType="ComboBoxItem">
<Setter Property="ToolTip" Value="{Binding CurrentI18nData.Value.Name.Value}" /> <Setter Property="ToolTip" Value="{Binding CurrentI18nData.Value.Name.Value}" />
@ -69,12 +70,12 @@
ItemsSource="{Binding ShowAnimes.Value}" ItemsSource="{Binding ShowAnimes.Value}"
MouseDoubleClick="DataGrid_MouseDoubleClick" MouseDoubleClick="DataGrid_MouseDoubleClick"
RowDetailsVisibilityMode="Visible" RowDetailsVisibilityMode="Visible"
RowHeight="64" RowHeight="50"
VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"> VirtualizingStackPanel.VirtualizationMode="Recycling">
<DataGrid.RowStyle> <DataGrid.RowStyle>
<Style BasedOn="{StaticResource {x:Type DataGridRow}}" TargetType="DataGridRow"> <Style BasedOn="{StaticResource {x:Type DataGridRow}}" TargetType="DataGridRow">
<Setter Property="Height" Value="64" /> <Setter Property="Height" Value="50" />
<Setter Property="Tag" Value="{Binding}" /> <Setter Property="Tag" Value="{Binding}" />
<Setter Property="ContextMenu" Value="{StaticResource ContextMenu_DataGridRow}" /> <Setter Property="ContextMenu" Value="{StaticResource ContextMenu_DataGridRow}" />
</Style> </Style>
@ -83,57 +84,38 @@
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Id.Value}" Binding="{Binding Id.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 动画类型}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Id.Value"> SortMemberPath="Id.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 动画类型}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding HappyAnimes.Count}" Binding="{Binding HappyAnimes.Count}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 开心状态动画数量}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Id.Value"> SortMemberPath="Id.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 开心状态动画数量}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding NomalAnimes.Count}" Binding="{Binding NomalAnimes.Count}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 普通状态动画数量}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Id.Value"> SortMemberPath="Id.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 普通状态动画数量}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding PoorConditionAnimes.Count}" Binding="{Binding PoorConditionAnimes.Count}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 不开心状态动画数量}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Id.Value"> SortMemberPath="Id.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 不开心状态动画数量}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding IllAnimes.Count}" Binding="{Binding IllAnimes.Count}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 生病状态动画数量}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Id.Value"> SortMemberPath="Id.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 生病状态动画数量}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<!--<DataGridTextColumn
Binding="{Binding LocateType.EnumValue.Value}"
CanUserSort="True"
IsReadOnly="True"
SortMemberPath="LocateType.EnumValue.Value">
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 动画支持的状态}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>-->
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<Button <Button

View File

@ -32,12 +32,12 @@
ItemsSource="{Binding ShowClickTexts.Value}" ItemsSource="{Binding ShowClickTexts.Value}"
MouseDoubleClick="DataGrid_MouseDoubleClick" MouseDoubleClick="DataGrid_MouseDoubleClick"
RowDetailsVisibilityMode="Visible" RowDetailsVisibilityMode="Visible"
RowHeight="64" RowHeight="50"
VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"> VirtualizingStackPanel.VirtualizationMode="Recycling">
<DataGrid.RowStyle> <DataGrid.RowStyle>
<Style BasedOn="{StaticResource {x:Type DataGridRow}}" TargetType="DataGridRow"> <Style BasedOn="{StaticResource {x:Type DataGridRow}}" TargetType="DataGridRow">
<Setter Property="Height" Value="64" /> <Setter Property="Height" Value="50" />
<Setter Property="Tag" Value="{Binding}" /> <Setter Property="Tag" Value="{Binding}" />
<Setter Property="ContextMenu" Value="{StaticResource ContextMenu_DataGridRow}" /> <Setter Property="ContextMenu" Value="{StaticResource ContextMenu_DataGridRow}" />
</Style> </Style>
@ -48,131 +48,101 @@
Binding="{Binding Id.Value}" Binding="{Binding Id.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{StaticResource TextBlock_Wrap}" ElementStyle="{StaticResource TextBlock_Wrap}"
Header="Id"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Id.Value"> SortMemberPath="Id.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="Id" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
MaxWidth="300" MaxWidth="300"
Binding="{Binding CurrentI18nData.Value.Text.Value}" Binding="{Binding CurrentI18nData.Value.Text.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{StaticResource TextBlock_Wrap}" ElementStyle="{StaticResource TextBlock_Wrap}"
Header="{ll:Str 文本}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="CurrentI18nData.Value.Text.Value"> SortMemberPath="CurrentI18nData.Value.Text.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 文本}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Mode.EnumValue.Value}" Binding="{Binding Mode.EnumValue.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 状态}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Mode.EnumValue.Value"> SortMemberPath="Mode.EnumValue.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 状态}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Working.Value}" Binding="{Binding Working.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 指定工作}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Working.Value"> SortMemberPath="Working.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 指定工作}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding WorkingState.Value}" Binding="{Binding WorkingState.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 工作状态}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="WorkingState.Value"> SortMemberPath="WorkingState.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 工作状态}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding DayTime.EnumValue.Value}" Binding="{Binding DayTime.EnumValue.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 时间}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="DayTime.EnumValue.Value"> SortMemberPath="DayTime.EnumValue.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 时间}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Like.Info.Value}" Binding="{Binding Like.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 好感度范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Like.Info.Value"> SortMemberPath="Like.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 好感度范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Health.Info.Value}" Binding="{Binding Health.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 健康度范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Health.Info.Value"> SortMemberPath="Health.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 健康度范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Level.Info.Value}" Binding="{Binding Level.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 等级范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Level.Info.Value"> SortMemberPath="Level.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 等级范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Money.Info.Value}" Binding="{Binding Money.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 金钱范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Money.Info.Value"> SortMemberPath="Money.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 金钱范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Food.Info.Value}" Binding="{Binding Food.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 食物范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Food.Info.Value"> SortMemberPath="Food.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 食物范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Drink.Info.Value}" Binding="{Binding Drink.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 口渴范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Drink.Info.Value"> SortMemberPath="Drink.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 口渴范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Feel.Info.Value}" Binding="{Binding Feel.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 心情范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Feel.Info.Value"> SortMemberPath="Feel.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 心情范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Strength.Info.Value}" Binding="{Binding Strength.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 体力范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Strength.Info.Value"> SortMemberPath="Strength.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 体力范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<Button <Button

View File

@ -46,16 +46,11 @@
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Id.Value}" Binding="{Binding Id.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="Id"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Id.Value"> SortMemberPath="Id.Value" />
<DataGridTextColumn.Header> <DataGridTemplateColumn Header="{ll:Str 食物图片}" IsReadOnly="True">
<TextBlock Text="Id" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTemplateColumn IsReadOnly="True">
<DataGridTemplateColumn.Header>
<TextBlock Text="{ll:Str 食物图片}" />
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<Image <Image
@ -81,111 +76,87 @@
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding CurrentI18nData.Value.Name.Value}" Binding="{Binding CurrentI18nData.Value.Name.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 食物名称}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="CurrentI18nData.Value.Name.Value"> SortMemberPath="CurrentI18nData.Value.Name.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 食物名称}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Type.Value}" Binding="{Binding Type.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 食物类型}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Type.Value"> SortMemberPath="Type.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 食物类型}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Graph.Value}" Binding="{Binding Graph.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 指定动画}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Type.Value"> SortMemberPath="Type.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 指定动画}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding StrengthFood.Value}" Binding="{Binding StrengthFood.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 饱腹值}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="StrengthFood.Value"> SortMemberPath="StrengthFood.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 饱腹值}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding StrengthDrink.Value}" Binding="{Binding StrengthDrink.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 口渴值}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="StrengthDrink.Value"> SortMemberPath="StrengthDrink.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 口渴值}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Health.Value}" Binding="{Binding Health.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 健康值}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Health.Value"> SortMemberPath="Health.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 健康值}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Strength.Value}" Binding="{Binding Strength.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 体力值}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Strength.Value"> SortMemberPath="Strength.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 体力值}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Feeling.Value}" Binding="{Binding Feeling.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 心情值}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Feeling.Value"> SortMemberPath="Feeling.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 心情值}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Likability.Value}" Binding="{Binding Likability.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 好感值}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Likability.Value"> SortMemberPath="Likability.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 好感值}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Exp.Value}" Binding="{Binding Exp.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 经验值}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Exp.Value"> SortMemberPath="Exp.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 经验值}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Price.Value}" Binding="{Binding Price.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 价格}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Price.Value"> SortMemberPath="Price.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 价格}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding CurrentI18nData.Value.Description.Value}" Binding="{Binding CurrentI18nData.Value.Description.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 描述}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="CurrentI18nData.Value.Description.Value"> SortMemberPath="CurrentI18nData.Value.Description.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 描述}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<Button <Button

View File

@ -49,50 +49,38 @@
Binding="{Binding Id.Value}" Binding="{Binding Id.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{StaticResource TextBlock_Wrap}" ElementStyle="{StaticResource TextBlock_Wrap}"
Header="Id"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Id.Value"> SortMemberPath="Id.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="Id" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
MaxWidth="300" MaxWidth="300"
Binding="{Binding CurrentI18nData.Value.Text.Value}" Binding="{Binding CurrentI18nData.Value.Text.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{StaticResource TextBlock_Wrap}" ElementStyle="{StaticResource TextBlock_Wrap}"
Header="{ll:Str 文本}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="CurrentI18nData.Value.Text.Value"> SortMemberPath="CurrentI18nData.Value.Text.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 文本}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Mode.Value}" Binding="{Binding Mode.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 状态}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Mode.Value"> SortMemberPath="Mode.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 状态}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Strength.Value}" Binding="{Binding Strength.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 饥渴需求}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Strength.Value"> SortMemberPath="Strength.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 饥渴需求}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Like.Value}" Binding="{Binding Like.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 好感需求}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Like.Value"> SortMemberPath="Like.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 好感需求}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<Button <Button

View File

@ -83,66 +83,52 @@
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Graph.Value}" Binding="{Binding Graph.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 绑定动画}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Graph.Value"> SortMemberPath="Graph.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 绑定动画}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding LocateType.EnumValue.Value}" Binding="{Binding LocateType.EnumValue.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 定位类型}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="LocateType.EnumValue.Value"> SortMemberPath="LocateType.EnumValue.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 定位类型}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding TriggerType.EnumValue.Value}" Binding="{Binding TriggerType.EnumValue.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 触发类型}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="TriggerType.EnumValue.Value"> SortMemberPath="TriggerType.EnumValue.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 触发类型}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding ModeType.EnumValue.Value}" Binding="{Binding ModeType.EnumValue.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 状态类型}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="ModeType.EnumValue.Value"> SortMemberPath="ModeType.EnumValue.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 状态类型}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Distance.Value}" Binding="{Binding Distance.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 移动距离}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Distance.Value"> SortMemberPath="Distance.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 移动距离}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Interval.Value}" Binding="{Binding Interval.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 移动间隔}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Interval.Value"> SortMemberPath="Interval.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 移动间隔}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding LocateLength.Value}" Binding="{Binding LocateLength.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 定位长度}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="LocateLength.Value"> SortMemberPath="LocateLength.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 定位长度}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<Button <Button

View File

@ -57,6 +57,16 @@ public partial class PetEditWindow : Window
MessageBox.Show("名称不可为空".Translate(), "", MessageBoxButton.OK, MessageBoxImage.Warning); MessageBox.Show("名称不可为空".Translate(), "", MessageBoxButton.OK, MessageBoxImage.Warning);
return; return;
} }
if (string.IsNullOrWhiteSpace(ViewModel.Pet.Value.CurrentI18nData.Value.PetName.Value))
{
MessageBox.Show(
"宠物名称不可为空".Translate(),
"",
MessageBoxButton.OK,
MessageBoxImage.Warning
);
return;
}
if ( if (
ViewModel.OldPet?.Id.Value != ViewModel.Pet.Value.Id.Value ViewModel.OldPet?.Id.Value != ViewModel.Pet.Value.Id.Value
&& ModInfoModel.Current.Pets.Any(i => i.Id == ViewModel.Pet.Value.Id) && ModInfoModel.Current.Pets.Any(i => i.Id == ViewModel.Pet.Value.Id)

View File

@ -43,39 +43,31 @@
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Id.Value}" Binding="{Binding Id.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="Id"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Id.Value"> SortMemberPath="Id.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="Id" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding CurrentI18nData.Value.Name.Value}" Binding="{Binding CurrentI18nData.Value.Name.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 名称}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="CurrentI18nData.Value.Name.Value"> SortMemberPath="CurrentI18nData.Value.Name.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 名称}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding CurrentI18nData.Value.PetName.Value}" Binding="{Binding CurrentI18nData.Value.PetName.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 宠物名称}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="CurrentI18nData.Value.Name.Value"> SortMemberPath="CurrentI18nData.Value.Name.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 宠物名称}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding CurrentI18nData.Value.Description.Value}" Binding="{Binding CurrentI18nData.Value.Description.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 描述}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="CurrentI18nData.Value.Description.Value"> SortMemberPath="CurrentI18nData.Value.Description.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 描述}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<Button <Button

View File

@ -48,137 +48,104 @@
Binding="{Binding Id.Value}" Binding="{Binding Id.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{StaticResource TextBlock_Wrap}" ElementStyle="{StaticResource TextBlock_Wrap}"
Header="Id"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Id.Value"> SortMemberPath="Id.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="Id" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn
MaxWidth="200"
Binding="{Binding CurrentI18nData.Value.Choose.Value}"
CanUserSort="True"
ElementStyle="{StaticResource TextBlock_Wrap}"
IsReadOnly="True"
SortMemberPath="CurrentI18nData.Value.Choose.Value">
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 选择名}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
MaxWidth="300" MaxWidth="300"
Binding="{Binding CurrentI18nData.Value.Text.Value}" Binding="{Binding CurrentI18nData.Value.Text.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{StaticResource TextBlock_Wrap}" ElementStyle="{StaticResource TextBlock_Wrap}"
Header="{ll:Str 文本}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="CurrentI18nData.Value.Text.Value"> SortMemberPath="CurrentI18nData.Value.Text.Value" />
<DataGridTextColumn.Header> <DataGridTextColumn
<TextBlock Text="{ll:Str 文本}" /> MaxWidth="200"
</DataGridTextColumn.Header> Binding="{Binding CurrentI18nData.Value.Choose.Value}"
</DataGridTextColumn> CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 选择名}"
IsReadOnly="True"
SortMemberPath="CurrentI18nData.Value.Choose.Value" />
<DataGridTextColumn <DataGridTextColumn
MaxWidth="200" MaxWidth="200"
Binding="{Binding Tags.Value}" Binding="{Binding Tags.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{StaticResource TextBlock_Wrap}" ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 标签}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Tags.Value"> SortMemberPath="Tags.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 标签}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
MaxWidth="200" MaxWidth="200"
Binding="{Binding ToTags.Value}" Binding="{Binding ToTags.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{StaticResource TextBlock_Wrap}" ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 跳转标签}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="ToTags.Value"> SortMemberPath="ToTags.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 跳转标签}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Mode.EnumValue}" Binding="{Binding Mode.EnumValue}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 状态}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Mode.EnumValue"> SortMemberPath="Mode.EnumValue" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 状态}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Like.Info.Value}" Binding="{Binding Like.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 好感度范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Like.Info.Value"> SortMemberPath="Like.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 好感度范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Health.Info.Value}" Binding="{Binding Health.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 健康度范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Health.Info.Value"> SortMemberPath="Health.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 健康度范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Level.Info.Value}" Binding="{Binding Level.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 等级范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Level.Info.Value"> SortMemberPath="Level.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 等级范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Money.Info.Value}" Binding="{Binding Money.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 金钱范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Money.Info.Value"> SortMemberPath="Money.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 金钱范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Food.Info.Value}" Binding="{Binding Food.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 食物范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Food.Info.Value"> SortMemberPath="Food.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 食物范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Drink.Info.Value}" Binding="{Binding Drink.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 口渴范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Drink.Info.Value"> SortMemberPath="Drink.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 口渴范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Feel.Info.Value}" Binding="{Binding Feel.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 心情范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Feel.Info.Value"> SortMemberPath="Feel.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 心情范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Strength.Info.Value}" Binding="{Binding Strength.Info.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 体力范围}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Strength.Info.Value"> SortMemberPath="Strength.Info.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 体力范围}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<Button <Button

View File

@ -88,120 +88,94 @@
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Id.Value}" Binding="{Binding Id.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="Id"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Id.Value"> SortMemberPath="Id.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="Id" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding CurrentI18nData.Value.Name.Value}" Binding="{Binding CurrentI18nData.Value.Name.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 工作名称}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="CurrentI18nData.Value.Name.Value"> SortMemberPath="CurrentI18nData.Value.Name.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 工作名称}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding WorkType.Value}" Binding="{Binding WorkType.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 工作类型}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="WorkType.Value"> SortMemberPath="WorkType.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 工作类型}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Graph.Value}" Binding="{Binding Graph.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 动画名称}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Graph.Value"> SortMemberPath="Graph.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 动画名称}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding IsOverLoad.Value}" Binding="{Binding IsOverLoad.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 是否超模}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Graph.Value"> SortMemberPath="Graph.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 是否超模}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding MoneyBase.Value}" Binding="{Binding MoneyBase.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 基本倍率}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="MoneyBase.Value"> SortMemberPath="MoneyBase.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 基本倍率}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding MoneyLevel.Value}" Binding="{Binding MoneyLevel.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 等级倍率}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="MoneyLevel.Value"> SortMemberPath="MoneyLevel.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 等级倍率}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding StrengthFood.Value}" Binding="{Binding StrengthFood.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 饱食度消耗倍率}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="StrengthFood.Value"> SortMemberPath="StrengthFood.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 饱食度消耗倍率}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding StrengthDrink.Value}" Binding="{Binding StrengthDrink.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 口渴度消耗倍率}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="StrengthDrink.Value"> SortMemberPath="StrengthDrink.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 口渴度消耗倍率}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Feeling.Value}" Binding="{Binding Feeling.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 心情消耗倍率}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Feeling.Value"> SortMemberPath="Feeling.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 心情消耗倍率}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding LevelLimit.Value}" Binding="{Binding LevelLimit.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 等级限制}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="LevelLimit.Value"> SortMemberPath="LevelLimit.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 等级限制}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding Time.Value}" Binding="{Binding Time.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 花费时间}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="Time.Value"> SortMemberPath="Time.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 花费时间}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn <DataGridTextColumn
Binding="{Binding FinishBonus.Value}" Binding="{Binding FinishBonus.Value}"
CanUserSort="True" CanUserSort="True"
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
Header="{ll:Str 奖励倍率}"
IsReadOnly="True" IsReadOnly="True"
SortMemberPath="FinishBonus.Value"> SortMemberPath="FinishBonus.Value" />
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 奖励倍率}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<Button <Button