private void buttonConnect_Click(object sender, EventArgs e) { if (IsConnected) { driver.Connected = false; } else { driver = new ASCOM.DriverAccess.Rotator(Properties.Settings.Default.DriverId); driver.Connected = true; } SetUIState(); }
private void buttonConnect_Click(object sender, EventArgs e) { if (IsConnected) { driver.Connected = false; timer1.Stop(); SetUIState(); return; } else { driver = new ASCOM.DriverAccess.Rotator(Properties.Settings.Default.DriverId); driver.Connected = true; SetUIState(); timer1.Start(); // stepsize = driver.StepSize; } SetUIState(); }
/// <summary> /// Initializes a new instance of the <see cref="test"/> class. /// Must be public for COM registration. /// </summary> public SSRotator(string DriverID, byte DriverType) { MyDriverType = DriverType; if (MyDriverType == 0) { MySSRotator = new ASCOM.DriverAccess.Rotator(DriverID); } else { tl = new TraceLogger("", "test"); ReadProfile(); // Read device configuration from the ASCOM Profile store tl.LogMessage("Rotator", "Starting initialisation"); connectedState = false; // Initialise connected to false utilities = new Util(); //Initialise util object astroUtilities = new AstroUtils(); // Initialise astro utilities object //TODO: Implement your additional construction here tl.LogMessage("Rotator", "Completed initialisation"); } }