mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
@@ -30,8 +30,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library.Utilities
|
||||
|
||||
public bool CreateDirectory(string path)
|
||||
{
|
||||
var directioryInfo = _directory.CreateDirectory(path);
|
||||
return directioryInfo != null;
|
||||
var directoryInfo = _directory.CreateDirectory(path);
|
||||
return directoryInfo != null;
|
||||
}
|
||||
|
||||
public void DeleteDirectory(string path)
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Microsoft.PowerToys.Settings.UI.Runner
|
||||
shellPage.Refresh();
|
||||
}
|
||||
|
||||
// XAML Islands: If the window is open, explicity force it to be shown to solve the blank dialog issue https://github.com/microsoft/PowerToys/issues/3384
|
||||
// XAML Islands: If the window is open, explicitly force it to be shown to solve the blank dialog issue https://github.com/microsoft/PowerToys/issues/3384
|
||||
if (isOpen)
|
||||
{
|
||||
Show();
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace ViewModelTests
|
||||
ColorPickerViewModel viewModel = new ColorPickerViewModel(mockSettingsUtils, generalSettingsRepository, ColorPickerIsEnabledByDefaultIPC);
|
||||
|
||||
//Assert
|
||||
// Verifiy that the old settings persisted
|
||||
// Verify that the old settings persisted
|
||||
Assert.AreEqual(originalGeneralSettings.Enabled.ColorPicker, viewModel.IsEnabled);
|
||||
Assert.AreEqual(originalSettings.Properties.ActivationShortcut.ToString(), viewModel.ActivationShortcut.ToString());
|
||||
Assert.AreEqual(originalSettings.Properties.ChangeCursor, viewModel.ChangeCursor);
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace ViewModelTests
|
||||
// Initialise View Model with test Config files
|
||||
FancyZonesViewModel viewModel = new FancyZonesViewModel(generalSettingsRepository, fancyZonesRepository, ColorPickerIsEnabledByDefault_IPC);
|
||||
|
||||
// Verifiy that the old settings persisted
|
||||
// Verify that the old settings persisted
|
||||
Assert.AreEqual(originalGeneralSettings.Enabled.FancyZones, viewModel.IsEnabled);
|
||||
Assert.AreEqual(originalSettings.Properties.FancyzonesAppLastZoneMoveWindows.Value, viewModel.AppLastZoneMoveWindows);
|
||||
Assert.AreEqual(originalSettings.Properties.FancyzonesBorderColor.Value, viewModel.ZoneBorderColor);
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace ViewModelTests
|
||||
ipcMSGCheckForUpdatesCallBackFunc: SendCheckForUpdatesIPCMessage,
|
||||
configFileSubfolder: string.Empty);
|
||||
|
||||
// Verifiy that the old settings persisted
|
||||
// Verify that the old settings persisted
|
||||
Assert.AreEqual(originalGeneralSettings.AutoDownloadUpdates, viewModel.AutoDownloadUpdates);
|
||||
Assert.AreEqual(originalGeneralSettings.Packaged, viewModel.Packaged);
|
||||
Assert.AreEqual(originalGeneralSettings.PowertoysVersion, viewModel.PowerToysVersion);
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace ViewModelTests
|
||||
Func<string, int> SendMockIPCConfigMSG = msg => { return 0; };
|
||||
ImageResizerViewModel viewModel = new ImageResizerViewModel(mockSettingsUtils, generalSettingsRepository, SendMockIPCConfigMSG);
|
||||
|
||||
// Verifiy that the old settings persisted
|
||||
// Verify that the old settings persisted
|
||||
Assert.AreEqual(originalGeneralSettings.Enabled.ImageResizer, viewModel.IsEnabled);
|
||||
Assert.AreEqual(ImageResizerViewModel.GetEncoderIndex(originalSettings.Properties.ImageresizerFallbackEncoder.Value), viewModel.Encoder);
|
||||
Assert.AreEqual(originalSettings.Properties.ImageresizerFileName.Value, viewModel.FileName);
|
||||
@@ -240,7 +240,7 @@ namespace ViewModelTests
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void UpdateWidthAndHeightShouldUpateSizeWhenCorrectValuesAreProvided()
|
||||
public void UpdateWidthAndHeightShouldUpdateSizeWhenCorrectValuesAreProvided()
|
||||
{
|
||||
// arrange
|
||||
ImageSize imageSize = new ImageSize()
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace ViewModelTests
|
||||
Func<string, int> SendMockIPCConfigMSG = msg => { return 0; };
|
||||
PowerLauncherViewModel viewModel = new PowerLauncherViewModel(mockSettingsUtils, generalSettingsRepository, SendMockIPCConfigMSG, 32);
|
||||
|
||||
// Verifiy that the old settings persisted
|
||||
// Verify that the old settings persisted
|
||||
Assert.AreEqual(originalGeneralSettings.Enabled.PowerLauncher, viewModel.EnablePowerLauncher);
|
||||
Assert.AreEqual(originalSettings.Properties.ClearInputOnLaunch, viewModel.ClearInputOnLaunch);
|
||||
Assert.AreEqual(originalSettings.Properties.CopyPathLocation.ToString(), viewModel.CopyPathLocation.ToString());
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace ViewModelTests
|
||||
Func<string, int> SendMockIPCConfigMSG = msg => { return 0; };
|
||||
PowerPreviewViewModel viewModel = new PowerPreviewViewModel(repository, generalSettingsRepository, SendMockIPCConfigMSG);
|
||||
|
||||
// Verifiy that the old settings persisted
|
||||
// Verify that the old settings persisted
|
||||
Assert.AreEqual(originalGeneralSettings.IsElevated, viewModel.IsElevated);
|
||||
Assert.AreEqual(originalSettings.Properties.EnableMdPreview, viewModel.MDRenderIsEnabled);
|
||||
Assert.AreEqual(originalSettings.Properties.EnableSvgPreview, viewModel.SVGRenderIsEnabled);
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace ViewModelTests
|
||||
Func<string, int> SendMockIPCConfigMSG = msg => { return 0; };
|
||||
PowerRenameViewModel viewModel = new PowerRenameViewModel(mockSettingsUtils, generalSettingsRepository, SendMockIPCConfigMSG);
|
||||
|
||||
// Verifiy that the old settings persisted
|
||||
// Verify that the old settings persisted
|
||||
Assert.AreEqual(originalGeneralSettings.Enabled.PowerRename, viewModel.IsEnabled);
|
||||
Assert.AreEqual(originalSettings.ExtendedContextMenuOnly, viewModel.EnabledOnContextExtendedMenu);
|
||||
Assert.AreEqual(originalSettings.MRUEnabled, viewModel.MRUEnabled);
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace ViewModelTests
|
||||
Func<string, int> SendMockIPCConfigMSG = msg => { return 0; };
|
||||
ShortcutGuideViewModel viewModel = new ShortcutGuideViewModel(generalSettingsRepository, shortcutSettingsRepository, SendMockIPCConfigMSG);
|
||||
|
||||
// Verifiy that the old settings persisted
|
||||
// Verify that the old settings persisted
|
||||
Assert.AreEqual(originalGeneralSettings.Enabled.ShortcutGuide, viewModel.IsEnabled);
|
||||
Assert.AreEqual(originalSettings.Properties.OverlayOpacity.Value, viewModel.OverlayOpacity);
|
||||
Assert.AreEqual(originalSettings.Properties.PressTime.Value, viewModel.PressTime);
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
}
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.NamingRules", "SA1310:Field names should not contain underscore", Justification = "Interop naming consistancy")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.NamingRules", "SA1310:Field names should not contain underscore", Justification = "Interop naming consistency")]
|
||||
public const int SW_HIDE = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user