mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
启动时喜好度刷新 Fix #34
This commit is contained in:
parent
cce8bf7997
commit
a0d58ca7b6
@ -58,6 +58,22 @@ namespace VPet_Simulator.Windows
|
||||
LsbCategory.SelectedIndex = (int)type;
|
||||
if (rMoney != null)
|
||||
rMoney.Text = mw.Core.Save.Money.ToString("f2");
|
||||
|
||||
//喜好度刷新
|
||||
foreach (var sub in mw.Set.PetData)
|
||||
{
|
||||
if (sub.Name.StartsWith("buytime_"))
|
||||
{
|
||||
var name = sub.Name.Substring(8);
|
||||
var food = mw.Foods.FirstOrDefault(x => x.Name == name);
|
||||
if(food != null)
|
||||
{
|
||||
food.LoadEatTimeSource(mw);
|
||||
food.NotifyOfPropertyChange("Eattime");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Show();
|
||||
}
|
||||
public void OrderItemSource(Food.FoodType type, int sortrule, bool sortasc, string searchtext = null)
|
||||
|
Loading…
Reference in New Issue
Block a user