修复更好买优化内存导致的bug

This commit is contained in:
ZouJin 2023-06-09 09:23:11 +10:00
parent cf6e48ed6a
commit a6d171d1a0

View File

@ -42,8 +42,12 @@ namespace VPet_Simulator.Windows
public void Show(Food.FoodType type)
{
mw.Topmost = false;
LsbCategory.SelectedIndex = (int)type;
//OrderItemSource(type, LsbSortRule.SelectedIndex, LsbSortAsc.SelectedIndex);
if (_searchTextBox != null)
_searchTextBox.Text = "";
if (LsbCategory.SelectedIndex == (int)type)
OrderItemSource(type, LsbSortRule.SelectedIndex, LsbSortAsc.SelectedIndex == 0);
else
LsbCategory.SelectedIndex = (int)type;
Show();
}
public void OrderItemSource(Food.FoodType type, int sortrule, bool sortasc, string searchtext = null)