mirror of
https://github.com/LorisYounger/VPet.ModMaker.git
synced 2024-08-30 18:22:21 +00:00
新增:
- 在宠物列表页面添加 `不显示本体宠物` 按钮 (默认开启) 更新: - *自动设置食物推荐价格* 可在当前模组编辑时继承 - 历史编辑按最后编辑时间倒序排序
This commit is contained in:
parent
8a9a8d2ca3
commit
e53acb283a
@ -13,4 +13,5 @@
|
|||||||
<c:EqualsConverter x:Key="EqualsConverter" />
|
<c:EqualsConverter x:Key="EqualsConverter" />
|
||||||
<c:NotEqualsConverter x:Key="NotEqualsConverter" />
|
<c:NotEqualsConverter x:Key="NotEqualsConverter" />
|
||||||
<c:NullToFalseConverter x:Key="NullToFalseConverter" />
|
<c:NullToFalseConverter x:Key="NullToFalseConverter" />
|
||||||
|
<c:AllTrueToCollapsedConverter x:Key="AllTrueToCollapsedConverter" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
33
VPet.ModMaker/Converters/AllTrueToCollapsedConverter.cs
Normal file
33
VPet.ModMaker/Converters/AllTrueToCollapsedConverter.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace VPet.ModMaker.Converters;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 全部为真时设置隐藏转换器
|
||||||
|
/// </summary>
|
||||||
|
public class AllTrueToCollapsedConverter : IMultiValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
if (values.Length == 0)
|
||||||
|
throw new ArgumentException("No values", nameof(values));
|
||||||
|
return values.All(i => i is true) ? Visibility.Collapsed : Visibility.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object[] ConvertBack(
|
||||||
|
object value,
|
||||||
|
Type[] targetTypes,
|
||||||
|
object parameter,
|
||||||
|
CultureInfo culture
|
||||||
|
)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
28
VPet.ModMaker/Converters/AnyFalseToVisibleConverter.cs
Normal file
28
VPet.ModMaker/Converters/AnyFalseToVisibleConverter.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
using System.Globalization;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace VPet.ModMaker.Converters;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 任意为假时设置显示转换器
|
||||||
|
/// </summary>
|
||||||
|
public class AnyFalseToVisibleConverter : IMultiValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
if (values.Length == 0)
|
||||||
|
throw new ArgumentException("No values", nameof(values));
|
||||||
|
return values.Any(i => i is not true) ? Visibility.Visible : Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object[] ConvertBack(
|
||||||
|
object value,
|
||||||
|
Type[] targetTypes,
|
||||||
|
object parameter,
|
||||||
|
CultureInfo culture
|
||||||
|
)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
@ -2,12 +2,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Collections.Specialized;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace VPet.ModMaker.Models;
|
namespace VPet.ModMaker.Models;
|
||||||
|
|
||||||
|
// TODO: 更新事件
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// I18n助手
|
/// I18n助手
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -33,10 +35,7 @@ public class I18nHelper
|
|||||||
CultureNames.CollectionChanged += Cultures_CollectionChanged;
|
CultureNames.CollectionChanged += Cultures_CollectionChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Cultures_CollectionChanged(
|
private void Cultures_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||||
object sender,
|
|
||||||
System.Collections.Specialized.NotifyCollectionChangedEventArgs e
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// 替换
|
// 替换
|
||||||
if (e.NewStartingIndex == e.OldStartingIndex)
|
if (e.NewStartingIndex == e.OldStartingIndex)
|
||||||
|
89
VPet.ModMaker/Models/I18nModelBase.cs
Normal file
89
VPet.ModMaker/Models/I18nModelBase.cs
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
using HKW.HKWUtils.Observable;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace VPet.ModMaker.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// I18n模型
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T">类型</typeparam>
|
||||||
|
public class I18nModelBase<T> : ObservableClass<I18nModelBase<T>>
|
||||||
|
where T : class, new()
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 当前I18n数据
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
private T _CurrentI18nData = new();
|
||||||
|
public T CurrentI18nData
|
||||||
|
{
|
||||||
|
get => _CurrentI18nData;
|
||||||
|
set => SetProperty(ref _CurrentI18nData, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所有I18n数据
|
||||||
|
/// </summary>
|
||||||
|
public Dictionary<string, T> I18nDatas { get; } = new();
|
||||||
|
|
||||||
|
public I18nModelBase()
|
||||||
|
{
|
||||||
|
I18nHelper.Current.CultureName.ValueChanged += CultureChanged;
|
||||||
|
I18nHelper.Current.AddCulture += AddCulture;
|
||||||
|
I18nHelper.Current.RemoveCulture += RemoveCulture;
|
||||||
|
I18nHelper.Current.ReplaceCulture += ReplaceCulture;
|
||||||
|
if (I18nHelper.Current.CultureNames.Count == 0)
|
||||||
|
return;
|
||||||
|
foreach (var item in I18nHelper.Current.CultureNames)
|
||||||
|
I18nDatas.Add(item, new());
|
||||||
|
CurrentI18nData = I18nDatas[I18nHelper.Current.CultureName.Value];
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文化改变
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oldValue"></param>
|
||||||
|
/// <param name="newValue"></param>
|
||||||
|
private void CultureChanged(ObservableValue<string> sender, ValueChangedEventArgs<string> e)
|
||||||
|
{
|
||||||
|
if (e.NewValue is null)
|
||||||
|
CurrentI18nData = null;
|
||||||
|
else if (I18nDatas.TryGetValue(e.NewValue, out var result))
|
||||||
|
CurrentI18nData = result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加文化
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="culture">文化名称</param>
|
||||||
|
private void AddCulture(string culture)
|
||||||
|
{
|
||||||
|
if (I18nDatas.ContainsKey(culture) is false)
|
||||||
|
I18nDatas.Add(culture, new());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除文化
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="culture">文化名称</param>
|
||||||
|
private void RemoveCulture(string culture)
|
||||||
|
{
|
||||||
|
I18nDatas.Remove(culture);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 替换文化
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oldCulture">旧文化名称</param>
|
||||||
|
/// <param name="newCulture">新文化名称</param>
|
||||||
|
private void ReplaceCulture(string oldCulture, string newCulture)
|
||||||
|
{
|
||||||
|
var item = I18nDatas[oldCulture];
|
||||||
|
I18nDatas.Remove(oldCulture);
|
||||||
|
I18nDatas.Add(newCulture, item);
|
||||||
|
}
|
||||||
|
}
|
@ -21,12 +21,22 @@ using VPet_Simulator.Windows.Interface;
|
|||||||
|
|
||||||
namespace VPet.ModMaker.Models;
|
namespace VPet.ModMaker.Models;
|
||||||
|
|
||||||
// TODO: 本体模组显示开关
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 模组信息模型
|
/// 模组信息模型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ModInfoModel : I18nModel<I18nModInfoModel>
|
public class ModInfoModel : I18nModel<I18nModInfoModel>
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 自动设置食物推荐价格
|
||||||
|
/// </summary>
|
||||||
|
public ObservableValue<bool> AutoSetFoodPrice { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不显示本体宠物
|
||||||
|
/// </summary>
|
||||||
|
public ObservableValue<bool> DontShowMainPet { get; } = new(true);
|
||||||
|
|
||||||
|
#region ModInfo
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 作者Id
|
/// 作者Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -77,6 +87,9 @@ public class ModInfoModel : I18nModel<I18nModInfoModel>
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ObservableValue<string> SourcePath { get; } = new();
|
public ObservableValue<string> SourcePath { get; } = new();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ModDatas
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 食物
|
/// 食物
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -102,6 +115,11 @@ public class ModInfoModel : I18nModel<I18nModInfoModel>
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ObservableCollection<PetModel> Pets { get; } = new();
|
public ObservableCollection<PetModel> Pets { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 宠物实际数量
|
||||||
|
/// </summary>
|
||||||
|
public ObservableValue<int> PetDisplayedCount { get; } = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 其它I18n数据
|
/// 其它I18n数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -111,7 +129,7 @@ public class ModInfoModel : I18nModel<I18nModInfoModel>
|
|||||||
/// 需要保存的I18n数据
|
/// 需要保存的I18n数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Dictionary<string, Dictionary<string, string>> SaveI18nDatas { get; } = new();
|
public static Dictionary<string, Dictionary<string, string>> SaveI18nDatas { get; } = new();
|
||||||
|
#endregion
|
||||||
public ModInfoModel()
|
public ModInfoModel()
|
||||||
{
|
{
|
||||||
DescriptionId.Value = $"{Id.Value}_{nameof(DescriptionId)}";
|
DescriptionId.Value = $"{Id.Value}_{nameof(DescriptionId)}";
|
||||||
@ -119,6 +137,24 @@ public class ModInfoModel : I18nModel<I18nModInfoModel>
|
|||||||
{
|
{
|
||||||
DescriptionId.Value = $"{n}_{nameof(DescriptionId)}";
|
DescriptionId.Value = $"{n}_{nameof(DescriptionId)}";
|
||||||
};
|
};
|
||||||
|
Pets.CollectionChanged += Pets_CollectionChanged;
|
||||||
|
DontShowMainPet.ValueChanged += ShowMainPet_ValueChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowMainPet_ValueChanged(
|
||||||
|
ObservableValue<bool> sender,
|
||||||
|
ValueChangedEventArgs<bool> e
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Pets_CollectionChanged(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Pets_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (DontShowMainPet.Value)
|
||||||
|
PetDisplayedCount.Value = Pets.Count - Pets.Count(m => m.FromMain.Value);
|
||||||
|
else
|
||||||
|
PetDisplayedCount.Value = Pets.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ModInfoModel(ModLoader loader)
|
public ModInfoModel(ModLoader loader)
|
||||||
@ -178,6 +214,9 @@ public class ModInfoModel : I18nModel<I18nModInfoModel>
|
|||||||
LoadAnime(petModel, p);
|
LoadAnime(petModel, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loader.Pets.First().Name = "TestMainPet";
|
||||||
|
Pets.Insert(0, new(loader.Pets.First(), true));
|
||||||
|
|
||||||
// 插入本体宠物
|
// 插入本体宠物
|
||||||
foreach (var pet in ModMakerInfo.MainPets)
|
foreach (var pet in ModMakerInfo.MainPets)
|
||||||
{
|
{
|
||||||
|
@ -33,13 +33,13 @@
|
|||||||
<pu:NumberInput
|
<pu:NumberInput
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
ToolTip="{Binding Value, RelativeSource={RelativeSource Mode=Self}}"
|
ToolTip="{Binding Value, RelativeSource={RelativeSource Mode=Self}}"
|
||||||
Value="{Binding DataContext.Min.Value, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}" />
|
Value="{Binding DataContext.Min, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" />
|
||||||
<Label Grid.Row="1" Content="{ll:Str 最大值}" />
|
<Label Grid.Row="1" Content="{ll:Str 最大值}" />
|
||||||
<pu:NumberInput
|
<pu:NumberInput
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
ToolTip="{Binding Value, RelativeSource={RelativeSource Mode=Self}}"
|
ToolTip="{Binding Value, RelativeSource={RelativeSource Mode=Self}}"
|
||||||
Value="{Binding DataContext.Max.Value, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}" />
|
Value="{Binding DataContext.Max, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
@ -5,5 +5,6 @@ global using global::System.Linq;
|
|||||||
global using global::System.Net.Http;
|
global using global::System.Net.Http;
|
||||||
global using global::System.Threading;
|
global using global::System.Threading;
|
||||||
global using global::System.Threading.Tasks;
|
global using global::System.Threading.Tasks;
|
||||||
|
global using global::System.Collections.ObjectModel;
|
||||||
global using global::HKW.HKWUtils;
|
global using global::HKW.HKWUtils;
|
||||||
global using global::HKW.HKWUtils.Observable;
|
global using global::HKW.HKWUtils.Observable;
|
||||||
|
@ -98,6 +98,9 @@
|
|||||||
<Compile Include="App.xaml.cs">
|
<Compile Include="App.xaml.cs">
|
||||||
<DependentUpon>App.xaml</DependentUpon>
|
<DependentUpon>App.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Converters\AllTrueToCollapsedConverter.cs" />
|
||||||
|
<Compile Include="Converters\AnyFalseToVisibleConverter.cs" />
|
||||||
|
<Compile Include="Models\I18nModelBase.cs" />
|
||||||
<Compile Include="Usings.cs" />
|
<Compile Include="Usings.cs" />
|
||||||
<Compile Include="Converters\BrushToMediaColorConverter.cs" />
|
<Compile Include="Converters\BrushToMediaColorConverter.cs" />
|
||||||
<Compile Include="Converters\CalculatorConverter.cs" />
|
<Compile Include="Converters\CalculatorConverter.cs" />
|
||||||
|
@ -18,6 +18,8 @@ namespace VPet.ModMaker.ViewModels.ModEdit.AnimeEdit;
|
|||||||
|
|
||||||
public class AnimePageVM
|
public class AnimePageVM
|
||||||
{
|
{
|
||||||
|
public static ModInfoModel ModInfo => ModInfoModel.Current;
|
||||||
|
|
||||||
#region Value
|
#region Value
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示的动画
|
/// 显示的动画
|
||||||
|
@ -17,17 +17,16 @@ namespace VPet.ModMaker.ViewModels.ModEdit.FoodEdit;
|
|||||||
|
|
||||||
public class FoodEditWindowVM
|
public class FoodEditWindowVM
|
||||||
{
|
{
|
||||||
public I18nHelper I18nData => I18nHelper.Current;
|
public static ModInfoModel ModInfo => ModInfoModel.Current;
|
||||||
|
public static I18nHelper I18nData => I18nHelper.Current;
|
||||||
#region Value
|
#region Value
|
||||||
public FoodModel OldFood { get; set; }
|
public FoodModel OldFood { get; set; }
|
||||||
public ObservableValue<FoodModel> Food { get; } = new(new());
|
public ObservableValue<FoodModel> Food { get; } = new(new());
|
||||||
public ObservableValue<bool> AutoSetReferencePrice { get; } = new(false);
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Command
|
#region Command
|
||||||
public ObservableCommand AddImageCommand { get; } = new();
|
public ObservableCommand AddImageCommand { get; } = new();
|
||||||
public ObservableCommand ChangeImageCommand { get; } = new();
|
public ObservableCommand ChangeImageCommand { get; } = new();
|
||||||
|
|
||||||
public ObservableCommand<double> SetReferencePriceCommand { get; } = new();
|
public ObservableCommand<double> SetReferencePriceCommand { get; } = new();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -35,28 +34,16 @@ public class FoodEditWindowVM
|
|||||||
{
|
{
|
||||||
AddImageCommand.ExecuteCommand += AddImage;
|
AddImageCommand.ExecuteCommand += AddImage;
|
||||||
ChangeImageCommand.ExecuteCommand += ChangeImage;
|
ChangeImageCommand.ExecuteCommand += ChangeImage;
|
||||||
AutoSetReferencePrice.ValueChanged += AutoSetReferencePrice_ValueChanged;
|
|
||||||
SetReferencePriceCommand.ExecuteCommand += SetReferencePriceToPrice;
|
SetReferencePriceCommand.ExecuteCommand += SetReferencePriceToPrice;
|
||||||
Food.Value.ReferencePrice.ValueChanged += ReferencePrice_ValueChanged;
|
Food.Value.ReferencePrice.ValueChanged += ReferencePrice_ValueChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AutoSetReferencePrice_ValueChanged(
|
|
||||||
ObservableValue<bool> sender,
|
|
||||||
ValueChangedEventArgs<bool> e
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (e.NewValue)
|
|
||||||
{
|
|
||||||
SetReferencePriceToPrice(Food.Value.ReferencePrice.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ReferencePrice_ValueChanged(
|
private void ReferencePrice_ValueChanged(
|
||||||
ObservableValue<double> sender,
|
ObservableValue<double> sender,
|
||||||
ValueChangedEventArgs<double> e
|
ValueChangedEventArgs<double> e
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (AutoSetReferencePrice.Value)
|
if (ModInfo.AutoSetFoodPrice.Value)
|
||||||
{
|
{
|
||||||
SetReferencePriceToPrice(e.NewValue);
|
SetReferencePriceToPrice(e.NewValue);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ namespace VPet.ModMaker.ViewModels.ModEdit.MoveEdit;
|
|||||||
|
|
||||||
public class MovePageVM
|
public class MovePageVM
|
||||||
{
|
{
|
||||||
|
public static ModInfoModel ModInfo => ModInfoModel.Current;
|
||||||
#region Value
|
#region Value
|
||||||
public ObservableValue<ObservableCollection<MoveModel>> ShowMoves { get; } = new();
|
public ObservableValue<ObservableCollection<MoveModel>> ShowMoves { get; } = new();
|
||||||
public ObservableCollection<MoveModel> Moves => CurrentPet.Value.Moves;
|
public ObservableCollection<MoveModel> Moves => CurrentPet.Value.Moves;
|
||||||
|
@ -17,6 +17,7 @@ namespace VPet.ModMaker.ViewModels.ModEdit.PetEdit;
|
|||||||
|
|
||||||
public class PetPageVM
|
public class PetPageVM
|
||||||
{
|
{
|
||||||
|
public static ModInfoModel ModInfo => ModInfoModel.Current;
|
||||||
#region Value
|
#region Value
|
||||||
public ObservableValue<ObservableCollection<PetModel>> ShowPets { get; } = new();
|
public ObservableValue<ObservableCollection<PetModel>> ShowPets { get; } = new();
|
||||||
public ObservableCollection<PetModel> Pets => ModInfoModel.Current.Pets;
|
public ObservableCollection<PetModel> Pets => ModInfoModel.Current.Pets;
|
||||||
|
@ -14,7 +14,8 @@ namespace VPet.ModMaker.ViewModels.ModEdit.WorkEdit;
|
|||||||
|
|
||||||
public class WorkEditWindowVM
|
public class WorkEditWindowVM
|
||||||
{
|
{
|
||||||
public I18nHelper I18nData => I18nHelper.Current;
|
public static ModInfoModel ModInfo => ModInfoModel.Current;
|
||||||
|
public static I18nHelper I18nData => I18nHelper.Current;
|
||||||
#region Value
|
#region Value
|
||||||
public PetModel CurrentPet { get; set; }
|
public PetModel CurrentPet { get; set; }
|
||||||
public WorkModel OldWork { get; set; }
|
public WorkModel OldWork { get; set; }
|
||||||
|
@ -15,6 +15,7 @@ namespace VPet.ModMaker.ViewModels.ModEdit.WorkEdit;
|
|||||||
|
|
||||||
public class WorkPageVM
|
public class WorkPageVM
|
||||||
{
|
{
|
||||||
|
public static ModInfoModel ModInfo => ModInfoModel.Current;
|
||||||
#region Value
|
#region Value
|
||||||
public ObservableValue<ObservableCollection<WorkModel>> ShowWorks { get; } = new();
|
public ObservableValue<ObservableCollection<WorkModel>> ShowWorks { get; } = new();
|
||||||
public ObservableCollection<WorkModel> Works => CurrentPet.Value.Works;
|
public ObservableCollection<WorkModel> Works => CurrentPet.Value.Works;
|
||||||
|
@ -40,7 +40,7 @@ public class ModMakerWindowVM
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 历史
|
/// 历史
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ObservableCollection<ModMakeHistory> Histories { get; } = new();
|
public ObservableCollection<ModMakeHistory> Histories { get; set; } = new();
|
||||||
#endregion
|
#endregion
|
||||||
#region Command
|
#region Command
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -108,6 +108,7 @@ public class ModMakerWindowVM
|
|||||||
if (Histories.All(h => h.InfoFile != history.InfoFile))
|
if (Histories.All(h => h.InfoFile != history.InfoFile))
|
||||||
Histories.Add(history);
|
Histories.Add(history);
|
||||||
}
|
}
|
||||||
|
Histories = new(Histories.OrderByDescending(h => h.LastTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -45,6 +45,14 @@
|
|||||||
<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}" />
|
||||||
|
<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>
|
</Style>
|
||||||
</ComboBox.ItemContainerStyle>
|
</ComboBox.ItemContainerStyle>
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
|
@ -81,68 +81,116 @@
|
|||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="WorkingState.Value" />
|
SortMemberPath="WorkingState.Value" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding DayTime.EnumValue.Value}"
|
Binding="{Binding DayTime.EnumValue}"
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 时间}"
|
Header="{ll:Str 时间}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="DayTime.EnumValue.Value" />
|
SortMemberPath="DayTime.EnumValue" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Like.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 好感度范围}"
|
Header="{ll:Str 好感度范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Like.Info.Value" />
|
SortMemberPath="Like.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Like.Min" />
|
||||||
|
<Binding Path="Like.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Health.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 健康度范围}"
|
Header="{ll:Str 健康度范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Health.Info.Value" />
|
SortMemberPath="Health.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Health.Min" />
|
||||||
|
<Binding Path="Health.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Level.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 等级范围}"
|
Header="{ll:Str 等级范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Level.Info.Value" />
|
SortMemberPath="Level.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Level.Min" />
|
||||||
|
<Binding Path="Level.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Money.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 金钱范围}"
|
Header="{ll:Str 金钱范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Money.Info.Value" />
|
SortMemberPath="Money.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Money.Min" />
|
||||||
|
<Binding Path="Money.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Food.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 食物范围}"
|
Header="{ll:Str 食物范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Food.Info.Value" />
|
SortMemberPath="Food.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Food.Min" />
|
||||||
|
<Binding Path="Food.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Drink.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 口渴范围}"
|
Header="{ll:Str 口渴范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Drink.Info.Value" />
|
SortMemberPath="Drink.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Drink.Min" />
|
||||||
|
<Binding Path="Drink.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Feel.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 心情范围}"
|
Header="{ll:Str 心情范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Feel.Info.Value" />
|
SortMemberPath="Feel.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Feel.Min" />
|
||||||
|
<Binding Path="Feel.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Strength.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 体力范围}"
|
Header="{ll:Str 体力范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Strength.Info.Value" />
|
SortMemberPath="Strength.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Strength.Min" />
|
||||||
|
<Binding Path="Strength.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<Button
|
<Button
|
||||||
|
@ -177,7 +177,7 @@
|
|||||||
BoxHeight="16"
|
BoxHeight="16"
|
||||||
BoxWidth="30"
|
BoxWidth="30"
|
||||||
Content="{ll:Str 自动设置}"
|
Content="{ll:Str 自动设置}"
|
||||||
IsChecked="{Binding AutoSetReferencePrice.Value}" />
|
IsChecked="{Binding ModInfo.AutoSetFoodPrice.Value}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
@ -176,7 +176,7 @@
|
|||||||
<TabItem.Header>
|
<TabItem.Header>
|
||||||
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}{0} ({1})">
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}{0} ({1})">
|
||||||
<Binding Path="Tag" RelativeSource="{RelativeSource Mode=Self}" />
|
<Binding Path="Tag" RelativeSource="{RelativeSource Mode=Self}" />
|
||||||
<Binding Path="ModInfo.Value.Pets.Count" />
|
<Binding Path="ModInfo.Value.PetDisplayedCount.Value" />
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</TabItem.Header>
|
</TabItem.Header>
|
||||||
<Frame Content="{Binding ModEditWindow.PetPage}" />
|
<Frame Content="{Binding ModEditWindow.PetPage}" />
|
||||||
|
@ -45,6 +45,14 @@
|
|||||||
<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}" />
|
||||||
|
<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>
|
</Style>
|
||||||
</ComboBox.ItemContainerStyle>
|
</ComboBox.ItemContainerStyle>
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
|
@ -18,10 +18,20 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<TextBox
|
<TextBox
|
||||||
pu:TextBoxHelper.Watermark="{ll:Str 搜索Id}"
|
pu:TextBoxHelper.Watermark="{ll:Str 搜索Id}"
|
||||||
Style="{DynamicResource StandardTextBoxStyle}"
|
Style="{DynamicResource StandardTextBoxStyle}"
|
||||||
Text="{Binding Search.Value, UpdateSourceTrigger=PropertyChanged}" />
|
Text="{Binding Search.Value, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
<pu:Switch
|
||||||
|
Grid.Column="1"
|
||||||
|
Content="{ll:Str 不显示本体宠物}"
|
||||||
|
IsChecked="{Binding ModInfo.DontShowMainPet.Value}" />
|
||||||
|
</Grid>
|
||||||
<DataGrid
|
<DataGrid
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||||
@ -40,6 +50,14 @@
|
|||||||
<Setter Property="Height" Value="64" />
|
<Setter Property="Height" Value="64" />
|
||||||
<Setter Property="Tag" Value="{Binding}" />
|
<Setter Property="Tag" Value="{Binding}" />
|
||||||
<Setter Property="ContextMenu" Value="{StaticResource ContextMenu_DataGridRow}" />
|
<Setter Property="ContextMenu" Value="{StaticResource ContextMenu_DataGridRow}" />
|
||||||
|
<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>
|
</Style>
|
||||||
</DataGrid.RowStyle>
|
</DataGrid.RowStyle>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
|
@ -91,61 +91,109 @@
|
|||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Mode.EnumValue" />
|
SortMemberPath="Mode.EnumValue" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Like.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 好感度范围}"
|
Header="{ll:Str 好感度范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Like.Info.Value" />
|
SortMemberPath="Like.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Like.Min" />
|
||||||
|
<Binding Path="Like.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Health.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 健康度范围}"
|
Header="{ll:Str 健康度范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Health.Info.Value" />
|
SortMemberPath="Health.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Health.Min" />
|
||||||
|
<Binding Path="Like.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Level.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 等级范围}"
|
Header="{ll:Str 等级范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Level.Info.Value" />
|
SortMemberPath="Level.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Level.Min" />
|
||||||
|
<Binding Path="Like.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Money.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 金钱范围}"
|
Header="{ll:Str 金钱范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Money.Info.Value" />
|
SortMemberPath="Money.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Money.Min" />
|
||||||
|
<Binding Path="Like.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Food.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 食物范围}"
|
Header="{ll:Str 食物范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Food.Info.Value" />
|
SortMemberPath="Food.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Food.Min" />
|
||||||
|
<Binding Path="Like.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Drink.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 口渴范围}"
|
Header="{ll:Str 口渴范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Drink.Info.Value" />
|
SortMemberPath="Drink.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Drink.Min" />
|
||||||
|
<Binding Path="Like.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Feel.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 心情范围}"
|
Header="{ll:Str 心情范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Feel.Info.Value" />
|
SortMemberPath="Feel.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Feel.Min" />
|
||||||
|
<Binding Path="Like.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Binding="{Binding Strength.Info.Value}"
|
|
||||||
CanUserSort="True"
|
CanUserSort="True"
|
||||||
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
ElementStyle="{DynamicResource TextBlock_LeftCenter}"
|
||||||
Header="{ll:Str 体力范围}"
|
Header="{ll:Str 体力范围}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
SortMemberPath="Strength.Info.Value" />
|
SortMemberPath="Strength.Min">
|
||||||
|
<DataGridTextColumn.Binding>
|
||||||
|
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="({0} ~ {1})">
|
||||||
|
<Binding Path="Strength.Min" />
|
||||||
|
<Binding Path="Like.Max" />
|
||||||
|
</MultiBinding>
|
||||||
|
</DataGridTextColumn.Binding>
|
||||||
|
</DataGridTextColumn>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<Button
|
<Button
|
||||||
|
@ -49,6 +49,14 @@
|
|||||||
<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}" />
|
||||||
|
<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>
|
</Style>
|
||||||
</ComboBox.ItemContainerStyle>
|
</ComboBox.ItemContainerStyle>
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
|
Loading…
Reference in New Issue
Block a user