ASCOM.Controls The TrafficLight enumeration may be used in any situation where a Normal/Warning/Error status indication is needed. Green traffic light represents a good or normal status. Yellow traffic light represents a warning condition, which does not necessarily prevent continued operation but which merits further investigation. Red traffic light represents an error condition or a situation that prevents further progress. Wikipedia: An annunciator panel is a group of lights used as a central indicator of status of equipment or systems in an aircraft, industrial process, building or other installation. Usually the annunciator panel includes a main warning lamp or audible signal to draw the attention of operating personnel to the annunciator panel for abnormal events or conditions. The Anunciator control provides a simple, standard method of displaying a status notification to the user within a Windows Forms application. Anunciators are best used with the companion control, although they can be placed anywhere on a Windows Form. The control can be used to provide simple On/Off status displays or can be configured to blink with various levels of urgency so that it can represent alarm conditions. An anunciator may represent the slewing state of a telescope. It would be represented by the word "SLEW". When the telescope is stationary, the anunciator remains inactive. When the telescope begins to slew, the anunciator is set to to alert the user that the equipment is in motion. Each anunciator has active and inactive states. When inactive, the control displays in a subdued colour that is readable but does not draw attention. When active, the control will display in a stronger, more visible colour and will either have a steady state or will blink in one of a number of predefined cadence patterns. The cadence patterns are fixed and not user-definable, so that a standard 'look and feel' is promoted accross different applications. Whilst the user is at liberty to choose different colours for both and , The default colours have been chosen to look similar to earlier applications that use similar displays and the defaults are highly recommended for most circumstances. The control's background colour is inherited from the parent control (which should normally be an ) and is not directly settable by the user. A flag that records the anunciator's last known state. Stores the mute status for the anunciator. Tracks whether this object has been disposed. Initializes a new instance of the class. Gets or sets the foreground color of the control. There is little point in setting this value directly as it will normally be constantly overwritten at runtime. The foreground of the control. The default is the value of the property. Gets or sets the color of the anunciator text when inactive. The foreground of the control. The default is the value of the property. Gets or sets the color of the anunciator text when active. The color of the anunciator text when active. Gets or sets the background color for the control. A that represents the background color of the control. The default is the value of the property. Gets or sets a value indicating whether the control can respond to user interaction. For an anunciator, this affects how it displays. A disabled anunciator will always display in its regardless of other settings and it will not participate in cadence updates. true if the control can respond to user interaction; otherwise, false. The default is true. Unregisters this control from the so that it will no longer receive cadence updates. Registers this control with the so that it will receive cadence updates. Releases all resources used by the . Releases the unmanaged resources used by the and optionally releases the managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets or sets the cadence (blink pattern) of the anunciator. Different cadence patterns imply different levels of urgency or severity. The cadence pattern. Updates the anunciator's display, if it has changed since the last update. The new state of the control's appearance ('on' or 'off'). Implements the method. The always calls this method on the GUI thread. Handles the ParentChanged event of the Anunciator control. Changes the control's background colour to blend in with the parent control. The source of the event. The instance containing the event data. Defines the signature for the CadenceUpdateDelegate, used in making thread-safe control updates. A panel control for grouping and arranging controls. This control inherits most of its behaviour from the base class, but provides some defaults that are appropriate for use with ASCOM. Initializes a new instance of the class. Releases all resources used by the . Manages objects that must be toggled on and off in a regular pattern over time. This is known as a cadence. CadenceManager is intended primarily for Windows Forms controls, but can be used for any item that implements the interface. CadenceManager behaves slightly differently if the managed item is a Windows Forms control. Invisible controls do not receive updates until they become visible again. The method is marshalled to the GUI thread. The one and only instance of this class. An object used for thread synchronization during object initialization. This ensures that the singleton is thread-safe. A list of all the anunciator controls that have been created which need updating when the timer ticks. Indicates the current bit position within the cadence register. A timer that triggers updates to anunciators to simulate flashing. Initializes a new instance of the class. This constructor is declared private so that no instances of the class can be created except by the class itself - this is how the singleton pattern ensures there is just a single instance. Gets a reference to the Singleton. If the Singleton has not yet be instantiated, this causes the object to be created and the constructor to execute (lazy loading). This operation uses the double-checked locking pattern to ensure thread-safety. Adds the specified to the list of managed controls. If this is the first control being added, then the update timer is configured and started. The control to be managed. Each control can only appear in the list once (duplicate adds will be silently ignored). Removes a control from the update list. If no managed controls remain in the list, then the update timer is stopped. The to be removed from the update list. If the control is null, or is not in the update list, no action is taken. If the update list is empty after the control is removed, then the cadence timer is stopped. Handles the Tick event of the tmrCadence control. Computes the new display status for each cadenced control based on its property and requests the control update itself with the new value. The source of the event. The instance containing the event data. Delegate used to make thread-safe control updates. Cadence patterns for blinking LEDs. Cadences are based on 32-bit unsigned integers, such that the ordinal value of each item represents a bit mask that can be used directly in an update routine. Permanently off, appropriate for indication of a non-critical inactive state. Permanently on, appropriate for indication of a non-critical active state. Fast blink, appropriate for indicating a state of hightened but non-critical alert. Usage example: during movement of robotic equipment. Slow blink, appropriate for non-critical persistent conditions. Usage example: image exposure in progress. Very fast blink, appropriate for drawing attention to urgent conditions that require operator intervention. Usage example: Rain detected Strobe is mostly off but with an occasional short blip on, appropriate for indicating non-critical ongoing steady idle state. Wink (mostly on with occasional short wink-off), appropriate for indicating non-critical ongoing steady active state. Defines the members necessary for a control to register and be managed by the singleton. Gets or sets the cadence (blink pattern) of the control. Different cadence patterns imply different levels of urgency or severity. The cadence pattern. is based on a 64-bit long integer but only 32-bits are used. This is necessary to achieve CLS compliance, because 32-bit uints are not CLS compliant. Updates the control's display. always calls this method on the GUI thread so that control updates are thread-safe. The new display state of the control: true for active, false for inactive. Provides a status indicator modeled on a bi-colour red/green LED lamp. The lamp can be red or green and (traffic light colours) and can be steady or can flash with a choice of different cadences. Required designer variable. Records the current cadence state of the control. Used to short-cut display updates when they are unnecessary. When True, the LED indicator reflects the state of the Red, Green and Cadence settings. When False, the LED appears inactive (steady off). True when the instance has been disposed. Internal control used to display the LED's text label. Internal panel control that is used to display the LED's colour. Gets or sets the LED's status (which controls its display colour). Sets the text displayed alongside the indicator Sets or reads the 'power status' of the LED When the LED is Enabled, it reflects the current colour settings and cadence. When disabled, the LED appears off and cadencing is disabled. Gets or sets the LED cadence bitmap. If the cadence has changed and is non-steady and the LED is enabled, then the cadence timer is started. Implements the property. Default constructor for a new LEDIndicator object. Performs the default processing required by the designer. Releases all resources used by the . Releases the unmanaged resources and optionally releases the managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Required method for Designer support - do not modify the contents of this method with the code editor. Refreshes the LED display, taking account of the power, colour and cadence settings. The new state of the control's appearance ('on' or 'off'). Implements the method. The always calls this method on the GUI thread. Renders the 'power off' appearance of the LED indicator. Renders the 'power on' appearance of the LED indicator. The exact appearance depends on the property. Sets the colour of the LED. If the colour is changed, then the LED's panel control is invalidated to force a re-draw. The new led colour. Unregister from the . Register with the . The URL of the ASCOM Standards web site.