public void OnAccountUpdated(Account account) { connectionStatus = account == null ? AccountConnectionStatus.NotConnected : AccountConnectionStatus.Connected; if (connectionStatus == AccountConnectionStatus.NotConnected) { if (onConnectionAborted != null) { onConnectionAborted(); } } AccountData = account; if (accountID > 0 && accountID != lastAccountId) { // вызвать событие - получена информация по счету if (onAccountDataFirstReceived != null) { onAccountDataFirstReceived(); } lastAccountId = accountID; } }
public ConnectionStatusEventArgs(AccountConnectionStatus action, string account_id, string bus_name, string object_path, string account_object_path) { this.action = action; this.account_id = account_id; this.bus_name = bus_name; this.object_path = object_path; this.account_object_path = account_object_path; }
private void SetStatusLabelUnsafe(AccountConnectionStatus status) { lblConnectStatus.Text = EnumFriendlyName<AccountConnectionStatus>.GetString(status); }
private void SetStatusLabel(AccountConnectionStatus status) { connectionStatusImage.HasServer = status == AccountConnectionStatus.Connected; Invoke(new Action<AccountConnectionStatus>(SetStatusLabelUnsafe), status); }
public void OnAccountUpdated(Account account) { connectionStatus = account == null ? AccountConnectionStatus.NotConnected : AccountConnectionStatus.Connected; if (connectionStatus == AccountConnectionStatus.NotConnected) if (onConnectionAborted != null) onConnectionAborted(); AccountData = account; if (accountID > 0 && accountID != lastAccountId) { // вызвать событие - получена информация по счету if (onAccountDataFirstReceived != null) onAccountDataFirstReceived(); lastAccountId = accountID; } }