Click or drag to resize

Dmps3SystemControlFrontPanelBrightnessLowFeedBack Property

Indicates if the front panel brightness level is currently set to low.

The DMSystemChange event will trigger with the FrontPanelBrightnessLowEventId.


Namespace: Crestron.SimplSharpPro.DM
Assembly: SimplSharpPro (in SimplSharpPro.dll) Version: 2.21.121
Syntax
C#
public virtual BoolOutputSig FrontPanelBrightnessLowFeedBack { get; }

Property Value

BoolOutputSig
Example
The following will show how to adjust the front panel brightness of the DMPS and read the feedback of the current setting.
C#
public class Dmps3System : CrestronControlSystem
{
    private CTimer _brightnessCycleTimer;
    private Dmps3SystemControl _dmps3SystemControl;

    //setup the application as needed.
    public override void InitializeSystem()
    {
        base.InitializeSystem();
        if (SystemControl == null)
        {
            ErrorLog.Error("Application requires to be apart of a DMPS system.");
            return;
        }

        if (SystemControl.SystemControlType == eSystemControlType.Dmps3SystemControl)
            _dmps3SystemControl = SystemControl as Dmps3SystemControl;
        else
        {
            ErrorLog.Error("Incorrect Dmps3 system for this application.");
            return;
        }

        _brightnessCycleTimer = new CTimer(BrightnessCycleTimerMethod, null, 5000, 5000);
        DMSystemChange += Dmps3System_DMSystemChange;
        CrestronEnvironment.ProgramStatusEventHandler += ProgramStatusChange;
    }


    //Event handler to catch when the front panel's brightness changes.
    void Dmps3System_DMSystemChange(Switch device, DMSystemEventArgs args)
    {
        switch (args.EventId)
        {
            case(DMSystemEventIds.FrontPanelBrightnessHighEventId):
                if (_dmps3SystemControl.FrontPanelBrightnessHighFeedBack.BoolValue)
                    CrestronConsole.PrintLine("Front panel brightness is set to high.");
                break;
            case(DMSystemEventIds.FrontPanelBrightnessLowEventId):
                if (_dmps3SystemControl.FrontPanelBrightnessLowFeedBack.BoolValue)
                    CrestronConsole.PrintLine("Front panel brightness is set to low.");
                break;
            case(DMSystemEventIds.FrontPanelBrightnessMediumEventId):
                if (_dmps3SystemControl.FrontPanelBrightnessMediumFeedBack.BoolValue)
                    CrestronConsole.PrintLine("Front panel brightness is set to medium.");
                break;
        }
    }

    //subscription to the program stopping event
    private void ProgramStatusChange(eProgramStatusEventType programEventType)
    {
        if (programEventType == eProgramStatusEventType.Stopping)
            _brightnessCycleTimer.Dispose();
    }

    private eDmSystemFrontPanelBrightness _nextBrightnessSetting = eDmSystemFrontPanelBrightness.High;
    //Timer callback method to cycle the front panel's brightness. 
    private void BrightnessCycleTimerMethod(object userSpecificObject)
    {
        switch (_nextBrightnessSetting)
        {
            case eDmSystemFrontPanelBrightness.Low:
            case eDmSystemFrontPanelBrightness.Medium:
                _nextBrightnessSetting++;
                break;
            case eDmSystemFrontPanelBrightness.High:
                _nextBrightnessSetting = eDmSystemFrontPanelBrightness.Low;
                break;
            default:
                throw new ArgumentOutOfRangeException();
        }
        _dmps3SystemControl.FrontPanelBrightness(_nextBrightnessSetting);    
    }
}

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also