Revert "File scoped namespaces"

This reverts commit d31d8f574e.
This commit is contained in:
Burak Kaan Köse
2025-02-16 11:43:30 +01:00
parent d31d8f574e
commit cf9869b71e
617 changed files with 32097 additions and 31478 deletions

View File

@@ -2,30 +2,31 @@
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
namespace Wino.Core.UWP.Services;
public class UnderlyingThemeService : IUnderlyingThemeService
namespace Wino.Core.UWP.Services
{
public const string SelectedAppThemeKey = nameof(SelectedAppThemeKey);
private readonly UISettings uiSettings = new UISettings();
private readonly IConfigurationService _configurationService;
public UnderlyingThemeService(IConfigurationService configurationService)
public class UnderlyingThemeService : IUnderlyingThemeService
{
_configurationService = configurationService;
}
public const string SelectedAppThemeKey = nameof(SelectedAppThemeKey);
// This should not rely on application window to be present.
// Check theme from the settings, rely on UISettings background color if Default.
private readonly UISettings uiSettings = new UISettings();
private readonly IConfigurationService _configurationService;
public bool IsUnderlyingThemeDark()
{
var currentTheme = _configurationService.Get(SelectedAppThemeKey, ApplicationElementTheme.Default);
public UnderlyingThemeService(IConfigurationService configurationService)
{
_configurationService = configurationService;
}
if (currentTheme == ApplicationElementTheme.Default)
return uiSettings.GetColorValue(UIColorType.Background).ToString() == "#FF000000";
else
return currentTheme == ApplicationElementTheme.Dark;
// This should not rely on application window to be present.
// Check theme from the settings, rely on UISettings background color if Default.
public bool IsUnderlyingThemeDark()
{
var currentTheme = _configurationService.Get(SelectedAppThemeKey, ApplicationElementTheme.Default);
if (currentTheme == ApplicationElementTheme.Default)
return uiSettings.GetColorValue(UIColorType.Background).ToString() == "#FF000000";
else
return currentTheme == ApplicationElementTheme.Dark;
}
}
}