Ejemplo n.º 1
0
        public void HostRecordedFiles(object lstparam)
        {
            try
            {
                List <object> lstTempObj = (List <object>)lstparam;
                strUri = lstTempObj[0].ToString();

                NetPeerClient npcRecordedFiles = new NetPeerClient();
                ((NetP2PBootStrapRecordedFileDelegate)objRecordedFiles).EntsvcRecordedFileJoin   += new NetP2PBootStrapRecordedFileDelegate.delsvcRecordedFileJoin(PredictiveDialer_EntsvcRecordedFileJoin);
                ((NetP2PBootStrapRecordedFileDelegate)objRecordedFiles).EntsvcSendRecordedFiles  += new NetP2PBootStrapRecordedFileDelegate.delsvcSendRecordedFiles(PredictiveDialer_EntsvcSendRecordedFiles);
                ((NetP2PBootStrapRecordedFileDelegate)objRecordedFiles).EntsvcRecordedFileUnJoin += new NetP2PBootStrapRecordedFileDelegate.delsvcRecordedFileUnJoin(PredictiveDialer_EntsvcRecordedFileUnJoin);


                channelNetTcpUploadRecorededFiles = (INetP2PBootStrapRecordedFileChannel)npcRecordedFiles.OpenClient <INetP2PBootStrapRecordedFileChannel>(strUri, lstTempObj[1].ToString(), ref objRecordedFiles);

                clsMessageContract objContract = new clsMessageContract();
                objContract.uname      = VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName;
                objContract.fName      = "";
                objContract.fExtension = "";
                objContract.fLength    = 0;
                objContract.fStream    = new MemoryStream();

                channelNetTcpUploadRecorededFiles.svcRecordedFileJoin(objContract);
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "HostRecordedFiles()", "MyDialer.xaml.cs");
            }
        }
Ejemplo n.º 2
0
 public void svcBtnUp(clsMessageContract streamButtonUp)
 {
     if (EntsvcBtnUp != null)
     {
         EntsvcBtnUp(streamButtonUp);
     }
 }
Ejemplo n.º 3
0
 public void svcAllowControl(clsMessageContract streamControl)
 {
     if (EntsvcAllowControl != null)
     {
         EntsvcAllowControl(streamControl);
     }
 }
 public void svcRecordedFileUnJoin(clsMessageContract mcRFUnJoin)
 {
     if (EntsvcRecordedFileUnJoin != null)
     {
         EntsvcRecordedFileUnJoin(mcRFUnJoin);
     }
 }
 public void svcSendRecordedFiles(clsMessageContract mcSendRecordedFiles)
 {
     if (EntsvcSendRecordedFiles != null)
     {
         EntsvcSendRecordedFiles(mcSendRecordedFiles);
     }
 }
Ejemplo n.º 6
0
 public void svcAllowView(clsMessageContract streamView)
 {
     if (EntsvcAllowView != null)
     {
         EntsvcAllowView(streamView);
     }
 }
Ejemplo n.º 7
0
 public void svcSendXY(clsMessageContract streamXY)
 {
     if (EntsvcSendXY != null)
     {
         EntsvcSendXY(streamXY);
     }
 }
Ejemplo n.º 8
0
 public void svcBtnDown(clsMessageContract mcBtnDown)
 {
     if (EntsvcBtnDown != null)
     {
         EntsvcBtnDown(mcBtnDown);
     }
 }
Ejemplo n.º 9
0
 public void svcSetUserList(clsMessageContract streamSetUserList)
 {
     if (EntsvcSetUserList != null)
     {
         EntsvcSetUserList(streamSetUserList);
     }
 }
Ejemplo n.º 10
0
 public void svcStopControl(clsMessageContract streamUName)
 {
     if (EntsvcStopControl != null)
     {
         EntsvcStopControl(streamUName);
     }
 }
Ejemplo n.º 11
0
 public void svcSelectedDesktop(clsMessageContract mcSelectedDesktop)
 {
     if (EntsvcSelectedDesktop != null)
     {
         EntsvcSelectedDesktop(mcSelectedDesktop);
     }
 }
Ejemplo n.º 12
0
 public void svcStopControl(clsMessageContract mcStopControl)
 {
     if (EntsvcStopControl != null)
     {
         EntsvcStopControl(mcStopControl);
     }
 }
Ejemplo n.º 13
0
 public void svcSendMessage(clsMessageContract mcSendMessage)
 {
     if (EntsvcSendMessage != null)
     {
         EntsvcSendMessage(mcSendMessage);
     }
 }
Ejemplo n.º 14
0
 public void svcGetUserList(clsMessageContract mcGetUserList)
 {
     if (EntsvcGetUserList != null)
     {
         EntsvcGetUserList(mcGetUserList);
     }
 }
Ejemplo n.º 15
0
 public void svcJoin(clsMessageContract mcJoin)
 {
     if (EntsvcJoin != null)
     {
         EntsvcJoin(mcJoin);
     }
 }
Ejemplo n.º 16
0
 public void svcSendXY(clsMessageContract mcSendXY)
 {
     if (EntsvcSendXY != null)
     {
         EntsvcSendXY(mcSendXY);
     }
 }
Ejemplo n.º 17
0
 public void svcBtnUp(clsMessageContract mcBtnUp)
 {
     if (EntsvcBtnUp != null)
     {
         EntsvcBtnUp(mcBtnUp);
     }
 }
Ejemplo n.º 18
0
 public void svcJoin(clsMessageContract streamUName)
 {
     if (EntsvcJoin != null)
     {
         EntsvcJoin(streamUName);
     }
 }
Ejemplo n.º 19
0
 public void svcBtnDown(clsMessageContract streamButtonDown)
 {
     if (EntsvcBtnDown != null)
     {
         EntsvcBtnDown(streamButtonDown);
     }
 }
Ejemplo n.º 20
0
 public void svcSendMessage(clsMessageContract streamImage)
 {
     if (EntsvcSendMessage != null)
     {
         EntsvcSendMessage(streamImage);
     }
 }
Ejemplo n.º 21
0
        void RegPresentationp2pClient(string P2PUri)
        {
            try
            {
                NetPeerClient npcDummyPresentation = new NetPeerClient();
                objNetTcpPresentation = new clsNetTcpPresentation();
                ((clsNetTcpPresentation)objNetTcpPresentation).EntsvcJoin   += new clsNetTcpPresentation.delsvcJoin(P2PPresentationClient_EntsvcJoin);
                ((clsNetTcpPresentation)objNetTcpPresentation).EntsvcUnJoin += new clsNetTcpPresentation.delsvcUnJoin(P2PPresentationClient_EntsvcUnJoin);
                channelNettcpPresentation = (INetTcpPresentationChannel)npcDummyPresentation.OpenClient <INetTcpPresentationChannel>(P2PUri, P2PUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpPresentation);

                while (tempcounter < 20)
                {
                    try
                    {
                        clsMessageContract objContract = new clsMessageContract();
                        objContract.strFrom = UserName;
                        objContract.strMsg  = "";
                        channelNettcpPresentation.svcJoin(objContract);

                        tempcounter = 20;
                    }
                    catch
                    {
                        tempcounter++;
                        System.Threading.Thread.Sleep(1000);
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegPresentationp2pClient()", "P2PPresentationClient.cs");
            }
        }
Ejemplo n.º 22
0
 public void svcSelectedDesktop(clsMessageContract streamUName)
 {
     if (EntsvcSelectedDesktop != null)
     {
         EntsvcSelectedDesktop(streamUName);
     }
 }
Ejemplo n.º 23
0
 public void svcSendKey(clsMessageContract streamKey)
 {
     if (EntsvcSendKey != null)
     {
         EntsvcSendKey(streamKey);
     }
 }
Ejemplo n.º 24
0
 void P2PPresentationClient_EntsvcJoin(clsMessageContract mcJoin)
 {
     try
     {
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "P2PPresentationClient_EntsvcJoin()", "P2PPresentationClient.cs");
     }
 }
Ejemplo n.º 25
0
 public clsGetMessage svcGetMessages(clsMessageContract streamRecipient)
 {
     if (EntsvcGetMessages != null)
     {
         return(EntsvcGetMessages(streamRecipient));
     }
     else
     {
         return(null);
     }
 }
Ejemplo n.º 26
0
 public IAsyncResult BeginsvcGetSlide(clsMessageContract mcSRecipient, AsyncCallback callback, object asyncState)
 {
     if (EntBeginsvcGetSlide != null)
     {
         return(EntBeginsvcGetSlide(mcSRecipient, callback, asyncState));
     }
     else
     {
         return(null);
     }
 }
Ejemplo n.º 27
0
 void PresentationDummy_EntsvcSetSlide(clsMessageContract mcSetSlide)
 {
     try
     {
         channelNettcpPresentation.svcSetSlide(mcSetSlide);
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "PresentationDummy_EntsvcSetSlide()", "PresentationDummy.cs");
     }
 }
Ejemplo n.º 28
0
 void PresentationDummy_EntsvcGetUserList(clsMessageContract mcGetUserList)
 {
     try
     {
         channelNettcpPresentation.svcGetUserList(mcGetUserList);
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "PresentationDummy_EntsvcGetUserList()", "PresentationDummy.cs");
     }
 }
Ejemplo n.º 29
0
 void PresentationDummy_EntsvcJoin(clsMessageContract mcJoin)
 {
     try
     {
         lstNodes.Add(mcJoin.strFrom);
         hashMessages.Add(mcJoin.strFrom, new List <clsMessageContract>());
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "PresentationDummy_EntsvcJoin()", "PresentationDummy.cs");
     }
 }
Ejemplo n.º 30
0
 public void svcSendRecordedFiles(clsMessageContract mcSendRecordedFiles)
 {
     try
     {
         if (EntsvcSendRecordedFiles != null)
         {
             EntsvcSendRecordedFiles(mcSendRecordedFiles);
         }
     }
     catch (Exception ex)
     {
         ClsException.WriteToLogFile("svcSendRecordedFiles() :- NetP2PBootStrapRecordedFileDelegate.cs" + ex.Message);
     }
 }
 public void svcSendRecordedFiles(clsMessageContract mcSendRecordedFiles)
 {
     try
     {
         if (EntsvcSendRecordedFiles != null)
         {
             EntsvcSendRecordedFiles(mcSendRecordedFiles);
         }
     }
     catch (Exception ex)
     {
         ClsException.WriteToLogFile("svcSendRecordedFiles() :- NetP2PBootStrapRecordedFileDelegate.cs" + ex.Message);
     }
 }
 public void svcRecordedFileUnJoin(clsMessageContract mcRFUnJoin)
 {
     try
     {
         if (EntsvcRecordedFileUnJoin != null)
         {
             EntsvcRecordedFileUnJoin(mcRFUnJoin);
         }
     }
     catch (Exception ex)
     {
         ClsException.WriteToLogFile("svcRecordedFileUnJoin() :- NetP2PBootStrapRecordedFileDelegate.cs" + ex.Message);
     }
 }
Ejemplo n.º 33
0
        void fncRecordedFileUpload(long LeadID, DateTime CalledDate, long DispositionID)
        {
            try
            {
                string ZoneName = Dialer_AutoProgressive.Business.ClsDisposition.GetZoneName(LeadID);
                string DispositionName = channelManager.GetDispositionName(DispositionID);
                string PhoneNo = channelManager.GetPhoneNo(LeadID);
                
                //Point out to the file from a specific folder

                DateTime dt = DateTime.Now;
                string FilePath = StrOrkaInstallDirectory + @"\AudioRecordings\" + dt.ToString("yyyy") + "\\" + dt.ToString("MM") + "\\" + dt.ToString("dd") + "\\" + dt.ToString("HH");
                string[] FileName = Directory.GetFiles(FilePath);
                
                    //string fname = System.IO.Path.GetFileName(FileName[0]
                    string oldFilePath = FilePath + "\\" + System.IO.Path.GetFileName(FileName[0]);
                    string fext = System.IO.Path.GetExtension(FileName[0]);

                    string date = CalledDate.ToString("yyyy") + CalledDate.ToString("MM") + CalledDate.ToString("dd");
                    string time = CalledDate.ToString("HH") + "." + CalledDate.ToString("mm") + "." + CalledDate.ToString("ss");

                    string newFileName = DispositionName + "_" + ZoneName + "_" + date + "_" + time + "_" + PhoneNo + fext;
                    string newFilePath = FilePath.Trim() + "\\" + newFileName.Trim();

                    FileInfo fi = new FileInfo(oldFilePath);
                    if (File.Exists(newFilePath))
                        File.Delete(newFilePath);
                    else
                        File.Move(oldFilePath, newFilePath);



                    channelManager.ActiveChannel.RecordedFileName = newFileName;
                    FileStream fs = new FileStream(newFilePath, FileMode.Open, FileAccess.Read);
                    byte[] FileData = new byte[fs.Length];
                    fs.Read(FileData, 0, (int)fs.Length);
                    fs.Close();
                    //fs.Flush();

                    MemoryStream mms = new MemoryStream(FileData);
                    mms.Position = 0;

                    clsMessageContract objContract = new clsMessageContract();
                    objContract.uname = VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName;
                    objContract.fName = System.IO.Path.GetFileName(newFilePath);
                    objContract.fExtension = System.IO.Path.GetExtension(newFilePath);
                    objContract.fLength = mms.Length;
                    objContract.fStream = mms;

                    channelNetTcpUploadRecorededFiles.svcSendRecordedFiles(objContract);
                    File.Delete(newFilePath);
               
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex,"fncRecordedFileUpload","AutoDialer-MyDialer.xaml.cs");
            }
        }
Ejemplo n.º 34
0
 void MyDialer_EntsvcRecordedFileUnJoin(clsMessageContract mcRFUnJoin)
 { }
Ejemplo n.º 35
0
        void MyDialer_EntsvcSendRecordedFiles(clsMessageContract mcSendRecordedFiles)
        {
            try
            {
                //if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrentMachineIP == VMuktiAPI.VMuktiInfo.BootStrapIPs[0])
                //{
                //    if (VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName != mcSendRecordedFiles.uname)
                //    {
                //        System.Xml.XmlDocument ConfDoc = new System.Xml.XmlDocument();
                //        ConfDoc.Load(AppDomain.CurrentDomain.BaseDirectory.ToString() + "Configuration.xml");
                //        System.Xml.XmlNodeList xmlNodes = null;
                //        xmlNodes = ConfDoc.GetElementsByTagName("PhysicalPathOfVirtualDirectory");
                //        string VirtualDirectoryPath = xmlNodes[0].Attributes["Value"].Value.ToString();

                //        if (!Directory.Exists(VirtualDirectoryPath + "\\AudioRecordedFiles"))
                //        {
                //            Directory.CreateDirectory(VirtualDirectoryPath + "\\AudioRecordedFiles");
                //        }

                //        byte[] byteArray = fncStreamToByteArry(mcSendRecordedFiles.fStream);

                //        FileStream fs = new FileStream(VirtualDirectoryPath, FileMode.OpenOrCreate, FileAccess.Write);
                //        fs.Seek(0, SeekOrigin.Begin);
                //        fs.Write(byteArray, 0, byteArray.Length);

                //        fs.Close();

                //        //MessageBox.Show("File has been uploaded successfully on server");

                //    }
                //}
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "ctlSearch_EntsvcJoin()", "ctlSearch.xaml.cs");
            }
        }
Ejemplo n.º 36
0
        //Hosting RecordedFiles Service
        public void HostRecordedFiles(object lstparam)
        {
            try
            {
                List<object> lstTempObj = (List<object>)lstparam;
                strUri = lstTempObj[0].ToString();

                NetPeerClient npcRecordedFiles = new NetPeerClient();
                ((NetP2PBootStrapRecordedFileDelegate)objRecordedFiles).EntsvcRecordedFileUnJoin +=new NetP2PBootStrapRecordedFileDelegate.delsvcRecordedFileUnJoin(MyDialer_EntsvcRecordedFileUnJoin);
                ((NetP2PBootStrapRecordedFileDelegate)objRecordedFiles).EntsvcSendRecordedFiles+=new NetP2PBootStrapRecordedFileDelegate.delsvcSendRecordedFiles(MyDialer_EntsvcSendRecordedFiles);
                ((NetP2PBootStrapRecordedFileDelegate)objRecordedFiles).EntsvcRecordedFileJoin+=new NetP2PBootStrapRecordedFileDelegate.delsvcRecordedFileJoin(MyDialer_EntsvcRecordedFileJoin);

                channelNetTcpUploadRecorededFiles = (INetP2PBootStrapRecordedFileChannel)npcRecordedFiles.OpenClient<INetP2PBootStrapRecordedFileChannel>(strUri, lstTempObj[1].ToString(), ref objRecordedFiles);

                clsMessageContract objContract = new clsMessageContract();
                objContract.uname = VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName;
                objContract.fName = "";
                objContract.fExtension = "";
                objContract.fLength = 0;
                objContract.fStream = new MemoryStream();

                channelNetTcpUploadRecorededFiles.svcRecordedFileJoin(objContract);
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "HostRecordedFiles()", "MyDialer.xaml.cs");
            }
        }