/// The case where the user closes game private void SimConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { Console.WriteLine("SimConnect_OnRecvQuit"); Console.WriteLine("KH has exited"); Disconnect(); }
// The case where the user closes Prepar3D void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { statusPanel.BackColor = Color.DarkRed; simConnectService = null; Console.WriteLine("Simulator has exited"); SimConnectDisconnect(); }
private void SimConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { this.SimConnect.SetSystemEventState(EventIdentifier.Every6Hz, SIMCONNECT_STATE.OFF); SimConnectStatus = "Prepar3D has exited"; OnPropertyChanged("SimConnectStatus"); }
private void SimConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { DisposeSimConnect(); OpenSimConnect(); SimConnectClosed(this, new EventArgs()); }
void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { button_Connect.Text = "Connect"; displayText("Disconnected"); simconnect.Dispose(); simconnect = null; }
void onRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { this.fsStatusLabel.Text = "Not connected"; this.fsStatusLabel.Image = FSEconomy.Properties.Resources.icon_airplane; connection.Dispose(); connection = null; stateManager.connection = null; }
// The case where the user closes FSX void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { closeConnection(); ConnectTimer.Start(); textBox1.Text = "Trying to connect ..."; textBox1.ForeColor = SystemColors.WindowText; setButtons(false, false); }
private void SimConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { Console.WriteLine("SimConnect_OnRecvQuit"); Console.WriteLine("Disconnected to KH"); ConnectButton.Content = "Connect"; connectedToSim = false; }
protected virtual void SimConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { Console.WriteLine("SimConnect Disconnected."); timer.Stop(); Clear(); }
private void SimConnect_ReceiveDispatch(SIMCONNECT_RECV pdata, uint cbdata) { var messageType = (SimConnectMessageType)pdata.dwID; if (messageType == SimConnectMessageType.Open) { _isConnected = true; } }
// callback from simconnect (we get this if Prepar3D is shut down) void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { System.Threading.Thread.Sleep(2000); this.Activate(); //take focus // release the simconnect object as we need to create a new one when the app is launched again closeFocusGrab(); }
private void SimConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { if (SimConnected != null) { try { SimConnected.DynamicInvoke(this, false); } catch { } } }
// The case where the user closes FSX void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { this.Log("FSX has exited"); if (simconnect != null) { // Dispose serves the same purpose as SimConnect_Close() simconnect.Dispose(); simconnect = null; this.Log("Connection closed"); } }
private void OnReceiveEventClosed(SimConnect sender, SIMCONNECT_RECV data) { CloseConnection(); Console.ForegroundColor = ConsoleColor.Blue; Console.Write("\nSimConnect: "); Console.ResetColor(); Console.Write($"OnReceiveEventClosed : SIMCONNECT_RECV : CONNECTION TO APP CLOSED : {simConnectAppName} \n"); simConnectAppName = ""; }
/// The case where the user closes game private void SimConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { Console.WriteLine("SimConnect_OnRecvQuit"); Console.WriteLine("KH has exited"); Disconnect(); if (_startJobResponseInfo != null) { Reset(); } }
private void OnQuit(SimConnect sender, SIMCONNECT_RECV data) { _eventAggregator.GetEvent <SimConnectConnectionChangedEvent>().Publish(false); _simConnect.OnRecvOpen -= OnConnected; _simConnect.OnRecvSimobjectData -= OnSimVarReceived; _simConnect.OnRecvQuit -= OnQuit; _simConnect.OnRecvException -= OnException; _simConnect.Dispose(); _simConnect = null; StartConnect(); }
/// <summary> /// The case where the user closes Prepar3D /// </summary> /// <param name="sender"></param> /// <param name="data"></param> void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { CloseConnection(); // на всякий случай создаем копию события т.к. возможна ситуация, что подписчик отпишется от события в момент проверки ниже DisconnectedEventHandler disconnectedHandler = DisconnectedEvent; // далее проверяем, что есть ли какой-то подписчик на событие ConnectedToEndPointEvent (эта переменная не равна нулю) и генерируем тогда такое событие if (disconnectedHandler != null) { disconnectedHandler(this, new EventArgs()); } }
/// <summary> /// When SimConnect loses connection to MSFS 2020, this event is triggered. /// </summary> /// <param name="sender">SimConnect</param> /// <param name="data">connection data</param> private static void SimConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { WriteLog("Start SimConnect_OnRecvQuit(SimConnect, SIMCONNECT_RECV)"); IsConnected = false; if (SimConnected != null) { try { SimConnected.DynamicInvoke(simConnect, false); } catch (Exception ex) { WriteLog(string.Format("Message Receive Error: {0}", ex.Message), EventLogEntryType.Error); } } WriteLog("End SimConnect_OnRecvQuit(SimConnect, SIMCONNECT_RECV)"); }
private void SimConnect_OnRecvOpen(SimConnectImpl sender, SIMCONNECT_RECV data) { RegisterPositionStruct(); RegisterAttitudeStruct(); RegisterTrafficStruct(); _simConnect?.RequestDataOnSimObject( REQUEST.Position, DEFINITION.Position, SimConnectImpl.SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD.SECOND, SIMCONNECT_DATA_REQUEST_FLAG.DEFAULT, 0, 0, 0); _simConnect?.RequestDataOnSimObjectType(REQUEST.TrafficAircraft, DEFINITION.Traffic, 200000, SIMCONNECT_SIMOBJECT_TYPE.AIRCRAFT); _simConnect?.RequestDataOnSimObjectType(REQUEST.TrafficHelicopter, DEFINITION.Traffic, 200000, SIMCONNECT_SIMOBJECT_TYPE.HELICOPTER); _simConnect?.SubscribeToSystemEvent(EVENT.ObjectAdded, "ObjectAdded"); _simConnect?.SubscribeToSystemEvent(EVENT.SixHz, "6Hz"); }
private void SimConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { foreach (SimVar sv in this.VarList) { sv.Subscribed = false; sv.Value = null; } foreach (SimEvent se in this.EventList) { se.Subscribed = false; } this.Timer.Stop(); this.Connected = false; if (WSServer != null) { this.WSServer.Stop(); } this.Ready = false; }
/* * Wenn simconnect geschlossen wird */ void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { // click auf exit button if (_mySimconnect == null) { return; } //btnIndicator.BackColor = Color.Red; //Text = Resources.MainView_NME2_Disconnected; //timeGetPos.Enabled = false; _mySimconnect.Dispose(); _mySimconnect = null; if (SimconnectDisconnected != null) { SimconnectDisconnected(this, EventArgs.Empty); } //FuncPrintOut(Resources.MainView_LOG_Connection_Closed); //btnConnect.Text = Resources.MainView_SimConnectStatus_Connected; //_alCurrentMissionIDs.Clear(); //_alMissions.Clear(); //_alRemoteMissionIDs.Clear(); }
// The case where the user closes Prepar3D void Simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { WriteToOutput("Prepar3D has exited"); Disconnect(); }
void sc_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { Console.WriteLine("sc_OnRecvQuit"); }
// The case where the user closes FSX void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { Logger.Trace("FSX has exited"); CloseConnection(); broker.Publish(new FlightsimDisconnectedMessage()); }
private static void OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { listener.Abort(); quit = true; }
// The case where the user closes FSX static void simConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { CloseConnection(); //return "FSX has exited"; }
// The case where the user closes FSX void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { Console.WriteLine("FSX has exited"); CloseConnection(); }
// The case where the user closes FSX / P3d void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { OnFSXQuit(EventArgs.Empty); closeConnection(); }
// when the user closes FSX void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { lstSystemLog1.Items.Clear(); lstSystemLog1.Items.Add(DateTime.Now+" "+ "FSX has exited"); simconnect.Dispose(); simconnect = null; btConnectStatus.BackColor = Color.Red; btConnectStatus.Text = "Disconnected"; btConnectStatus.ForeColor = Color.White; btDisconnect.Enabled = false; btConnect.Enabled = true; }
// caso o usuario fechar o FSX void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { displayText("FSX foi fechado"); closeConnection(); }
private void SimConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { Disconnect(); }
/* * Wenn simconnect geschlossen wird */ void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { // click auf exit button if (_mySimconnect == null) return; //btnIndicator.BackColor = Color.Red; //Text = Resources.MainView_NME2_Disconnected; //timeGetPos.Enabled = false; _mySimconnect.Dispose(); _mySimconnect = null; if (SimconnectDisconnected != null) { SimconnectDisconnected(this, EventArgs.Empty); } //FuncPrintOut(Resources.MainView_LOG_Connection_Closed); //btnConnect.Text = Resources.MainView_SimConnectStatus_Connected; //_alCurrentMissionIDs.Clear(); //_alMissions.Clear(); //_alRemoteMissionIDs.Clear(); }
// The case where the user closes Prepar3D void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { displayText("Prepar3D has exited"); closeConnection(); }
void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { label2.ForeColor = Color.Red; label2.Text = "Disconnected"; MessageBox.Show("The simulator was closed!", "FSCommunicate", MessageBoxButtons.OK, MessageBoxIcon.Error); closeConnection(); }
protected virtual void OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { Connected = false; Log.Instance.Info("Flight Simulator disconnected."); }
// The case where the user closes FSX void simConnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { DisplayText("FSX has exited"); closeConnection(); }
private void OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { Connected = false; _pullDataTimer.Stop(); }
void simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { closeConnection(); }
// The case where the user closes Flight Simulator void Simconnect_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { logger.LogInformation("Flight Simulator has exited"); CloseConnection(); Closed?.Invoke(this, new EventArgs()); }
private void Sim_OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { connectionLed.Fill = Brushes.Red; }
private void OnRecvQuit(SimConnect sender, SIMCONNECT_RECV data) { CloseConnection(); }