Artemis Artemis
Artemis Artemis

Search Results for

    Class PluginSetting<T>

    Represents a setting tied to a plugin of type T

    Inheritance
    object
    CorePropertyChanged
    PluginSetting<T>
    Implements
    IPluginSetting
    Namespace: Artemis.Core
    Assembly: Artemis.Core.dll
    Syntax
    public class PluginSetting<T> : CorePropertyChanged, IPluginSetting
    Type Parameters
    Name Description
    T

    The value type of the setting

    Properties

    AutoSave

    Gets or sets whether changes must automatically be saved

    Note: When set to trueHasChanged is always false

    Declaration
    public bool AutoSave { get; set; }
    Property Value
    Type Description
    bool

    HasChanged

    Determines whether the setting has been changed

    Declaration
    public bool HasChanged { get; }
    Property Value
    Type Description
    bool

    Name

    The name of the setting, unique to this plugin

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string

    Value

    The value of the setting

    Declaration
    public T? Value { get; set; }
    Property Value
    Type Description
    T

    Methods

    OnSettingChanged()

    Invokes the SettingChanged event

    Declaration
    protected virtual void OnSettingChanged()

    OnSettingSaved()

    Invokes the OnSettingSaved() event

    Declaration
    protected virtual void OnSettingSaved()

    RejectChanges()

    Resets the setting to the last saved value

    Declaration
    public void RejectChanges()

    Save()

    Saves the setting

    Declaration
    public void Save()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Events

    SettingChanged

    Occurs when the value of the setting has been changed

    Declaration
    public event EventHandler? SettingChanged
    Event Type
    Type Description
    EventHandler

    SettingSaved

    Occurs when the value of the setting has been saved

    Declaration
    public event EventHandler? SettingSaved
    Event Type
    Type Description
    EventHandler

    Implements

    IPluginSetting
    Content is available under the PolyForm Noncommercial License, by Artemis RGB.