mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 08:56:15 +02:00
Fix or disable multiple warnings
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
#pragma warning disable
|
||||||
namespace DesktopMagic.Helpers;
|
namespace DesktopMagic.Helpers;
|
||||||
|
|
||||||
internal class W32
|
internal class W32
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
#pragma warning disable
|
||||||
namespace DesktopMagic
|
namespace DesktopMagic
|
||||||
{
|
{
|
||||||
using static NativeMethods;
|
using static NativeMethods;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public partial class PluginWindow : Window
|
|||||||
|
|
||||||
public bool IsRunning { get; private set; } = true;
|
public bool IsRunning { get; private set; } = true;
|
||||||
public PluginMetadata PluginMetadata { get; private set; }
|
public PluginMetadata PluginMetadata { get; private set; }
|
||||||
public string? PluginFolderPath { get; private set; }
|
public string PluginFolderPath { get; private set; }
|
||||||
|
|
||||||
public PluginWindow(PluginMetadata pluginMetadata, PluginSettings settings, string pluginFolderPath)
|
public PluginWindow(PluginMetadata pluginMetadata, PluginSettings settings, string pluginFolderPath)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,8 +6,13 @@ namespace DesktopMagic.Api.Drawing;
|
|||||||
|
|
||||||
internal class FontComparer : IEqualityComparer<Font>
|
internal class FontComparer : IEqualityComparer<Font>
|
||||||
{
|
{
|
||||||
public bool Equals(Font font1, Font font2)
|
public bool Equals(Font? font1, Font? font2)
|
||||||
{
|
{
|
||||||
|
if (font1 is null || font2 is null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (font1.Name != font2.Name)
|
if (font1.Name != font2.Name)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ public class Button : Setting
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Occurs when the button gets clicked.
|
/// Occurs when the button gets clicked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action OnClick;
|
public event Action? OnClick;
|
||||||
|
|
||||||
private string _value;
|
private string _value = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the text caption displayed in the <see cref="Button"/> element.
|
/// Gets or sets the text caption displayed in the <see cref="Button"/> element.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class Label : Setting
|
public class Label : Setting
|
||||||
{
|
{
|
||||||
private string _value;
|
private string _value = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the text associated with this <see cref="Label"/>.
|
/// Gets or sets the text associated with this <see cref="Label"/>.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class TextBox : Setting
|
public class TextBox : Setting
|
||||||
{
|
{
|
||||||
private string _value;
|
private string _value = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the text associated with this <see cref="TextBox"/>.
|
/// Gets or sets the text associated with this <see cref="TextBox"/>.
|
||||||
|
|||||||
Reference in New Issue
Block a user