Formatting

This commit is contained in:
Vic 2022-12-23 11:46:12 +08:00
parent 5de74c4676
commit b1eb191044
3 changed files with 21 additions and 11 deletions

View file

@ -86,14 +86,10 @@
Key="O"
Command="{Binding LoadContextMenuCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="Right" Command="{Binding LoadContextMenuCommand}" />
<KeyBinding Key="Left" Command="{Binding EscCommand}" />
<KeyBinding
Key="H"
Command="{Binding LoadHistoryCommand}"
Modifiers="Ctrl" />
<KeyBinding Key="Right" Command="{Binding LoadContextMenuCommand}" />
<KeyBinding Key="Left" Command="{Binding EscCommand}" />
<KeyBinding
Key="OemCloseBrackets"
Command="{Binding IncreaseWidthCommand}"

View file

@ -70,6 +70,7 @@ namespace Flow.Launcher
_viewModel.ResultCopy(QueryTextBox.SelectedText);
}
}
private async void OnClosing(object sender, CancelEventArgs e)
{
_settings.WindowTop = Top;
@ -324,11 +325,13 @@ namespace Flow.Launcher
OpenWelcomeWindow();
}
}
private void OpenWelcomeWindow()
{
var WelcomeWindow = new WelcomeWindow(_settings);
WelcomeWindow.Show();
}
private void ToggleGameMode()
{
if (_viewModel.GameModeStatus)
@ -342,6 +345,7 @@ namespace Flow.Launcher
_viewModel.GameModeStatus = true;
}
}
private async void PositionReset()
{
_viewModel.Show();
@ -349,6 +353,7 @@ namespace Flow.Launcher
Left = HorizonCenter();
Top = VerticalCenter();
}
private void InitProgressbarAnimation()
{
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 100, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
@ -361,6 +366,7 @@ namespace Flow.Launcher
_viewModel.ProgressBarVisibility = Visibility.Hidden;
isProgressBarStoryboardPaused = true;
}
public void WindowAnimator()
{
if (_animating)
@ -475,7 +481,6 @@ namespace Flow.Launcher
App.API.OpenSettingDialog();
}
private async void OnDeactivated(object sender, EventArgs e)
{
_settings.WindowLeft = Left;
@ -644,6 +649,7 @@ namespace Flow.Launcher
Preview.Visibility = Visibility.Collapsed;
}
}
public void PreviewToggle()
{

View file

@ -135,8 +135,6 @@ namespace Flow.Launcher.ViewModel
Log.Error("MainViewModel", "Unexpected ResultViewUpdate ends");
}
;
void continueAction(Task t)
{
#if DEBUG
@ -180,6 +178,7 @@ namespace Flow.Launcher.ViewModel
await PluginManager.ReloadDataAsync().ConfigureAwait(false);
Notification.Show(InternationalizationManager.Instance.GetTranslation("success"), InternationalizationManager.Instance.GetTranslation("completedSuccessfully"));
}
[RelayCommand]
private void LoadHistory()
{
@ -193,6 +192,7 @@ namespace Flow.Launcher.ViewModel
SelectedResults = Results;
}
}
[RelayCommand]
private void LoadContextMenu()
{
@ -208,6 +208,7 @@ namespace Flow.Launcher.ViewModel
SelectedResults = Results;
}
}
[RelayCommand]
private void Backspace(object index)
{
@ -220,6 +221,7 @@ namespace Flow.Launcher.ViewModel
ChangeQueryText($"{actionKeyword}{path}");
}
[RelayCommand]
private void AutocompleteQuery()
{
@ -246,6 +248,7 @@ namespace Flow.Launcher.ViewModel
ChangeQueryText(autoCompleteText);
}
}
[RelayCommand]
private async Task OpenResultAsync(string index)
{
@ -280,6 +283,7 @@ namespace Flow.Launcher.ViewModel
SelectedResults = Results;
}
}
[RelayCommand]
private void OpenSetting()
{
@ -297,6 +301,7 @@ namespace Flow.Launcher.ViewModel
{
SelectedResults.SelectFirstResult();
}
[RelayCommand]
private void SelectPrevPage()
{
@ -308,11 +313,13 @@ namespace Flow.Launcher.ViewModel
{
SelectedResults.SelectNextPage();
}
[RelayCommand]
private void SelectPrevItem()
{
SelectedResults.SelectPrevResult();
}
[RelayCommand]
private void SelectNextItem()
{
@ -520,6 +527,8 @@ namespace Flow.Launcher.ViewModel
#endregion
#region Query
public void Query()
{
if (SelectedIsFromQueryResults())
@ -873,6 +882,8 @@ namespace Flow.Launcher.ViewModel
return selected;
}
#endregion
#region Hotkey
public void ToggleFlowLauncher()
@ -928,9 +939,6 @@ namespace Flow.Launcher.ViewModel
MainWindowVisibility = Visibility.Collapsed;
}
#endregion
/// <summary>
/// Checks if Flow Launcher should ignore any hotkeys
/// </summary>
@ -939,7 +947,7 @@ namespace Flow.Launcher.ViewModel
return Settings.IgnoreHotkeysOnFullscreen && WindowsInteropHelper.IsWindowFullscreen();
}
#endregion
#region Public Methods