From 1a15a062ef38c6ac242ed59b29476f235a3ade6f Mon Sep 17 00:00:00 2001 From: Divyansh Date: Fri, 3 Apr 2020 14:45:02 -0700 Subject: [PATCH] Working up/down arrow key --- .../PowerLauncher.UI/LauncherControl.xaml | 9 ++--- .../PowerLauncher.UI/LauncherControl.xaml.cs | 17 +------- .../launcher/PowerLauncher/MainWindow.xaml.cs | 40 +++++++++---------- 3 files changed, 26 insertions(+), 40 deletions(-) diff --git a/src/modules/launcher/PowerLauncher.UI/LauncherControl.xaml b/src/modules/launcher/PowerLauncher.UI/LauncherControl.xaml index aa1c83c3db..ee195d12f3 100644 --- a/src/modules/launcher/PowerLauncher.UI/LauncherControl.xaml +++ b/src/modules/launcher/PowerLauncher.UI/LauncherControl.xaml @@ -415,10 +415,9 @@ - - - + @@ -443,7 +442,7 @@ - + diff --git a/src/modules/launcher/PowerLauncher.UI/LauncherControl.xaml.cs b/src/modules/launcher/PowerLauncher.UI/LauncherControl.xaml.cs index 245ea2c5ff..b580483341 100644 --- a/src/modules/launcher/PowerLauncher.UI/LauncherControl.xaml.cs +++ b/src/modules/launcher/PowerLauncher.UI/LauncherControl.xaml.cs @@ -1,17 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; namespace PowerLauncher.UI { @@ -20,7 +7,7 @@ namespace PowerLauncher.UI public LauncherControl() { this.InitializeComponent(); - ShellBarShadow.Receivers.Add(ShadowReceiverGrid); + ShellBarShadow.Receivers.Add(ShadowReceiverGrid); } } -} +} \ No newline at end of file diff --git a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs index 17b41bb6ab..72f110c5d0 100644 --- a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs +++ b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs @@ -260,26 +260,26 @@ namespace PowerLauncher _launcher = (PowerLauncher.UI.LauncherControl)host.Child; _launcher.DataContext = _viewModel; _launcher.SearchBox.TextChanged += QueryTextBox_TextChanged; - _launcher.SearchBox.SuggestionChosen += SearchBox_SuggestionChosen; - _launcher.SearchBox.Focus(Windows.UI.Xaml.FocusState.Programmatic); + //_launcher.SearchBox.SuggestionChosen += SearchBox_SuggestionChosen; + //_launcher.SearchBox.Focus(Windows.UI.Xaml.FocusState.Programmatic); - _viewModel.PropertyChanged += (o, e) => - { - if (e.PropertyName == nameof(MainViewModel.MainWindowVisibility)) - { - if (Visibility == System.Windows.Visibility.Visible) - { - Activate(); - _launcher.SearchBox.Focus(Windows.UI.Xaml.FocusState.Programmatic); - UpdatePosition(); - _settings.ActivateTimes++; - if (!_viewModel.LastQuerySelected) - { - _viewModel.LastQuerySelected = true; - } - } - } - }; + //_viewModel.PropertyChanged += (o, e) => + //{ + // if (e.PropertyName == nameof(MainViewModel.MainWindowVisibility)) + // { + // if (Visibility == System.Windows.Visibility.Visible) + // { + // Activate(); + // _launcher.SearchBox.Focus(Windows.UI.Xaml.FocusState.Programmatic); + // UpdatePosition(); + // _settings.ActivateTimes++; + // if (!_viewModel.LastQuerySelected) + // { + // _viewModel.LastQuerySelected = true; + // } + // } + // } + //}; } private void SearchBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) @@ -295,7 +295,7 @@ namespace PowerLauncher { Console.WriteLine("here"); } - } + } } private void QueryTextBox_TextChanged(Windows.UI.Xaml.Controls.AutoSuggestBox sender, Windows.UI.Xaml.Controls.AutoSuggestBoxTextChangedEventArgs args)