SEB-Patcher/SEBPatcher.Monitoring/Display/patch_DisplayMonitor.cs

35 lines
1.3 KiB
C#
Raw Normal View History

using System;
using MonoMod;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.SystemComponents.Contracts;
using SafeExamBrowser.Monitoring.Contracts.Display;
using SafeExamBrowser.Settings.Monitoring;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Monitoring.Display
{
#pragma warning disable IDE1006 // Naming Styles
public class patch_DisplayMonitor : DisplayMonitor
#pragma warning restore IDE1006 // Naming Styles
{
[MonoModIgnore] public patch_DisplayMonitor(ILogger logger, INativeMethods nativeMethods, ISystemInfo systemInfo) : base(logger, nativeMethods, systemInfo) { }
#pragma warning disable IDE1006 // Naming Styles
[MonoModOriginal] public extern ValidationResult orig_ValidateConfiguration(DisplaySettings settings);
#pragma warning restore IDE1006 // Naming Styles
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
public ValidationResult ValidateConfiguration(DisplaySettings settings)
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword
{
ValidationResult result = orig_ValidateConfiguration(settings);
return new ValidationResult
{
ExternalDisplays = 0,
InternalDisplays = 1,
IsAllowed = true
};
}
}
}