Search Results for

    Show / Hide Table of Contents

    Class ResourceManager

    Manages a Resource value and eventually updates a Progress Bar automatically.

    Inheritance
    object
    ValueManager
    ResourceManager
    Inherited Members
    ValueManager._initialValue
    ValueManager._initialMaximum
    ValueManager._initialMinimum
    ValueManager._precisionTolerance
    ValueManager._allowValueIncrease
    ValueManager._allowValueDecrease
    ValueManager._minimum
    ValueManager._maximum
    ValueManager._value
    ValueManager._initialized
    ValueManager._valueState
    ValueManager._initialAllowValueIncrease
    ValueManager._initialAllowValueDecrease
    ValueManager.InitializedEvent
    ValueManager.ValueChangedEvent
    ValueManager.ValueStateChangedEvent
    ValueManager.MaximumValueReachedEvent
    ValueManager.MinimumValueReachedEvent
    ValueManager.ValuesRestoredEvent
    ValueManager.Initialized
    ValueManager.ValueState
    ValueManager.PrecisionTolerance
    ValueManager.AllowValueIncrease
    ValueManager.AllowValueDecrease
    ValueManager.AllowChanges
    ValueManager.Minimum
    ValueManager.Maximum
    ValueManager.Value
    ValueManager.Percentage
    ValueManager.MissingValue
    ValueManager.MissingValuePercentage
    ValueManager.CurrentState
    ValueManager.AtMaximum
    ValueManager.AtMinimum
    ValueManager.LastValueChange
    ValueManager.LastMaximumValueChange
    ValueManager.LastMinimumValueChange
    ValueManager.LastOverflowAmount
    ValueManager.MaximumAmountWithinLimits
    ValueManager.CanDecrease()
    ValueManager.CanIncrease()
    ValueManager.Increase(float)
    ValueManager.Decrease(float)
    ValueManager.IncreaseMaximum(float)
    ValueManager.DecreaseMaximum(float)
    ValueManager.IncreaseMinimum(float)
    ValueManager.DecreaseMinimum(float)
    ValueManager.SetToMinimum()
    ValueManager.SetToMaximum()
    ValueManager.SetByPercentage(float)
    ValueManager.GetLastChangeOf(ValueType)
    ValueManager.RestoreValues()
    ValueManager.SetInitialValues(float, float, float, bool)
    ValueManager.RemoveEventsListeners()
    ValueManager.AreEqual(float, float)
    ValueManager.ToString()
    ValueManager.InitializeValues()
    ValueManager.SetValue(float)
    ValueManager.SetLastChange(float, ValueType)
    ValueManager.RaiseLimitReachedEvents()
    ValueManager.UpdateValueState()
    ValueManager.SetMinimum(float)
    ValueManager.SetMaximum(float)
    ValueManager.GetClampedValue(float)
    ValueManager.SetLastOverflow(float)
    ValueManager.OnValueChanged(float, ValueType)
    ValueManager.OnValueStateChanged()
    ValueManager.OnMaximumValueReached()
    ValueManager.OnMinimumValueReached()
    ValueManager.OnValuesRestored()
    ValueManager.OnInitialized()
    Namespace: TetraCreations.ProgressBarSystem
    Assembly: cs.temp.dll.dll
    Syntax
    public class ResourceManager : ValueManager

    Properties

    HasProgressBar

    Determines if the manager has a reference to a ProgressBar.

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

    HasRegeneration

    Determines if the manager has a reference to a ResourceRegeneration.

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

    ProgressBar

    Returns the ProgressBar synchronized with this ResourceManager.

    Declaration
    public ProgressBar ProgressBar { get; protected set; }
    Property Value
    Type Description
    ProgressBar

    Regeneration

    Set/Get the ResourceRegeneration component.

    Declaration
    public ResourceRegeneration Regeneration { get; set; }
    Property Value
    Type Description
    ResourceRegeneration

    Resource

    Get / Set the current Resource being managed.

    Declaration
    public Resource Resource { get; set; }
    Property Value
    Type Description
    Resource

    Methods

    Initialize()

    Sets the initial values, initializes the ProgressBar, add ValueChangedEvent listener to update it.
    Initializes the ResourceRegeneration.

    Declaration
    public override void Initialize()
    Overrides
    ValueManager.Initialize()

    InitializeProgressBar()

    Initialize the ProgressBar Component with the initial values and the Resource.

    Declaration
    protected virtual void InitializeProgressBar()

    InitializeRegeneration()

    Initialize the Regeneration Component if it has the same Resource.

    Declaration
    protected virtual void InitializeRegeneration()

    OnProgressBarChanged()

    Raise ProgressBarChangedEvent and pass the ProgressBar as parameter.

    Declaration
    protected virtual void OnProgressBarChanged()

    SetProgressBar(ProgressBar)

    Replace the current Progress Bar with another one.
    This will call UnsetProgressBar() to remove listeners from the current ProgressBar.

    Declaration
    public virtual void SetProgressBar(ProgressBar progressBar)
    Parameters
    Type Name Description
    ProgressBar progressBar

    SetRegenerationProgressBar()

    When the ProgressBar has changed we need to set it in the ResourceRegeneration.

    Declaration
    protected virtual void SetRegenerationProgressBar()

    SetResourceDefaultValues()

    Sets PrecisionTolerance, AllowValueIncrease, AllowValueDecrease from the Resource.

    Declaration
    protected virtual void SetResourceDefaultValues()

    SetResourceForReferences()

    Sets the Resource inisde the ProgressBar and the ResourceRegeneration.

    Declaration
    protected virtual void SetResourceForReferences()

    UnsetProgressBar()

    Remove all events listeners of the ProgressBar.

    Declaration
    public virtual void UnsetProgressBar()

    Events

    ProgressBarChangedEvent

    Raised when setting a new ProgressBar

    Declaration
    public event EventHandler<ProgressBarChangedEventArgs> ProgressBarChangedEvent
    Event Type
    Type Description
    System.EventHandler<TEventArgs><ProgressBarChangedEventArgs>
    In This Article
    Back to top Tetra Creations documentation