Пример #1
0
 private void InvalidateDeviceData(DeviceDisconnectedMessage action)
 {
     if (action.DeviceType == DeviceTypeEnum.Telescope)
     {
         Task.Factory.StartNew(() =>
         {
             Status                = null;
             Capabilities          = null;
             Parameters            = null;
             CanStartMoveTelescope = false;
             BuildJogRatesList();
             IsTracking     = false;
             SlewDirections = null;
         }, CancellationToken.None, TaskCreationOptions.None, Globals.UISyncContext);
     }
 }
        public TelescopeParameters(TelescopeParameters other)
        {
            this.DeviceManager = other.DeviceManager;
            this.Exceptions    = other.Exceptions.Clone();

            // Don't go through the property setter so we can avoid throwing exceptions.

            this._alignmentMode    = other.AlignmentMode;
            this._apertureArea     = other.ApertureArea;
            this._apertureDiameter = other.ApertureDiameter;
            this._description      = other.Description;
            this._driverInfo       = other.DriverInfo;
            this._doesRefraction   = other.DoesRefraction;
            this._driverVersion    = other.DriverVersion;
            this._equatorialSystem = other.EquatorialSystem;
            this._focalLength      = other.FocalLength;
            this._interfaceVersion = other.InterfaceVersion;
            this._siteElevation    = other.SiteElevation;
            this._siteLatitude     = other.SiteLatitude;
            this._siteLongitude    = other.SiteLongitude;
            this._slewSettleTime   = other.SlewSettleTime;
            this._supportedActions = other.SupportedActions;
            this._trackingRates    = other.TrackingRates;
        }
        private void SetParameters(TelescopeParameters parameters)
        {
            // Make sure that we update the Parameters on the U/I thread.

            Task.Factory.StartNew(() => Parameters = parameters, CancellationToken.None, TaskCreationOptions.None, Globals.UISyncContext);
        }
Пример #4
0
        private void TelescopeParametersUpdated(TelescopeParametersUpdatedMessage action)
        {
            // Make sure that we update the Parameters on the U/I thread.

            Task.Factory.StartNew(() => Parameters = action.Parameters, CancellationToken.None, TaskCreationOptions.None, Globals.UISyncContext);
        }