Exemplo n.º 1
0
        void Call_OnInfoChanged()
        {
            if (ControlButton.InvokeRequired)
            {
                ControlButton.BeginInvoke(_callOnInfoChanged);

                return;
            }

            if (_active)
            {
                RefreshUI();
            }

            RefreshBackUI();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        void Call_OnStateChanged()
        {
            if (ControlButton.InvokeRequired)
            {
                ControlButton.BeginInvoke(_callOnStateChanged);

                return;
            }

            Trace.TraceInformation("New call state on MainFormPhoneLineControl" + ControlButton.Text + ", new state: " + SipHelper.SipCallStateDecode(_call?.State ?? CallState.NULL));

            if (_active)
            {
                RefreshUI();
            }

            RefreshBackUI();
        }
Exemplo n.º 4
0
        void Call_OnDurationChanged()
        {
            if (!_active || _call == null)
            {
                return;
            }

            if (ControlButton.InvokeRequired)
            {
                ControlButton.BeginInvoke(_callOnDurationChanged);

                return;
            }

            if (_call.ActiveDuration > TimeSpan.Zero)
            {
                _controlDuration.Text = _call.ActiveDuration.ToFormattedString();
            }
            else if (_call.Duration > TimeSpan.Zero)
            {
                _controlDuration.Text = _call.Duration.ToFormattedString();
            }
        }