mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
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:
@@ -7,7 +7,6 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
|
||||
// Represents the configuration property of the settings that store Double type.
|
||||
public class DoubleProperty
|
||||
{
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
|
||||
private void LogTelemetryEvent(bool value, [CallerMemberName] string moduleName = null )
|
||||
private void LogTelemetryEvent(bool value, [CallerMemberName] string moduleName = null)
|
||||
{
|
||||
var dataEvent = new SettingsEnabledEvent()
|
||||
{
|
||||
|
||||
@@ -26,4 +26,4 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
|
||||
public PowerPreviewProperties()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
@@ -7,7 +7,6 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
|
||||
public class PowerRenameLocalProperties
|
||||
{
|
||||
public PowerRenameLocalProperties()
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
|
||||
public PowerRenameSettingsIPCMessage()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public PowerRenameSettingsIPCMessage(SndPowerRenameSettings settings)
|
||||
|
||||
@@ -9,7 +9,6 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
|
||||
public class ShortcutGuideProperties
|
||||
{
|
||||
public ShortcutGuideProperties()
|
||||
|
||||
@@ -17,7 +17,6 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
|
||||
public ShortcutGuideSettingsIPCMessage()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ShortcutGuideSettingsIPCMessage(SndShortcutGuideSettings settings)
|
||||
@@ -30,4 +29,4 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
|
||||
public class SndImageResizerSettings
|
||||
{
|
||||
[JsonPropertyName("Image Resizer")]
|
||||
|
||||
@@ -27,4 +27,4 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
|
||||
public class SndShortcutGuideSettings
|
||||
{
|
||||
[JsonPropertyName("Shortcut Guide")]
|
||||
@@ -14,7 +13,6 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
|
||||
public SndShortcutGuideSettings()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SndShortcutGuideSettings(ShortcutGuideSettings settings)
|
||||
@@ -27,4 +25,4 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,8 @@ namespace Microsoft.PowerToys.Settings.UI.Runner
|
||||
IsUserAnAdmin = false;
|
||||
}
|
||||
|
||||
RunnerHelper.WaitForPowerToysRunner(PowerToysPID, () => {
|
||||
RunnerHelper.WaitForPowerToysRunner(PowerToysPID, () =>
|
||||
{
|
||||
Environment.Exit(0);
|
||||
});
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
|
||||
{
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected void Set<T>(ref T storage, T value, [CallerMemberName]string propertyName = null)
|
||||
protected void Set<T>(ref T storage, T value, [CallerMemberName] string propertyName = null)
|
||||
{
|
||||
if (Equals(storage, value))
|
||||
{
|
||||
|
||||
@@ -1,258 +1,258 @@
|
||||
// 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.Runtime.CompilerServices;
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Lib;
|
||||
using Microsoft.PowerToys.Settings.UI.Views;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
{
|
||||
public class PowerLauncherViewModel : Observable
|
||||
{
|
||||
private PowerLauncherSettings settings;
|
||||
private GeneralSettings generalSettings;
|
||||
|
||||
public delegate void SendCallback(PowerLauncherSettings settings);
|
||||
|
||||
private readonly SendCallback callback;
|
||||
|
||||
public PowerLauncherViewModel()
|
||||
{
|
||||
callback = (PowerLauncherSettings settings) =>
|
||||
{
|
||||
// Propagate changes to Power Launcher through IPC
|
||||
ShellPage.DefaultSndMSGCallback(
|
||||
string.Format("{{ \"powertoys\": {{ \"{0}\": {1} }} }}", PowerLauncherSettings.ModuleName, JsonSerializer.Serialize(settings)));
|
||||
};
|
||||
if (SettingsUtils.SettingsExists(PowerLauncherSettings.ModuleName))
|
||||
{
|
||||
settings = SettingsUtils.GetSettings<PowerLauncherSettings>(PowerLauncherSettings.ModuleName);
|
||||
}
|
||||
else
|
||||
{
|
||||
settings = new PowerLauncherSettings();
|
||||
settings.Properties.open_powerlauncher.Alt = true;
|
||||
settings.Properties.open_powerlauncher.Code = (int)Windows.System.VirtualKey.Space;
|
||||
settings.Properties.maximum_number_of_results = 4;
|
||||
callback(settings);
|
||||
}
|
||||
|
||||
if (SettingsUtils.SettingsExists())
|
||||
{
|
||||
generalSettings = SettingsUtils.GetSettings<GeneralSettings>();
|
||||
}
|
||||
else
|
||||
{
|
||||
generalSettings = new GeneralSettings();
|
||||
}
|
||||
}
|
||||
|
||||
public PowerLauncherViewModel(PowerLauncherSettings settings, SendCallback callback)
|
||||
{
|
||||
this.settings = settings;
|
||||
this.callback = callback;
|
||||
}
|
||||
|
||||
private void UpdateSettings([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
// Notify UI of property change
|
||||
OnPropertyChanged(propertyName);
|
||||
|
||||
callback(settings);
|
||||
}
|
||||
|
||||
public bool EnablePowerLauncher
|
||||
{
|
||||
get
|
||||
{
|
||||
return generalSettings.Enabled.PowerLauncher;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (generalSettings.Enabled.PowerLauncher != value)
|
||||
{
|
||||
generalSettings.Enabled.PowerLauncher = value;
|
||||
OnPropertyChanged(nameof(EnablePowerLauncher));
|
||||
OutGoingGeneralSettings outgoing = new OutGoingGeneralSettings(generalSettings);
|
||||
ShellPage.DefaultSndMSGCallback(outgoing.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string SearchResultPreference
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.search_result_preference;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.search_result_preference != value)
|
||||
{
|
||||
settings.Properties.search_result_preference = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string SearchTypePreference
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.search_type_preference;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.search_type_preference != value)
|
||||
{
|
||||
settings.Properties.search_type_preference = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int MaximumNumberOfResults
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.maximum_number_of_results;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.maximum_number_of_results != value)
|
||||
{
|
||||
settings.Properties.maximum_number_of_results = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings OpenPowerLauncher
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.open_powerlauncher;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.open_powerlauncher != value)
|
||||
{
|
||||
settings.Properties.open_powerlauncher = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings OpenFileLocation
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.open_file_location;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.open_file_location != value)
|
||||
{
|
||||
settings.Properties.open_file_location = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings CopyPathLocation
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.copy_path_location;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.copy_path_location != value)
|
||||
{
|
||||
settings.Properties.copy_path_location = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool OverrideWinRKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.override_win_r_key;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.override_win_r_key != value)
|
||||
{
|
||||
settings.Properties.override_win_r_key = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool OverrideWinSKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.override_win_s_key;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.override_win_s_key != value)
|
||||
{
|
||||
settings.Properties.override_win_s_key = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IgnoreHotkeysInFullScreen
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.ignore_hotkeys_in_fullscreen;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.ignore_hotkeys_in_fullscreen != value)
|
||||
{
|
||||
settings.Properties.ignore_hotkeys_in_fullscreen = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool ClearInputOnLaunch
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.clear_input_on_launch;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.clear_input_on_launch != value)
|
||||
{
|
||||
settings.Properties.clear_input_on_launch = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 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.Runtime.CompilerServices;
|
||||
using System.Text.Json;
|
||||
|
||||
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Lib;
|
||||
using Microsoft.PowerToys.Settings.UI.Views;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
{
|
||||
public class PowerLauncherViewModel : Observable
|
||||
{
|
||||
private PowerLauncherSettings settings;
|
||||
private GeneralSettings generalSettings;
|
||||
|
||||
public delegate void SendCallback(PowerLauncherSettings settings);
|
||||
|
||||
private readonly SendCallback callback;
|
||||
|
||||
public PowerLauncherViewModel()
|
||||
{
|
||||
callback = (PowerLauncherSettings settings) =>
|
||||
{
|
||||
// Propagate changes to Power Launcher through IPC
|
||||
ShellPage.DefaultSndMSGCallback(
|
||||
string.Format("{{ \"powertoys\": {{ \"{0}\": {1} }} }}", PowerLauncherSettings.ModuleName, JsonSerializer.Serialize(settings)));
|
||||
};
|
||||
if (SettingsUtils.SettingsExists(PowerLauncherSettings.ModuleName))
|
||||
{
|
||||
settings = SettingsUtils.GetSettings<PowerLauncherSettings>(PowerLauncherSettings.ModuleName);
|
||||
}
|
||||
else
|
||||
{
|
||||
settings = new PowerLauncherSettings();
|
||||
settings.Properties.open_powerlauncher.Alt = true;
|
||||
settings.Properties.open_powerlauncher.Code = (int)Windows.System.VirtualKey.Space;
|
||||
settings.Properties.maximum_number_of_results = 4;
|
||||
callback(settings);
|
||||
}
|
||||
|
||||
if (SettingsUtils.SettingsExists())
|
||||
{
|
||||
generalSettings = SettingsUtils.GetSettings<GeneralSettings>();
|
||||
}
|
||||
else
|
||||
{
|
||||
generalSettings = new GeneralSettings();
|
||||
}
|
||||
}
|
||||
|
||||
public PowerLauncherViewModel(PowerLauncherSettings settings, SendCallback callback)
|
||||
{
|
||||
this.settings = settings;
|
||||
this.callback = callback;
|
||||
}
|
||||
|
||||
private void UpdateSettings([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
// Notify UI of property change
|
||||
OnPropertyChanged(propertyName);
|
||||
|
||||
callback(settings);
|
||||
}
|
||||
|
||||
public bool EnablePowerLauncher
|
||||
{
|
||||
get
|
||||
{
|
||||
return generalSettings.Enabled.PowerLauncher;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (generalSettings.Enabled.PowerLauncher != value)
|
||||
{
|
||||
generalSettings.Enabled.PowerLauncher = value;
|
||||
OnPropertyChanged(nameof(EnablePowerLauncher));
|
||||
OutGoingGeneralSettings outgoing = new OutGoingGeneralSettings(generalSettings);
|
||||
ShellPage.DefaultSndMSGCallback(outgoing.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string SearchResultPreference
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.search_result_preference;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.search_result_preference != value)
|
||||
{
|
||||
settings.Properties.search_result_preference = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string SearchTypePreference
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.search_type_preference;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.search_type_preference != value)
|
||||
{
|
||||
settings.Properties.search_type_preference = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int MaximumNumberOfResults
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.maximum_number_of_results;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.maximum_number_of_results != value)
|
||||
{
|
||||
settings.Properties.maximum_number_of_results = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings OpenPowerLauncher
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.open_powerlauncher;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.open_powerlauncher != value)
|
||||
{
|
||||
settings.Properties.open_powerlauncher = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings OpenFileLocation
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.open_file_location;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.open_file_location != value)
|
||||
{
|
||||
settings.Properties.open_file_location = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings CopyPathLocation
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.copy_path_location;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.copy_path_location != value)
|
||||
{
|
||||
settings.Properties.copy_path_location = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool OverrideWinRKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.override_win_r_key;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.override_win_r_key != value)
|
||||
{
|
||||
settings.Properties.override_win_r_key = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool OverrideWinSKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.override_win_s_key;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.override_win_s_key != value)
|
||||
{
|
||||
settings.Properties.override_win_s_key = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IgnoreHotkeysInFullScreen
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.ignore_hotkeys_in_fullscreen;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.ignore_hotkeys_in_fullscreen != value)
|
||||
{
|
||||
settings.Properties.ignore_hotkeys_in_fullscreen = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool ClearInputOnLaunch
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.clear_input_on_launch;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.clear_input_on_launch != value)
|
||||
{
|
||||
settings.Properties.clear_input_on_launch = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool DisableDriveDetectionWarning
|
||||
{
|
||||
get
|
||||
@@ -268,6 +268,6 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,4 +195,4 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace CommonLibTest
|
||||
BasePTSettingsTest expected_json = JsonSerializer.Deserialize<BasePTSettingsTest>(file_contents_correct_json_content);
|
||||
|
||||
// Act
|
||||
if(SettingsUtils.SettingsFolderExists(file_name))
|
||||
if (SettingsUtils.SettingsFolderExists(file_name))
|
||||
{
|
||||
DeleteFolder(file_name);
|
||||
}
|
||||
@@ -75,7 +75,7 @@ namespace CommonLibTest
|
||||
public void SettingsFolderExists_ShouldReturnFalse_WhenFilePathIsNotFound()
|
||||
{
|
||||
// Arrange
|
||||
string file_name_random = "test\\"+ RandomString();
|
||||
string file_name_random = "test\\" + RandomString();
|
||||
string file_name_exists = "test\\exists";
|
||||
string file_contents_correct_json_content = "{\"name\":\"powertoy module name\",\"version\":\"powertoy version\"}";
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Microsoft.PowerToys.Settings.UnitTest
|
||||
// Place the frame in the current Window
|
||||
Window.Current.Content = rootFrame;
|
||||
}
|
||||
|
||||
|
||||
Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.CreateDefaultUI();
|
||||
|
||||
// Ensure the current window is active
|
||||
|
||||
@@ -272,7 +272,7 @@ namespace ViewModelTests
|
||||
{
|
||||
// arrange
|
||||
FancyZonesViewModel viewModel = new FancyZonesViewModel();
|
||||
Assert.AreEqual(ConfigDefaults.DefaultFancyZonesZoneHighlightColor, ToRGBHex(viewModel.ZoneHighlightColor));
|
||||
Assert.AreEqual(ConfigDefaults.DefaultFancyZonesZoneHighlightColor, ToRGBHex(viewModel.ZoneHighlightColor));
|
||||
|
||||
// Assert
|
||||
ShellPage.DefaultSndMSGCallback = msg =>
|
||||
@@ -282,7 +282,7 @@ namespace ViewModelTests
|
||||
};
|
||||
|
||||
// act
|
||||
viewModel.ZoneHighlightColor = Color.FromArgb(0, 225,225,225);
|
||||
viewModel.ZoneHighlightColor = Color.FromArgb(0, 225, 225, 225);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -290,7 +290,7 @@ namespace ViewModelTests
|
||||
{
|
||||
// arrange
|
||||
FancyZonesViewModel viewModel = new FancyZonesViewModel();
|
||||
Assert.AreEqual(ConfigDefaults.DefaultFancyzonesBorderColor, ToRGBHex(viewModel.ZoneBorderColor));
|
||||
Assert.AreEqual(ConfigDefaults.DefaultFancyzonesBorderColor, ToRGBHex(viewModel.ZoneBorderColor));
|
||||
|
||||
// Assert
|
||||
ShellPage.DefaultSndMSGCallback = msg =>
|
||||
@@ -308,7 +308,7 @@ namespace ViewModelTests
|
||||
{
|
||||
// arrange
|
||||
FancyZonesViewModel viewModel = new FancyZonesViewModel();
|
||||
Assert.AreEqual(ConfigDefaults.DefaultFancyZonesInActiveColor, ToRGBHex(viewModel.ZoneInActiveColor));
|
||||
Assert.AreEqual(ConfigDefaults.DefaultFancyZonesInActiveColor, ToRGBHex(viewModel.ZoneInActiveColor));
|
||||
|
||||
// Assert
|
||||
ShellPage.DefaultSndMSGCallback = msg =>
|
||||
|
||||
@@ -49,10 +49,10 @@ namespace ViewModelTests
|
||||
{
|
||||
// Arrange
|
||||
GeneralViewModel viewModel = new GeneralViewModel();
|
||||
|
||||
|
||||
Assert.AreEqual(viewModel.RunningAsUserDefaultText, viewModel.RunningAsText);
|
||||
Assert.IsFalse(viewModel.IsElevated);
|
||||
|
||||
|
||||
// Act
|
||||
viewModel.IsElevated = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user