public bool ConnectTelescope() { SerialConnection.Connected = true; SerialConnection.ClearBuffers(); HC.WaitForMilliseconds(5000); SerialConnection.Transmit(": C 127 15 #"); // Tell the telescope to connect string ack = SerialConnection.ReceiveTerminated("\r"); if (ack == "OK\r") { ctrl = new ControlBox(this); ctrl.Show(); return(true); } else { System.Windows.Forms.MessageBox.Show(ack); return(false); } }
public bool ConnectTelescope() { SerialConnection.Connected = true; SerialConnection.ClearBuffers(); HC.WaitForMilliseconds(5000); SerialConnection.Transmit(": C 127 15 #"); // Tell the telescope to connect string ack = SerialConnection.ReceiveTerminated("\r"); if (ack == "OK\r") { ctrl = new ControlBox(this); ctrl.Show(); return true; } else { System.Windows.Forms.MessageBox.Show(ack); return false; } }