ChooserSA Class

The Chooser object provides a way for your application to let your user select the telescope to use.

Definition

Namespace: ASCOM.Com
Assembly: ASCOM.Com.ChooserSA (in ASCOM.Com.ChooserSA.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
C#
public class ChooserSA : IDisposable
Inheritance
Object    ChooserSA
Implements
IDisposable

Remarks

Calling Chooser.Choose() causes a chooser window to appear, with a drop down selector list containing all of the registered Telescope drivers, listed by the driver's friendly/display name. The user sees a list of telescope types and selects one. Before the OK button will light up, however, the user must click the Setup button, causing the selected driver's setup dialog to appear (it calls the driver's Telescope.SetupDialog() method). When the setup dialog is closed, the OK button will light and allow the user to close the Chooser itself.

The Choose() method returns the DriverID of the selected driver. Choose() allows you to optionally pass the DriverID of a "current" driver (you probably save this in the registry), and the corresponding telescope type is pre-selected in the Chooser's list. In this case, the OK button starts out enabled (lit-up); the assumption is that the pre-selected driver has already been configured.

Constructors

ChooserSA Creates a new Chooser object

Properties

DeviceType The type of device for which the Chooser will select a driver. (String, default = "Telescope")

Methods

Choose Select ASCOM driver to use without pre-selecting in the dropdown list
Choose(String) Select an ASCOM driver to use, pre-selecting one in the drop-down list
Choose(DeviceTypes, String, ILogger) Static method to select a device without having to create a ChooserSA instance.
Dispose Cleans up and disposes objects used by Chooser
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

Version Information

.NET

Supported in: .NET 8.0 and later

See Also