fixing most whitespace issues, reordering namespaces and adding in headers (#5677)

This commit is contained in:
Clint Rutkas
2020-08-05 14:06:55 -07:00
committed by GitHub
parent 92a2b83bc8
commit ff69f6ed7f
72 changed files with 942 additions and 624 deletions

View File

@@ -1,23 +1,25 @@
using Microsoft.PowerLauncher.Telemetry;
using Microsoft.PowerToys.Telemetry;
using PowerLauncher.Helper;
using PowerLauncher.ViewModel;
// 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.ComponentModel;
using System.Timers;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Microsoft.PowerLauncher.Telemetry;
using Microsoft.PowerToys.Telemetry;
using PowerLauncher.Helper;
using PowerLauncher.ViewModel;
using Wox.Infrastructure.UserSettings;
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
using Screen = System.Windows.Forms.Screen;
namespace PowerLauncher
{
public partial class MainWindow : IDisposable
{
#region Private Fields
private Settings _settings;
private MainViewModel _viewModel;
@@ -53,6 +55,7 @@ namespace PowerLauncher
}
}
public MainWindow()
{
InitializeComponent();
@@ -106,7 +109,7 @@ namespace PowerLauncher
{
var resultVM = result as ResultViewModel;
//This may be null if the tapped item was one of the context buttons (run as admin etc).
// This may be null if the tapped item was one of the context buttons (run as admin etc).
if (resultVM != null)
{
_viewModel.Results.SelectedItem = resultVM;
@@ -122,7 +125,7 @@ namespace PowerLauncher
if (Visibility == System.Windows.Visibility.Visible)
{
// Not called on first launch
// Additionally called when deactivated by clicking on screen
// Additionally called when deactivated by clicking on screen
UpdatePosition();
BringProcessToForeground();
@@ -170,7 +173,7 @@ namespace PowerLauncher
{
if (_settings.HideWhenDeactivated)
{
//(this.FindResource("OutroStoryboard") as Storyboard).Begin();
// (this.FindResource("OutroStoryboard") as Storyboard).Begin();
Hide();
}
}
@@ -304,7 +307,7 @@ namespace PowerLauncher
}
// To populate the AutoCompleteTextBox as soon as the selection is changed or set.
// Setting it here instead of when the text is changed as there is a delay in executing the query and populating the result
// Setting it here instead of when the text is changed as there is a delay in executing the query and populating the result
if (_viewModel.Results != null)
{
SearchBox.AutoCompleteTextBlock.Text = MainViewModel.GetAutoCompleteText(
@@ -396,7 +399,7 @@ namespace PowerLauncher
SearchBox.AutoCompleteTextBlock.FlowDirection = MainViewModel.GetLanguageFlowDirection();
}
private void SearchBox_InputLanguageChanged(object sender, InputLanguageEventArgs e)
private void SearchBox_InputLanguageChanged(object sender, InputLanguageEventArgs e)
{
SearchBox_UpdateFlowDirection();
}