Dev/crutkas/fixing warnings (#5161)

* new lines & braces

* Tabs /space auto fix

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
This commit is contained in:
Clint Rutkas
2020-07-22 13:27:17 -07:00
committed by GitHub
parent 6efec9d280
commit 14247fa75a
114 changed files with 694 additions and 681 deletions

View File

@@ -46,12 +46,13 @@ namespace ColorPickerUI
return;
}
if(_args.Length > 0)
if (_args.Length > 0)
{
_ = int.TryParse(_args[0], out _powerToysPid);
}
RunnerHelper.WaitForPowerToysRunner(_powerToysPid, () => {
RunnerHelper.WaitForPowerToysRunner(_powerToysPid, () =>
{
Environment.Exit(0);
});

View File

@@ -14,7 +14,8 @@ namespace ColorPicker.Behaviors
{
var sender = ((ResizeBehavior)d).AssociatedObject;
var move = new DoubleAnimation(sender.Width, (double)e.NewValue, new Duration(TimeSpan.FromMilliseconds(150)), FillBehavior.Stop);
move.Completed += (s, e1) => {
move.Completed += (s, e1) =>
{
sender.BeginAnimation(FrameworkElement.WidthProperty, null); sender.Width = (double)e.NewValue;
};
move.EasingFunction = new QuadraticEase() { EasingMode = EasingMode.EaseOut };

View File

@@ -38,7 +38,7 @@ namespace ColorPicker.Mouse
{
try
{
if(curFile != null)
if (curFile != null)
{
Registry.SetValue(CursorsRegistryPath, cursorRegistryName, curFile);
Win32Apis.SystemParametersInfo(SPI_SETCURSORS, 0, new IntPtr(0), SPIF_SENDCHANGE);

View File

@@ -25,7 +25,7 @@ namespace ColorPicker.Settings
ChangeCursor = new SettingItem<bool>(true);
ActivationShortcut = new SettingItem<string>(DefaultActivationShortcut);
CopiedColorRepresentation = new SettingItem<ColorRepresentationType>(ColorRepresentationType.HEX);
LoadSettingsFromJson();
_watcher = Helper.GetFileWatcher(ColorPickerModuleName, "settings.json", LoadSettingsFromJson);
}
@@ -76,7 +76,7 @@ namespace ColorPicker.Settings
Logger.LogError("Failed to read changed settings", ex);
Thread.Sleep(500);
}
catch(Exception ex)
catch (Exception ex)
{
Logger.LogError("Failed to read changed settings", ex);
}