コード例 #1
0
 /// <summary>
 /// The init of the Line class.
 /// </summary>
 /// <param name="cti">The actualized Telephony object</param>
 /// <param name="devID">The Dev ID</param>
 /// <param name="type">The Telephony type </param>
 public override void Init(TelephonyProvider cti, int devID, Microsoft.Ccf.Csr.Cti.Providers.TelephonyProvider.CtiType type)
 {
     base.Init(cti, devID, type);
     this.tapiCti = (TapiTelephonyAdapter)cti;
     name         = this.tapiCti.CtiTapi.GetDeviceName(devID);
     providerInfo = this.tapiCti.CtiTapi.GetDeviceProviderInfo(devID);
     switchInfo   = this.tapiCti.CtiTapi.GetDeviceSwitchInfo(devID);
     features     = this.tapiCti.CtiTapi.GetDeviceFeatures(devID);
 }
コード例 #2
0
        private void EditTelephonyProvider(int TelephonyProviderId)
        {
            this.TelephonyProvider = this.srvTelephonyProvider.GetById(TelephonyProviderId);

            this.ClearDetailControls();
            this.LoadFormFromEntity();
            this.frmTelephonyProvider.HiddenDetail(false);
            this.ShowDetail(true);
        }
コード例 #3
0
        /// <summary>
        /// Login Interface...
        /// </summary>
        /// <returns></returns>
        public override bool InitAndLogOn()
        {
            TelephonyProvider.CtiType ctiType = TelephonyProvider.CtiType.None;
            string agentNumber = string.Empty;

            try
            {
                ConfigurationValueReader configReader = ConfigurationValueReader.ConfigurationReader();
                ctiType     = (TelephonyProvider.CtiType)Convert.ToInt32(configReader.ReadAppSettings("CtiType"), CultureInfo.InvariantCulture);
                agentNumber = configReader.ReadAppSettings("MachineName");
            }
            catch
            {
            }

            if (ctiType == TelephonyProvider.CtiType.None ||
                string.IsNullOrEmpty(agentNumber))
            {
                return(false);
            }

            // Initialize the CTI class
            ctiProvider = InitializeCti();

            if (ctiProvider != null)
            {
                bool ctiLogin = Init(ctiType);

                // If agentNumber is null, then we aren't supporting CTI.
                if (ctiLogin && !string.IsNullOrEmpty(agentNumber))
                {
                    myLine = InitializeLine(agentNumber);
                    if (myLine == null)
                    {
                        Logging.Error(Application.ProductName, ResourceStrings.UNABLETOCONFIGUREPHONE);
                    }

                    /// this is the new call event for TAPI/TSAPI
                    cti.Cti.CallChanged += new CallEventHandler(Cti_CallChanged);
                }
            }

            if (ctiProvider != null)
            {
                //raise Agent ready Event.
                if (AgentStateChangedEvent != null)
                {
                    AgentStateChangedEvent(this, new CtiCoreEventArgs("AgentStateChange", CtiAgentStates.AVAILABLE, string.Empty));
                }
            }

            // True for success
            return(ctiProvider != null);
        }
コード例 #4
0
 private void DeleteEntity(int TelephonyProviderId)
 {
     if (MessageBox.Show("¿Esta seguro de eliminar el Proveedor de Telefonía?", "Advertencia",
                         MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
     {
         return;
     }
     this.TelephonyProvider           = this.srvTelephonyProvider.GetById(TelephonyProviderId);
     this.TelephonyProvider.Activated = false;
     this.TelephonyProvider.Deleted   = true;
     this.srvTelephonyProvider.SaveOrUpdate(this.TelephonyProvider);
     this.Search();
 }
コード例 #5
0
        public override TelephonyProvider GetSearchResult()
        {
            TelephonyProvider TelephonyProvider = null;
            UltraGridRow      activeRow         = this.grdSchSearch.ActiveRow;

            if (activeRow != null)
            {
                int TelephonyProviderId = Convert.ToInt32(activeRow.Cells[0].Value);
                TelephonyProvider = this.srvTelephonyProvider.GetById(TelephonyProviderId);
            }

            return(TelephonyProvider);
        }
コード例 #6
0
        /// <summary>
        /// The init of the Line class.
        /// </summary>
        /// <param name="cti">The actualized Telephony object</param>
        /// <param name="type">The Telephony type </param>
        public override void Init(TelephonyProvider cti, Microsoft.Ccf.Csr.Cti.Providers.TelephonyProvider.CtiType type)
        {
            base.Init(cti, type);
            LineClassProvider line = null;

            DevCount = this.tapiCti.CtiTapi.DeviceCount();
            for (int i = 0; i < DevCount; i++)
            {
                //line = new LineClass( cti, cti.CtiTapi.GetDeviceID( i ), Telephony.CtiType.TAPI );
                line = LineClassProvider.Instance();
                line.Init(this.tapiCti, this.tapiCti.CtiTapi.GetDeviceID(i), TelephonyProvider.CtiType.TAPI);
                Lines.Add(line);
            }
        }
コード例 #7
0
 /// <summary>
 /// The init of the Call class.
 /// </summary>
 /// <param name="cti">The actualized Telephony object</param>
 /// <param name="line">The actualized line object</param>
 /// <param name="callID">The ID of the call.</param>
 public override void Init(TelephonyProvider cti, LineClassProvider line, int callID)
 {
     base.Init(cti, line, callID);
 }
コード例 #8
0
 private void btnSchCreate_Click(object sender, EventArgs e)
 {
     this.TelephonyProvider = new TelephonyProvider();
     this.ClearDetailControls();
     this.ShowDetail(true);
 }