Skip to content

Commit dabaca6

Browse files
committed
Formatting
1 parent 46ce8ef commit dabaca6

2 files changed

Lines changed: 30 additions & 20 deletions

File tree

EverythingToolbar/Helpers/CultureHelper.cs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,18 @@ private static string[] GetSupportedLanguageCodes()
1818
{
1919
var assembly = typeof(CultureHelper).Assembly;
2020
var baseDir = Path.GetDirectoryName(assembly.Location);
21-
if (string.IsNullOrEmpty(baseDir)) return Array.Empty<string>();
21+
if (string.IsNullOrEmpty(baseDir))
22+
return Array.Empty<string>();
2223

2324
var assemblyName = "EverythingToolbar.resources.dll";
2425

25-
return Directory.GetDirectories(baseDir)
26+
return Directory
27+
.GetDirectories(baseDir)
2628
.Select(Path.GetFileName)
27-
.Where(name =>
29+
.Where(name =>
2830
{
29-
if (name == null) return false;
31+
if (name == null)
32+
return false;
3033
try
3134
{
3235
_ = CultureInfo.GetCultureInfo(name);
@@ -53,7 +56,7 @@ public static List<KeyValuePair<string, string>> GetAvailableLanguages()
5356
{
5457
var languages = new List<KeyValuePair<string, string>>
5558
{
56-
new(Properties.Resources.SettingsUseSystemLanguage, "")
59+
new(Properties.Resources.SettingsUseSystemLanguage, ""),
5760
};
5861

5962
// Always include English first
@@ -74,7 +77,13 @@ public static List<KeyValuePair<string, string>> GetAvailableLanguages()
7477
{
7578
// Display name: "English (English)" or "Deutsch (German)" for non-English
7679
var displayName = cultureInfo.NativeName;
77-
if (!string.Equals(cultureInfo.NativeName, cultureInfo.EnglishName, StringComparison.OrdinalIgnoreCase))
80+
if (
81+
!string.Equals(
82+
cultureInfo.NativeName,
83+
cultureInfo.EnglishName,
84+
StringComparison.OrdinalIgnoreCase
85+
)
86+
)
7887
{
7988
displayName = $"{cultureInfo.NativeName} ({cultureInfo.EnglishName})";
8089
}

EverythingToolbar/Settings/UserInterface.xaml.cs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
using System.Collections.Generic;
33
using System.ComponentModel;
44
using System.Linq;
5+
using System.Runtime.CompilerServices;
56
using System.Windows;
67
using System.Windows.Media.Imaging;
7-
using System.Runtime.CompilerServices;
8+
using EverythingToolbar.Controls;
89
using EverythingToolbar.Data;
910
using EverythingToolbar.Helpers;
1011
using EverythingToolbar.Properties;
11-
using EverythingToolbar.Controls;
12-
using MessageBoxResult = Wpf.Ui.Controls.MessageBoxResult;
1312
using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
13+
using MessageBoxResult = Wpf.Ui.Controls.MessageBoxResult;
1414

1515
namespace EverythingToolbar.Settings
1616
{
@@ -126,10 +126,9 @@ private static FILETIME DateTimeToFileTime(DateTime dateTime)
126126

127127
private async void OnUILanguageChanged()
128128
{
129-
var result = await FluentMessageBox.CreateYesNo(
130-
Resources.MessageBoxRestartMessage,
131-
Resources.MessageBoxRestartTitle
132-
).ShowDialogAsync();
129+
var result = await FluentMessageBox
130+
.CreateYesNo(Resources.MessageBoxRestartMessage, Resources.MessageBoxRestartTitle)
131+
.ShowDialogAsync();
133132

134133
if (result != MessageBoxResult.Primary)
135134
return;
@@ -139,13 +138,15 @@ private async void OnUILanguageChanged()
139138
if (IsLauncher && executablePath != null)
140139
{
141140
// Start a new instance with a delay to allow the current one to exit and release the Mutex
142-
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
143-
{
144-
FileName = "cmd.exe",
145-
Arguments = $"/c timeout /t 1 /nobreak && start \"\" \"{executablePath}\"",
146-
WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden,
147-
CreateNoWindow = true
148-
});
141+
System.Diagnostics.Process.Start(
142+
new System.Diagnostics.ProcessStartInfo
143+
{
144+
FileName = "cmd.exe",
145+
Arguments = $"/c timeout /t 1 /nobreak && start \"\" \"{executablePath}\"",
146+
WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden,
147+
CreateNoWindow = true,
148+
}
149+
);
149150
}
150151

151152
// Always restart explorer to provide consistent visual feedback/refresh

0 commit comments

Comments
 (0)