void CallManager_OnCallRemoved(ICall call, CallRemoveReason reason) { if (InvokeRequired) { BeginInvoke(new CallRemovedDelegate(CallManager_OnCallRemoved), call, reason); return; } if (reason == CallRemoveReason.InvalidData) { TimeredBaloon.Show(txtNumber, CaptionStrings.CaptionStrings.ErrorWrongNumberTitle, CaptionStrings.CaptionStrings.ErrorWrongNumberDescription, ToolTipIcon.Error, 4000); } else if (reason == CallRemoveReason.Busy) { TimeredBaloon.Show(txtNumber, CaptionStrings.CaptionStrings.ErrorBusyTitle, CaptionStrings.CaptionStrings.ErrorBusyDescription, ToolTipIcon.Info, 4000); } else if ((reason == CallRemoveReason.RemoteHangup || reason == CallRemoveReason.UserHangup || reason == CallRemoveReason.Transfer) && call != null && call.LastState == CallState.ACTIVE) { var currentLineWrapper = GetActiveUILineWrapper(); // Normal call stop. Try to activate another call. if (currentLineWrapper?.Call == null) { ActivateNextLineWrapper(); } } UpdateAccountStateUi(Core); }
void CallManager_OnCallRemoved(ICall call, CallRemoveReason reason) { if (call != _callToPickup) { return; } _callToPickup = null; }
private void OnCallStateRemoved(ICall call, CallRemoveReason reason) { if (InvokeRequired) { Invoke(new Action <ICall, CallRemoveReason>(OnCallStateRemoved), call, reason); return; } RefreshStatus(); }
public CallEntry(ICall call, CallRemoveReason reason) { Name = call.Name; Number = call.Number; CallDate = DateTime.Now - call.Duration; Duration = call.Duration; IsIncoming = call.IsIncoming; DropReason = reason; IsAnswered = call.LastState == CallState.ACTIVE || call.LastState == CallState.HOLDING; }
private void RemoveCallInternal(Call call, CallRemoveReason reason) { lock (_calls) { _isConferenceActive = _calls.Count(x => x.IsInConference) > 1; _calls.Remove(call); } call.IsDisposed = true; call.RaiseRemoved(reason); SafeRaiseEvent(OnCallRemoved, call, reason); }
private void SafeRaiseEvent(CallRemovedDelegate del, Call call, CallRemoveReason reason) { if (del == null) { return; } var invocationList = del.GetInvocationList(); foreach (var current in invocationList) { ((CallRemovedDelegate)current).BeginInvoke(call, reason, _raiseCallRemovedEventCallback, current); } }
private void SafeRaiseEvent(Action <CallRemoveReason> del, CallRemoveReason reason) { if (del == null) { return; } var invocationList = del.GetInvocationList(); foreach (var current in invocationList) { ((Action <CallRemoveReason>)current).BeginInvoke(reason, _callRemovedAsyncCallback, current); } }
private void CallManager_OnCallRemoved(ICall call, CallRemoveReason reason) { if (call.LastState == CallState.IDLE) { return; } if (reason != CallRemoveReason.NULL || (reason == CallRemoveReason.NULL && call.LastUserAction == CallAction.NULL)) { var callEntry = new CallEntry(call, reason); _calls.Add(callEntry); CallEntryAdded?.Invoke(callEntry); } }
void _call_OnRemoved(CallRemoveReason reason) { if (InvokeRequired) { BeginInvoke(new Action <CallRemoveReason>(_call_OnRemoved), reason); return; } if (Handle == IntPtr.Zero) { _call = null; } else { Close(); } }
void Call_OnRemoved(CallRemoveReason reason) { if (ControlButton.InvokeRequired) { ControlButton.BeginInvoke(_callOnRemoved, reason); return; } if (Active && Call != null && Call.Number == _controlCallerNumber.Text) { _controlCallerNumber.Text = ""; } Call = null; RefreshBackUI(); }
void CallManager_OnCallRemoved(ICall call, CallRemoveReason reason) { CurrentCalls.Remove(call); }
private void OnCallRemoved(ICall call, CallRemoveReason reason) { OnCallStateChanged(call); }
/// <summary> /// Raise OnRemoved event /// </summary> /// <param name="reason">Remove reason</param> public void RaiseRemoved(CallRemoveReason reason) { SafeRaiseEvent(OnRemoved, reason); }