mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
fixing most whitespace issues, reordering namespaces and adding in headers (#5677)
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
using System;
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
@@ -21,7 +25,9 @@ namespace PowerLauncher.ViewModel
|
||||
public ObservableCollection<ContextMenuItemViewModel> ContextMenuItems { get; } = new ObservableCollection<ContextMenuItemViewModel>();
|
||||
|
||||
public ICommand ActivateContextButtonsHoverCommand { get; set; }
|
||||
|
||||
public ICommand ActivateContextButtonsSelectionCommand { get; set; }
|
||||
|
||||
public ICommand DeactivateContextButtonsHoverCommand { get; set; }
|
||||
|
||||
public ICommand DeactivateContextButtonsSelectionCommand { get; set; }
|
||||
@@ -61,6 +67,7 @@ namespace PowerLauncher.ViewModel
|
||||
{
|
||||
ActivateContextButtons(ActivationType.Selection);
|
||||
}
|
||||
|
||||
public void ActivateContextButtons(ActivationType activationType)
|
||||
{
|
||||
// Result does not contain any context menu items - we don't need to show the context menu ListView at all.
|
||||
@@ -84,7 +91,6 @@ namespace PowerLauncher.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void DeactivateContextButtonsHoverAction(object sender)
|
||||
{
|
||||
DeactivateContextButtons(ActivationType.Hover);
|
||||
@@ -118,7 +124,6 @@ namespace PowerLauncher.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void LoadContextMenu()
|
||||
{
|
||||
var results = PluginManager.GetContextMenusForPlugin(Result);
|
||||
@@ -142,7 +147,7 @@ namespace PowerLauncher.ViewModel
|
||||
|
||||
if (hideWindow)
|
||||
{
|
||||
//TODO - Do we hide the window
|
||||
// TODO - Do we hide the window
|
||||
// MainWindowVisibility = Visibility.Collapsed;
|
||||
}
|
||||
})
|
||||
@@ -191,7 +196,7 @@ namespace PowerLauncher.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
//Returns false if we've already reached the last item.
|
||||
// Returns false if we've already reached the last item.
|
||||
public bool SelectNextContextButton()
|
||||
{
|
||||
if (ContextMenuSelectedIndex == (ContextMenuItems.Count - 1))
|
||||
@@ -204,7 +209,7 @@ namespace PowerLauncher.ViewModel
|
||||
return true;
|
||||
}
|
||||
|
||||
//Returns false if we've already reached the first item.
|
||||
// Returns false if we've already reached the first item.
|
||||
public bool SelectPrevContextButton()
|
||||
{
|
||||
if (ContextMenuSelectedIndex == NoSelectionIndex)
|
||||
|
||||
Reference in New Issue
Block a user