Пример #1
0
        private void SIPC_CallStartStop(object sender, SIPController.CallStartStopEventArgs e)
        {
            if (this.InvokeRequired)
            {
                SIPController.CallStartStopEventHandler d = new SIPController.CallStartStopEventHandler(SIPC_CallStartStop);
                this.Invoke(d, new object[] { sender, e });
                return;
            }
            else
            {
                switch (e.PhoneState)
                {
                case PhoneState.Idle:
                    lblGrid[e.Queue].BackColor = System.Drawing.Color.LightGreen;
                    break;

                case PhoneState.Dialog:
                    lblGrid[e.Queue].BackColor = System.Drawing.Color.LightBlue;
                    break;
                }
            }
        }
Пример #2
0
        private void SIPC_CallStartStop(object sender, SIPController.CallStartStopEventArgs e)
        {
            if (this.InvokeRequired)
            {
                SIPController.CallStartStopEventHandler d = new SIPController.CallStartStopEventHandler(SIPC_CallStartStop);
                this.Invoke(d, new object[] { sender, e });
                return;
            }
            else
            {
                switch (e.PhoneState)
                {
                case PhoneState.Idle:
                    phones[e.Queue].Image = SIPC.allPhones[e.Queue].Image;
                    IdlePhones++;
                    break;

                case PhoneState.Dialog:
                    phones[e.Queue].Image = SIPC.allPhones[e.Queue].Image;
                    IdlePhones--;
                    break;
                }
            }
        }