Большой рефактор
This commit is contained in:
@@ -1,15 +1,22 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.Win32;
|
||||
#pragma warning disable CS8603 // Possible null reference return.
|
||||
#pragma warning disable CS0184 // 'is' expression's given expression is never of the provided type
|
||||
#pragma warning disable CA1806
|
||||
#pragma warning disable CS8605 // Unboxing a possibly null value.
|
||||
#pragma warning disable CS8622 // Nullability of reference types in type of parameter doesn't match the target delegate (possibly because of nullability attributes).
|
||||
#pragma warning disable CS8604 // Possible null reference argument.
|
||||
#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type.
|
||||
#pragma warning disable CS8602 // Dereference of a possibly null reference.
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
#pragma warning disable CS0169 // Field is never used
|
||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
|
||||
|
||||
// ReSharper disable All
|
||||
|
||||
namespace Pf2eViewer;
|
||||
|
||||
@@ -1088,8 +1095,9 @@ public class DarkModeCS
|
||||
|
||||
/// <summary>Returns Windows's System Colors for UI components following Google Material Design concepts.</summary>
|
||||
/// <param name="Window">[OPTIONAL] Applies DarkMode (if set) to this Window Title and Background.</param>
|
||||
/// <param name="ColorMode">O: DarkMode, 1: LightMode</param>
|
||||
/// <returns>List of Colors: Background, OnBackground, Surface, OnSurface, Primary, OnPrimary, Secondary, OnSecondary</returns>
|
||||
public static OSThemeColors GetSystemColors(Form Window = null, int ColorMode = 0) //<- O: DarkMode, 1: LightMode
|
||||
public static OSThemeColors GetSystemColors(Form Window = null, int ColorMode = 0)
|
||||
{
|
||||
OSThemeColors _ret = new OSThemeColors();
|
||||
|
||||
@@ -1287,6 +1295,7 @@ public class DarkModeCS
|
||||
|
||||
/// <summary>Attemps to apply Window's Dark Style to the Control and all its childs.</summary>
|
||||
/// <param name="control"></param>
|
||||
/// <param name="IsDarkMode"></param>
|
||||
private static void ApplySystemDarkTheme(Control control = null, bool IsDarkMode = true)
|
||||
{
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user