public CtlDispositionRender(ModulePermissions[] MyPermissions)
        {
            try
            {
                InitializeComponent();

                _MyPermissions = MyPermissions;
                FncPermissionsReview();

                //VMuktiAPI.VMuktiInfo.ConnectionString = "Data Source=61.17.213.134\\SqlExpress;Initial Catalog=VMukti;User ID=sa;PassWord=mahavir;";
                VMuktiHelper.RegisterEvent("SetCampaignID").VMuktiEvent                  += new VMuktiEvents.VMuktiEventHandler(CtlDispositionRender_VMuktiEventCampaignID);
                VMuktiHelper.RegisterEvent("SetDispositionEnable").VMuktiEvent           += new VMuktiEvents.VMuktiEventHandler(CtlDispositionRender_VMuktiEvent_SetDispositionEnable);
                VMuktiHelper.RegisterEvent("SetDispositionButtonClickEvent").VMuktiEvent += new VMuktiEvents.VMuktiEventHandler(CtlDispositionRender_VMuktiEvent_SetDispositionButtonClickEvent);
                VMuktiHelper.RegisterEvent("SetDispositiForDetectedTone").VMuktiEvent    += new VMuktiEvents.VMuktiEventHandler(CtlDispositionRender_VMuktiEvent_SetDispositiForDetectedTone);
                cnvDispoButtons.IsEnabled = false;
                Application.Current.Exit += new ExitEventHandler(Current_Exit);

                this.btnEnterDispReason.Click  += new RoutedEventHandler(btnEnterDispReason_Click);
                this.btnCancelDispReason.Click += new RoutedEventHandler(btnCancelDispReason_Click);

                this.btnEnterCallBackReason.Click  += new RoutedEventHandler(btnEnterCallBackReason_Click);
                this.btnCancelCallBackReason.Click += new RoutedEventHandler(btnCancelCallBackReason_Click);

                this.btnCancelOtherDispReason.Click += new RoutedEventHandler(btnCancelOtherDispReason_Click);
                this.btnEnterOtherDispReason.Click  += new RoutedEventHandler(btnEnterOtherDispReason_Click);

                //this.Unloaded += new RoutedEventHandler(CtlDispositionRender_Unloaded);
                VMuktiHelper.CallEvent("AllModulesLoaded", this, null);
                VMuktiHelper.CallEvent("AllModulesLoadedForPredictive", this, null);
                VMuktiAPI.VMuktiHelper.RegisterEvent("SignOut").VMuktiEvent += new VMuktiEvents.VMuktiEventHandler(CtlDispositionRender_VMuktiEvent);
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "CtlDispositionRender()", "CtlDispositionRender.xaml.cs");
            }
        }
Esempio n. 2
0
        public PredictiveDialer(ModulePermissions[] MyPermissions)// done
        {
            InitializeComponent();

            try
            {
                Microsoft.Win32.RegistryKey rk  = Microsoft.Win32.Registry.LocalMachine;
                Microsoft.Win32.RegistryKey sk1 = rk.OpenSubKey("SOFTWARE\\Orkaudio");
                if (sk1 != null)
                {
                    StrOrkaInstallDirectory = (string)sk1.GetValue("Install_Dir");
                }
                else
                {
                    StrOrkaInstallDirectory = "";
                    VMuktiAPI.ClsException.WriteToLogFile("Oreka is not Installed");
                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "MyDialer()", "MyDialer.xaml.cs");
            }

            try
            {
                objChannelManager = new ClsChannelManager();

                btnManualDial.Click     += new RoutedEventHandler(btnManualDial_Click);
                btnPredictiveDial.Click += new RoutedEventHandler(btnPredictiveDial_Click);
                //this.Unloaded += new RoutedEventHandler(PredictiveDialer_Unloaded);
                Application.Current.MainWindow.Closing += new System.ComponentModel.CancelEventHandler(MainWindow_Closing);
                Application.Current.Exit += new ExitEventHandler(Current_Exit);

                VMuktiHelper.RegisterEvent("SetDispositionForPredictive").VMuktiEvent   += new VMuktiEvents.VMuktiEventHandler(SetDispositionForPredictive_VMuktiEvent);
                VMuktiHelper.RegisterEvent("SetChannelStatusForPredictive").VMuktiEvent += new VMuktiEvents.VMuktiEventHandler(SetChannelStatusForPredictive_VMuktiEvent);
                VMuktiHelper.RegisterEvent("AllModulesLoadedForPredictive").VMuktiEvent += new VMuktiEvents.VMuktiEventHandler(AllCtlLoaded_VMuktiEvent);
                VMuktiHelper.RegisterEvent("SetPredictiveDialerEnable").VMuktiEvent     += new VMuktiEvents.VMuktiEventHandler(SetPredictivePhoneDEnable_VMuktiEvent);
                VMuktiHelper.RegisterEvent("SetAgentNumber").VMuktiEvent += new VMuktiEvents.VMuktiEventHandler(SetAgentNumber_VMuktiEvent);

                try
                {
                    if (VMuktiAPI.VMuktiInfo.strExternalPBX == "true")
                    {
                        if (!objChannelManager.RegisterSIPUser())
                        {
                            SIPUserAvailable = false;
                        }
                        else
                        {
                            SIPUserAvailable = true;
                        }
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }


                ((svcCallInfo)objCallInfo).EntsvcJoin                  += new svcCallInfo.DelsvcJoin(PredictiveDialer_EntsvcJoin);
                ((svcCallInfo)objCallInfo).EntAddExtraCall             += new svcCallInfo.DelsvcAddExtraCall(PredictiveDialer_EntAddExtraCall);
                ((svcCallInfo)objCallInfo).EntRequestExtraCall         += new svcCallInfo.DelsvcRequestExtraCall(PredictiveDialer_EntRequestExtraCall);
                ((svcCallInfo)objCallInfo).EntSendExtraCall            += new svcCallInfo.DelsvcSendExtraCall(PredictiveDialer_EntSendExtraCall);
                ((svcCallInfo)objCallInfo).EntRemoveExtraCall          += new svcCallInfo.DelsvcRemoveExtraCall(PredictiveDialer_EntRemoveExtraCall);
                ((svcCallInfo)objCallInfo).EntRequestFunctionToExecute += new svcCallInfo.DelsvcRequestFunctionToExecute(PredictiveDialer_EntRequestFunctionToExecute);
                ((svcCallInfo)objCallInfo).EntReplyFunctionExecuted    += new svcCallInfo.DelsvcReplyFunctionExecuted(PredictiveDialer_EntReplyFunctionExecuted);
                ((svcCallInfo)objCallInfo).EntHangUpCall               += new svcCallInfo.DelsvcHangUpCall(PredictiveDialer_EntHangUpCall);
                ((svcCallInfo)objCallInfo).EntUnJoin += new svcCallInfo.DelsvcUnJoin(PredictiveDialer_EntUnJoin);

                if (CallInfoChannel != null && CallInfoChannel.State == CommunicationState.Opened)
                {
                    CallInfoChannel.Close();
                    CallInfoChannel = null;
                }
                CallInfoClient  = new VMuktiService.NetPeerClient();
                CallInfoChannel = (INetP2PBootStrapPredictiveServiceChannel)CallInfoClient.OpenClient <INetP2PBootStrapPredictiveServiceChannel>("net.tcp://" + VMuktiAPI.VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapPredictive", "P2PBootStrapPredictiveMesh", ref objCallInfo);
                CallInfoChannel.svcJoin(objChannelManager.AgentNumber.ToString(), objChannelManager.CurrentCampaingID.ToString());

                #region Starting Thread for DashBoard and uploading recorded files.

                thHostDashBoard = new Thread(new ParameterizedThreadStart(HostDashBoard));
                List <object> lstParams = new List <object>();
                lstParams.Add("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapDashBoard");
                lstParams.Add("P2PDashBoardMesh");
                thHostDashBoard.Start(lstParams);

                //File Recoreding
                tHostRecordedFiles = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(HostRecordedFiles));
                List <object> lstParams1 = new List <object>();
                lstParams1.Add("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapRecordedFiles");
                lstParams1.Add("P2PRecordedFiles");
                tHostRecordedFiles.Start(lstParams1);

                #endregion
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "PredictiveDialer(Outer)", "PredictiveDialer.xaml.cs");
            }
        }
Esempio n. 3
0
        public MyDialer(ModulePermissions[] MyPermissions)
        {
            try
            {
                channelManager = new ClsChannelManager();
                InitializeComponent();

                try
                {
                    Microsoft.Win32.RegistryKey rk  = Microsoft.Win32.Registry.LocalMachine;
                    Microsoft.Win32.RegistryKey sk1 = rk.OpenSubKey("SOFTWARE\\Orkaudio");
                    if (sk1 != null)
                    {
                        StrOrkaInstallDirectory = (string)sk1.GetValue("Install_Dir");
                    }
                    else
                    {
                        StrOrkaInstallDirectory = "";
                        VMuktiAPI.ClsException.WriteToLogFile("Oreka is not Installed");
                    }
                }
                catch (Exception ex)
                {
                    VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "MyDialer()", "MyDialer.xaml.cs");
                }

                #region Starting Thread for DashBoard and uploading recorded files.

                tHostDialer = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(HostDialerServices));
                List <object> lstParams = new List <object>();
                lstParams.Add("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapDashBoard");
                lstParams.Add("P2PDashBoardMesh");
                tHostDialer.Start(lstParams);

                //File Recoreding
                tHostRecordedFiles = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(HostRecordedFiles));
                List <object> lstParams1 = new List <object>();
                lstParams1.Add("net.tcp://" + VMuktiInfo.BootStrapIPs[0] + ":6000/NetP2PBootStrapRecordedFiles");
                lstParams1.Add("P2PRecordedFiles");
                tHostRecordedFiles.Start(lstParams1);

                #endregion

                btnAutomaticDial.Visibility = Visibility.Hidden;
                btnManualDial.Visibility    = Visibility.Hidden;
                _MyPermissions = MyPermissions;
                FncPermissionsReview();

                btnManualDial.Click    += new RoutedEventHandler(btnManualDial_Click);
                btnAutomaticDial.Click += new RoutedEventHandler(btnAutomaticDial_Click);

                Application.Current.Exit += new ExitEventHandler(Current_Exit);
                //this.Unloaded += new RoutedEventHandler(MyDialer_Unloaded);

                VMuktiHelper.RegisterEvent("SetChannelValues").VMuktiEvent += new VMuktiEvents.VMuktiEventHandler(MyDialer_SetChannelValues);
                VMuktiHelper.RegisterEvent("Logoff").VMuktiEvent           += new VMuktiEvents.VMuktiEventHandler(MyDialer_VMuktiEvent_Logoff);
                VMuktiHelper.RegisterEvent("AllModulesLoaded").VMuktiEvent += new VMuktiEvents.VMuktiEventHandler(MyDialer_VMuktiEvent_AllCtlLoaded);
                VMuktiHelper.RegisterEvent("SetDialerEnable").VMuktiEvent  += new VMuktiEvents.VMuktiEventHandler(MyDialer_VMuktiEvent_SetMyDialerEnable);
                VMuktiHelper.RegisterEvent("SetChannelStatus").VMuktiEvent += new VMuktiEvents.VMuktiEventHandler(MyDialer_VMuktiEvent_SetChannelStatus);
                VMuktiHelper.RegisterEvent("SetDisposition").VMuktiEvent   += new VMuktiEvents.VMuktiEventHandler(MyDialer_VMuktiEvent_SetDisposition);
                VMuktiHelper.RegisterEvent("SignOut").VMuktiEvent          += new VMuktiEvents.VMuktiEventHandler(MyDialer_VMuktiEvent);
                //VMuktiHelper.RegisterEvent("SetRecordedFiles").VMuktiEvent +=new VMuktiEvents.VMuktiEventHandler(MyDialer_VMuktiEvent_SetRecordedFiles);
                //VMuktiHelper.CallEvent("AllModulesLoaded", this, null);
                try
                {
                    if (VMuktiAPI.VMuktiInfo.strExternalPBX == "true")
                    {
                        if (!channelManager.RegisterSIPUser())
                        {
                            SIPUserAvailable = false;
                        }
                        else
                        {
                            SIPUserAvailable = true;
                        }
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "MyDialer()", "MyDialer.xaml.cs");
            }
        }