예제 #1
0
 private void OpenStellariumConnection(int port)
 {
     buttonStellariumConnect.Text         = "Stellarium: Connecting..." + Environment.NewLine + "(Press to Diconnect)";
     stellariumConnection_                = new StellariumServer.Connection(System.Net.IPAddress.Any, port);
     stellariumConnection_.StatusChanged += StellariumStatusChangedHandlerAsync;
     stellariumConnection_.ReceivedGoto  += StellariumReceivedGoto;
 }
예제 #2
0
 private void CloseStellariumConnection()
 {
     buttonStellariumConnect.Text = "Stellarium: Disconnected" + Environment.NewLine + "(Press to Connect)";
     if (stellariumConnection_ != null)
     {
         stellariumConnection_.StatusChanged -= StellariumStatusChangedHandlerAsync;
         stellariumConnection_.ReceivedGoto  -= StellariumReceivedGoto;
         stellariumConnection_.Close();
         stellariumConnection_ = null;
     }
 }