コード例 #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");
            }
        }
コード例 #2
0
 public void svcBtnUp(clsMessageContract streamButtonUp)
 {
     if (EntsvcBtnUp != null)
     {
         EntsvcBtnUp(streamButtonUp);
     }
 }
コード例 #3
0
 public void svcAllowControl(clsMessageContract streamControl)
 {
     if (EntsvcAllowControl != null)
     {
         EntsvcAllowControl(streamControl);
     }
 }
コード例 #4
0
 public void svcRecordedFileUnJoin(clsMessageContract mcRFUnJoin)
 {
     if (EntsvcRecordedFileUnJoin != null)
     {
         EntsvcRecordedFileUnJoin(mcRFUnJoin);
     }
 }
コード例 #5
0
 public void svcSendRecordedFiles(clsMessageContract mcSendRecordedFiles)
 {
     if (EntsvcSendRecordedFiles != null)
     {
         EntsvcSendRecordedFiles(mcSendRecordedFiles);
     }
 }
コード例 #6
0
 public void svcAllowView(clsMessageContract streamView)
 {
     if (EntsvcAllowView != null)
     {
         EntsvcAllowView(streamView);
     }
 }
コード例 #7
0
 public void svcSendXY(clsMessageContract streamXY)
 {
     if (EntsvcSendXY != null)
     {
         EntsvcSendXY(streamXY);
     }
 }
コード例 #8
0
 public void svcBtnDown(clsMessageContract mcBtnDown)
 {
     if (EntsvcBtnDown != null)
     {
         EntsvcBtnDown(mcBtnDown);
     }
 }
コード例 #9
0
 public void svcSetUserList(clsMessageContract streamSetUserList)
 {
     if (EntsvcSetUserList != null)
     {
         EntsvcSetUserList(streamSetUserList);
     }
 }
コード例 #10
0
 public void svcStopControl(clsMessageContract streamUName)
 {
     if (EntsvcStopControl != null)
     {
         EntsvcStopControl(streamUName);
     }
 }
コード例 #11
0
 public void svcSelectedDesktop(clsMessageContract mcSelectedDesktop)
 {
     if (EntsvcSelectedDesktop != null)
     {
         EntsvcSelectedDesktop(mcSelectedDesktop);
     }
 }
コード例 #12
0
 public void svcStopControl(clsMessageContract mcStopControl)
 {
     if (EntsvcStopControl != null)
     {
         EntsvcStopControl(mcStopControl);
     }
 }
コード例 #13
0
 public void svcSendMessage(clsMessageContract mcSendMessage)
 {
     if (EntsvcSendMessage != null)
     {
         EntsvcSendMessage(mcSendMessage);
     }
 }
コード例 #14
0
 public void svcGetUserList(clsMessageContract mcGetUserList)
 {
     if (EntsvcGetUserList != null)
     {
         EntsvcGetUserList(mcGetUserList);
     }
 }
コード例 #15
0
 public void svcJoin(clsMessageContract mcJoin)
 {
     if (EntsvcJoin != null)
     {
         EntsvcJoin(mcJoin);
     }
 }
コード例 #16
0
 public void svcSendXY(clsMessageContract mcSendXY)
 {
     if (EntsvcSendXY != null)
     {
         EntsvcSendXY(mcSendXY);
     }
 }
コード例 #17
0
 public void svcBtnUp(clsMessageContract mcBtnUp)
 {
     if (EntsvcBtnUp != null)
     {
         EntsvcBtnUp(mcBtnUp);
     }
 }
コード例 #18
0
 public void svcJoin(clsMessageContract streamUName)
 {
     if (EntsvcJoin != null)
     {
         EntsvcJoin(streamUName);
     }
 }
コード例 #19
0
 public void svcBtnDown(clsMessageContract streamButtonDown)
 {
     if (EntsvcBtnDown != null)
     {
         EntsvcBtnDown(streamButtonDown);
     }
 }
コード例 #20
0
 public void svcSendMessage(clsMessageContract streamImage)
 {
     if (EntsvcSendMessage != null)
     {
         EntsvcSendMessage(streamImage);
     }
 }
コード例 #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");
            }
        }
コード例 #22
0
 public void svcSelectedDesktop(clsMessageContract streamUName)
 {
     if (EntsvcSelectedDesktop != null)
     {
         EntsvcSelectedDesktop(streamUName);
     }
 }
コード例 #23
0
 public void svcSendKey(clsMessageContract streamKey)
 {
     if (EntsvcSendKey != null)
     {
         EntsvcSendKey(streamKey);
     }
 }
コード例 #24
0
 void P2PPresentationClient_EntsvcJoin(clsMessageContract mcJoin)
 {
     try
     {
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "P2PPresentationClient_EntsvcJoin()", "P2PPresentationClient.cs");
     }
 }
コード例 #25
0
 public clsGetMessage svcGetMessages(clsMessageContract streamRecipient)
 {
     if (EntsvcGetMessages != null)
     {
         return(EntsvcGetMessages(streamRecipient));
     }
     else
     {
         return(null);
     }
 }
コード例 #26
0
 public IAsyncResult BeginsvcGetSlide(clsMessageContract mcSRecipient, AsyncCallback callback, object asyncState)
 {
     if (EntBeginsvcGetSlide != null)
     {
         return(EntBeginsvcGetSlide(mcSRecipient, callback, asyncState));
     }
     else
     {
         return(null);
     }
 }
コード例 #27
0
 void PresentationDummy_EntsvcSetSlide(clsMessageContract mcSetSlide)
 {
     try
     {
         channelNettcpPresentation.svcSetSlide(mcSetSlide);
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "PresentationDummy_EntsvcSetSlide()", "PresentationDummy.cs");
     }
 }
コード例 #28
0
 void PresentationDummy_EntsvcGetUserList(clsMessageContract mcGetUserList)
 {
     try
     {
         channelNettcpPresentation.svcGetUserList(mcGetUserList);
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "PresentationDummy_EntsvcGetUserList()", "PresentationDummy.cs");
     }
 }
コード例 #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");
     }
 }
コード例 #30
0
 public void svcSendRecordedFiles(clsMessageContract mcSendRecordedFiles)
 {
     try
     {
         if (EntsvcSendRecordedFiles != null)
         {
             EntsvcSendRecordedFiles(mcSendRecordedFiles);
         }
     }
     catch (Exception ex)
     {
         ClsException.WriteToLogFile("svcSendRecordedFiles() :- NetP2PBootStrapRecordedFileDelegate.cs" + ex.Message);
     }
 }
コード例 #31
0
 public void svcSendRecordedFiles(clsMessageContract mcSendRecordedFiles)
 {
     try
     {
         if (EntsvcSendRecordedFiles != null)
         {
             EntsvcSendRecordedFiles(mcSendRecordedFiles);
         }
     }
     catch (Exception ex)
     {
         ClsException.WriteToLogFile("svcSendRecordedFiles() :- NetP2PBootStrapRecordedFileDelegate.cs" + ex.Message);
     }
 }
コード例 #32
0
 public void svcRecordedFileUnJoin(clsMessageContract mcRFUnJoin)
 {
     try
     {
         if (EntsvcRecordedFileUnJoin != null)
         {
             EntsvcRecordedFileUnJoin(mcRFUnJoin);
         }
     }
     catch (Exception ex)
     {
         ClsException.WriteToLogFile("svcRecordedFileUnJoin() :- NetP2PBootStrapRecordedFileDelegate.cs" + ex.Message);
     }
 }
コード例 #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");
            }
        }
コード例 #34
0
 void MyDialer_EntsvcRecordedFileUnJoin(clsMessageContract mcRFUnJoin)
 { }
コード例 #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");
            }
        }
コード例 #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");
            }
        }