private void OnConnected() { if (_criteria == null) { if (_exportStarted) { return; } _exportStarted = true; Connected.SafeInvoke(); var connectorSettings = _task.Settings as ConnectorHydraTaskSettings; if (connectorSettings != null && connectorSettings.IsDownloadNews) { Connector.RegisterNews(); } } else { ProcessLookupSecurities(_criteria, _newSecurity, _wasConnected); _criteria = null; _isRefreshed = false; } }
public void Connect(string login, string password) { if (_ad.Connected) { _connState = ConnectionStates.Connected; Connected.SafeInvoke(); return; } if (!login.IsEmpty() && !password.IsEmpty()) { _ad.UserName = login; _ad.Password = password; } _connState = ConnectionStates.Connecting; _ad.Connected = true; }
private void OnConnectionChanged(eConnectionState state) { try { _adapter.AddInfoLog("OnConnectionChanged {0}", state); switch (state) { case eConnectionState.Connected: _connState = ConnectionStates.Connected; Connected.SafeInvoke(); break; case eConnectionState.Disconnected: if (_connState == ConnectionStates.Disconnecting) { Disconnected.SafeInvoke(); } else { ConnectionError.SafeInvoke(new AlfaException(tagStateCodes.stcNotConnected, LocalizedStrings.Str1611)); } _connState = ConnectionStates.Disconnected; break; default: ConnectionError.SafeInvoke(new InvalidOperationException("Error eConnectionState: " + state)); break; } } catch (Exception e) { _adapter.AddErrorLog(LocalizedStrings.Str2273Params, e); Error.SafeInvoke(e); } }
internal void OnConnected() { Connected.SafeInvoke(); }
/// <summary> /// Called when this connector has connected with Prepar3D. /// </summary> protected virtual void OnConnected() { // Send the event that says we have connected to the simulation. Connected.SafeInvoke(this, EventArgs.Empty); }
private void ConnectedHandler() { AddGuiAction(() => Connected.SafeInvoke()); }
/// <summary> /// To call the event <see cref="Connector.Connected"/>. /// </summary> private void RaiseConnected() { ConnectionState = ConnectionStates.Connected; Connected.SafeInvoke(); }
private void OnConnectionConnected(object sender, EventArgs e) { Log.LogInfo("[Peer] Connected to {0}", endPoint); Connected.SafeInvoke(this, e); }
/// <summary> /// The peer connection has been successfully established. /// </summary> protected virtual void OnConnected() { Connected.SafeInvoke(this, EventArgs.Empty); }