FileSettings ClassDelta Engine Documentation
App settings loaded from and saved to file. View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Core Settings
    DeltaEngine.Platforms FileSettings

Namespace: DeltaEngine.Platforms
Assembly: DeltaEngine.Platforms (in DeltaEngine.Platforms.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class FileSettings : Settings

The FileSettings type exposes the following members.

Constructors

  NameDescription
Public methodFileSettings
Initializes a new instance of the FileSettings class
Top
Methods

  NameDescription
Public methodDispose (Inherited from Settings.)
Public methodGetValue T  (Overrides Settings GetValue T (String, T).)
Public methodLoadDefaultSettings (Overrides Settings LoadDefaultSettings .)
Public methodSave (Overrides Settings Save .)
Public methodSetValue (Overrides Settings SetValue(String, Object).)
Top
Fields

  NameDescription
Protected fieldwasChanged (Inherited from Settings.)
Top
Properties

  NameDescription
Public propertyAntiAliasingSamples
4 works on most frameworks, but some have AA disabled, use 0 to keep all frameworks in sync View code on GitHub
(Inherited from Settings.)
Public propertyColorBufferBits (Inherited from Settings.)
Public propertyCustomSettingsExists (Inherited from Settings.)
Public propertyDepthBufferBits (Inherited from Settings.)
Public propertyLimitFramerate (Inherited from Settings.)
Public propertyMusicVolume (Inherited from Settings.)
Public propertyOnlineServiceIp (Inherited from Settings.)
Public propertyOnlineServicePort (Inherited from Settings.)
Public propertyPlayerName (Inherited from Settings.)
Public propertyProfilingModes (Inherited from Settings.)
Public propertyRapidUpdatesPerSecond (Inherited from Settings.)
Public propertyResolution (Inherited from Settings.)
Public propertySoundVolume (Inherited from Settings.)
Public propertyStartInFullscreen (Inherited from Settings.)
Public propertyTwoLetterLanguageName (Inherited from Settings.)
Public propertyUpdatesPerSecond (Inherited from Settings.)
Public propertyUseOnlineLogging (Inherited from Settings.)
Public propertyUseVSync (Inherited from Settings.)
Top
Remarks

Tests: DeltaEngine.Platforms.Tests.FileSettingsTests
Examples

3 unit tests call DeltaEngine.Platforms.FileSettings
[Test, CloseAfterFirstFrame]
public void CheckDefaultSettings()
{
    Assert.AreEqual(false, fileSettings.StartInFullscreen);
    Assert.AreEqual(1.0f, fileSettings.SoundVolume);
    Assert.AreEqual(0.75f, fileSettings.MusicVolume);
    Assert.AreEqual(24, fileSettings.DepthBufferBits);
    Assert.AreEqual(32, fileSettings.ColorBufferBits);
    Assert.AreEqual(0, fileSettings.AntiAliasingSamples);
    Assert.AreEqual(0, fileSettings.LimitFramerate);
    Assert.AreEqual(20, fileSettings.UpdatesPerSecond);
}
[Test, CloseAfterFirstFrame]
public void ChangeAndSaveSettings()
{
    fileSettings.PlayerName = ModifiedPlayerName;
    fileSettings.TwoLetterLanguageName = ModifiedTwoLetterLanguageName;
    fileSettings.Save();
    Assert.IsTrue(File.Exists(SettingsFilePath));
}
[Test]
public void ChangeFileSettings()
{
    fileSettings.StartInFullscreen = true;
    Assert.AreEqual(true, fileSettings.StartInFullscreen);
    fileSettings.StartInFullscreen = false;
}
See Also