🥕 优化everything 搜索结果

This commit is contained in:
BookerLiu
2023-04-17 14:12:31 +08:00
parent 6072832654
commit 48fffa6da7
4 changed files with 35 additions and 19 deletions

View File

@@ -254,8 +254,7 @@ namespace GeekDesk.Control.Other
{
EveryThingRuning = true;
MainWindow.mainWindow.RightCard.Loading_RightCard.Visibility = Visibility.Visible;
string[] split = MainWindow.mainWindow.SearchResText.Text.Split(' ');
long count = Convert.ToInt64(split[0]);
int everyThingCount = Convert.ToInt32(MainWindow.mainWindow.EverythingSearchCount.Text);
ObservableCollection<IconInfo> resList = this.DataContext as ObservableCollection<IconInfo>;
@@ -264,8 +263,8 @@ namespace GeekDesk.Control.Other
ObservableCollection<IconInfo> searchRes = EveryThingUtil.NextPage();
this.Dispatcher.Invoke(() =>
{
count += searchRes.Count;
MainWindow.mainWindow.SearchResText.Text = count + " of " + split[split.Length - 1];
everyThingCount += searchRes.Count;
MainWindow.mainWindow.EverythingSearchCount.Text = Convert.ToString(everyThingCount);
foreach (IconInfo info in searchRes)
{
resList.Add(info);