Exemplo n.º 1
0
        //-------------------------------------------------------------------------------------------------------------

        private void Tick_tmr_call_time(Object myObject, EventArgs myEventArgs)
        {
            DateTime TickTime = DateTime.Parse(DateTime.Now.ToLongTimeString());
            TimeSpan diff     = TickTime - BEGIN_CALL_TIME;

            TimeLabel.Text = diff.ToString();
            TimeLabel.Refresh();

            //if call answered
            if (AsteriskPhoneAgentForm.INCOMING_CALL_ANSWER == true)
            {
                CaptionPanel.BackColor = Color.Blue;
                TITLElabel.BackColor   = Color.Blue;
                AsteriskPhoneAgentForm.INCOMING_CALL_ANSWER = false;
                if (AsteriskPhoneAgentForm.CALLCENTER_OPENONANSWER)
                {
                    if (URL_label.Text.Contains("http"))
                    {
                        System.Diagnostics.Process.Start(URL_label.Text);
                    }
                }

                if (RINGENABLED == true)
                {
                    //activate tranfer call button
                    btTansfercall.Enabled = true;

                    //Enable keypress feature
                    this.KeyPreview = true;
                }
            }
        }