コード例 #1
0
ファイル: OutgoingForm.cs プロジェクト: oldfox94/itapi3
        private void OnCallStateChanged(object sender, TapiCallStateEventArgs e)
        {
            TCall thisCall = e.Call;

            if (thisCall == currCall)
            {
                toolStripStatusLabel1.Text = "Call " + currCall.ToString();
                if (e.State == CALL_STATE.CS_DISCONNECTED)
                {
                    currCall = null;
                    thisCall.Address.Close();
                }
                CheckControls();
            }
        }
コード例 #2
0
ファイル: OutgoingForm.cs プロジェクト: oldfox94/itapi3
        private void OnNewCall(object sender, TapiCallNotificationEventArgs e)
        {
            TCall newCall = e.Call;

            // If we are the owner of the call..
            if (newCall.Privilege == CALL_PRIVILEGE.CP_OWNER)
            {
                if (currCall != newCall)
                {
                    try
                    {
                        newCall.Disconnect(DISCONNECT_CODE.DC_REJECTED);
                    }
                    catch (TapiException ex)
                    {
                        toolStripStatusLabel1.Text = ex.Message;
                    }
                }
                else
                {
                    toolStripStatusLabel1.Text = "Call " + newCall.ToString();
                }
            }
        }