コード例 #1
0
ファイル: WindowFormApp.cs プロジェクト: nikson/ArtechCTI-SDK
        void ctdControler_DeviceResponsed(object sender, DeviceEventArgs deviceEventArgs)
        {
            // For detail check CTDController.OnDeviceResponsed()

            //MessageBox.Show("Channel : " + deviceEventArgs.ChannelNo + "\n"
            //    + "State : " + deviceEventArgs.BackState.ToString("X") + "\n"
            //    + "SubState : " + deviceEventArgs.SubState );
        }
コード例 #2
0
ファイル: CTDControler.cs プロジェクト: nikson/ArtechCTI-SDK
        private void OnDeviceResponsed(object sender, DeviceEventArgs e)
        {
            // e.ChannelNo
            // e.BackState
            // e.SubState

            #region State Handler
            switch (e.BackState)
            {
                case DeviceBackState.MCU_BACK_DISABLE:
                    // set text the corresponding channel/line Disable
                    break;
                case DeviceBackState.MCU_BACK_ENABLE:
                    // set text the corresponding channel/line Enable
                    break;
                case DeviceBackState.MCU_BACK_ID:
                    // get the device id
                    // string cpuversion = GetCPUVersion(e.ChannelNo);
                    break;
                case DeviceBackState.MCU_BACK_CALLER_ID:
                    // GetCallerID()
                    break;
                case DeviceBackState.MCU_BACK_STATE:
                    {
                        #region Sub State
                        switch (e.SubState)
                        {
                            case DeviceBackState.HOOK_ON_PR_POSITIVE:
                                // HOOK ON PR+
                                break;
                            case DeviceBackState.HOOK_ON_PR_NEGATIVE:
                                // HOOK ON PR-
                                break;
                            case DeviceBackState.HOOK_ON_NO_PR:
                                // HOOK ON NO PR
                                break;
                            case DeviceBackState.HOOK_OFF_PR_POSITIVE:
                                // HOOK OFF PR+
                                //GetCallerID()
                                //GetRingingIndex()
                                break;
                            case DeviceBackState.HOOK_OFF_PR_NEGATIVE:
                                // HOOK OFF PR-
                                break;
                            case DeviceBackState.NO_LINE:
                                // No Line
                                break;
                            case DeviceBackState.RING_ON_STATE:
                                //GetRingIndex()
                                break;
                            case DeviceBackState.RING_OFF_STATE:
                                // Ring Off
                                break;
                            case DeviceBackState.NO_HOOK_PR_POSITIVE:
                                // NO HOOK PR+
                                break;
                            case DeviceBackState.NO_HOOK_PR_NEGATIVE:
                                // NO HOOK PR-
                                break;
                            case DeviceBackState.NO_HOOK_NO_PR:
                                // NO HOOK NO PR
                                break;
                            default:
                                break;
                        }
                        #endregion
                    }
                    break;
                case DeviceBackState.MCU_BACK_DIAL_DIGIT:
                    // GetDialedNumber()
                    break;
                case DeviceBackState.MCU_BACK_COLLATERAL_DIAL:
                    // GetCollateralDialedNumber()
                    break;
                case DeviceBackState.MCU_BACK_DEVICE:
                    // Enable
                    // GetCPUVersion
                    break;
                case DeviceBackState.MCU_BACK_DEVICE_PARAM:
                    // GetParameter();
                    break;
                case DeviceBackState.MCU_BACK_CPU_ID:
                    // GetCPUID()
                    break;
                case DeviceBackState.MCU_BACK_MISSED_CALL:
                    // Missed Call
                    break;
                case DeviceBackState.MCU_BACK_START_TALK:
                    // talk time = e.SubState
                    // TalkTimeChanged()
                    break;
                default:
                    break;
            }

            #endregion
        }