mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-05-10 15:32:41 +12:00
40 lines
1 KiB
C#
40 lines
1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Xml.Serialization;
|
|
using OnTopReplica.Properties;
|
|
|
|
namespace OnTopReplica {
|
|
/// <summary>
|
|
/// Describes a fullscreen mode.
|
|
/// </summary>
|
|
enum FullscreenMode {
|
|
Standard,
|
|
Fullscreen,
|
|
AllScreens
|
|
}
|
|
|
|
static class FullscreenModeExtensions {
|
|
|
|
/// <summary>
|
|
/// Gets the fullscreen mode as an enumeration value.
|
|
/// </summary>
|
|
public static FullscreenMode GetFullscreenMode(this Settings settings) {
|
|
FullscreenMode retMode = FullscreenMode.Standard;
|
|
|
|
Enum.TryParse<FullscreenMode>(settings.FullscreenMode, out retMode);
|
|
|
|
return retMode;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sets the fullscreen mode.
|
|
/// </summary>
|
|
public static void SetFullscreenMode(this Settings settings, FullscreenMode mode) {
|
|
settings.FullscreenMode = mode.ToString();
|
|
}
|
|
|
|
}
|
|
}
|