File scoped namespaces

This commit is contained in:
Aleh Khantsevich
2025-02-16 11:35:43 +01:00
committed by GitHub
parent c1336428dc
commit d31d8f574e
617 changed files with 32118 additions and 32737 deletions

View File

@@ -2,28 +2,27 @@
using System.Threading.Tasks;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Models.Personalization
namespace Wino.Core.Domain.Models.Personalization;
/// <summary>
/// Base class for all app themes.
/// </summary>
public abstract class AppThemeBase
{
/// <summary>
/// Base class for all app themes.
/// </summary>
public abstract class AppThemeBase
public Guid Id { get; set; }
public string ThemeName { get; set; }
public ApplicationElementTheme ForceElementTheme { get; set; }
public string AccentColor { get; set; }
public bool IsAccentColorAssigned => !string.IsNullOrEmpty(AccentColor);
public string BackgroundPreviewImage => GetBackgroundPreviewImagePath();
public abstract AppThemeType AppThemeType { get; }
protected AppThemeBase(string themeName, Guid id)
{
public Guid Id { get; set; }
public string ThemeName { get; set; }
public ApplicationElementTheme ForceElementTheme { get; set; }
public string AccentColor { get; set; }
public bool IsAccentColorAssigned => !string.IsNullOrEmpty(AccentColor);
public string BackgroundPreviewImage => GetBackgroundPreviewImagePath();
public abstract AppThemeType AppThemeType { get; }
protected AppThemeBase(string themeName, Guid id)
{
ThemeName = themeName;
Id = id;
}
public abstract Task<string> GetThemeResourceDictionaryContentAsync();
public abstract string GetBackgroundPreviewImagePath();
ThemeName = themeName;
Id = id;
}
public abstract Task<string> GetThemeResourceDictionaryContentAsync();
public abstract string GetBackgroundPreviewImagePath();
}

View File

@@ -1,12 +1,11 @@
using System;
namespace Wino.Core.Domain.Models.Personalization
namespace Wino.Core.Domain.Models.Personalization;
public class CustomThemeMetadata
{
public class CustomThemeMetadata
{
public Guid Id { get; set; }
public string Name { get; set; }
public string AccentColorHex { get; set; }
public bool HasCustomAccentColor => !string.IsNullOrEmpty(AccentColorHex);
}
public Guid Id { get; set; }
public string Name { get; set; }
public string AccentColorHex { get; set; }
public bool HasCustomAccentColor => !string.IsNullOrEmpty(AccentColorHex);
}

View File

@@ -1,16 +1,15 @@
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Models.Personalization
{
public class ElementThemeContainer
{
public ElementThemeContainer(ApplicationElementTheme nativeTheme, string title)
{
NativeTheme = nativeTheme;
Title = title;
}
namespace Wino.Core.Domain.Models.Personalization;
public ApplicationElementTheme NativeTheme { get; set; }
public string Title { get; set; }
public class ElementThemeContainer
{
public ElementThemeContainer(ApplicationElementTheme nativeTheme, string title)
{
NativeTheme = nativeTheme;
Title = title;
}
public ApplicationElementTheme NativeTheme { get; set; }
public string Title { get; set; }
}