private void buttonRABackslash_Click(object sender, EventArgs e) { if (_mount == null) { return; } if (_mount.Connected == false) { return; } this.buttonRABackslash.Image = global::TelescopeMountBackslashMeasurement.Properties.Resources.Stop; if (_mount.CanUnpark) { if (_mount.AtPark) { _mount.Unpark(); } } _mount.Tracking = false; double alt = _mount.Altitude; double az = _mount.Azimuth; _mount.SlewToAltAz(az + 2.0, alt + 2.0); _mount.SlewToAltAz(az, alt); this.buttonRABackslash.Image = global::TelescopeMountBackslashMeasurement.Properties.Resources.Telescope; }
private void slewHorizontal(double az, double alt, bool async) { if (Math.Abs(az) > 90 || Math.Abs(alt) > 90) { return; } else if (telescope.CanSlewAltAz) { labelValStatus.Text = "Slewing..."; setTracking(false); if (telescope.CanSlewAltAzAsync) { telescope.SlewToAltAzAsync(az, alt); } else { telescope.SlewToAltAz(az, alt); } labelValStatus.Text = "Connected"; } }