📱 🔍 优化搜索功能/优化动画

This commit is contained in:
liufei
2022-06-02 17:37:22 +08:00
parent 1a88194d26
commit 0aa7969e4a
14 changed files with 317 additions and 84 deletions

View File

@@ -16,6 +16,7 @@ using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media.Animation;
using System.Windows.Threading;
using static GeekDesk.Util.ShowWindowFollowMouse;
@@ -52,8 +53,11 @@ namespace GeekDesk
{
MarginHide.StartHide();
}
}
/// <summary>
/// 显示搜索框
@@ -117,6 +121,10 @@ namespace GeekDesk
{
SearchIconList.IconList.Clear();
}
if (RightCard.SearchListBox.Items.Count > 0)
{
RightCard.SearchListBox.SelectedIndex = 0;
}
RightCard.VerticalUFG.Visibility = Visibility.Visible;
}
@@ -677,16 +685,24 @@ namespace GeekDesk
{
HideApp();
}
//else if (
// appData.AppConfig.SearchType == SearchType.KEY_DOWN &&
// (
// (e.Key >= Key.D0 && e.Key <= Key.Z)
// || (e.Key >= Key.NumPad0 && e.Key < Key.NumPad9)
// )
// )
//{
// ShowSearchBox();
//}
if (RunTimeStatus.SEARCH_BOX_SHOW && (e.Key == Key.Up
|| e.Key == Key.Down
|| e.Key == Key.Tab
|| e.Key == Key.Enter
))
{
if (e.Key == Key.Down || e.Key == Key.Tab)
{
RightCard.SearchListBoxIndexAdd();
} else if (e.Key == Key.Up)
{
RightCard.SearchListBoxIndexSub();
} else if (e.Key == Key.Enter)
{
RightCard.StartupSelectionItem();
}
}
}