예제 #1
0
 void RegWhiteBoardp2pClient(string P2PUri)
 {
     try
     {
         NetPeerClient npcDummyWhiteBoardp = new NetPeerClient();
         objNetTcpWhiteBoardp = new clsNetTcpWhiteboard();
         ((clsNetTcpWhiteboard)objNetTcpWhiteBoardp).EJoin        += new clsNetTcpWhiteboard.UserJoin(P2PWhiteBoardClient_EJoin);
         ((clsNetTcpWhiteboard)objNetTcpWhiteBoardp).ESignOutChat += new clsNetTcpWhiteboard.SignOutChat(P2PWhiteBoardClient_ESignOutChat);
         channelNettcpWhiteBoard = (INetTcpWhiteboardChannel)npcDummyWhiteBoardp.OpenClient <INetTcpWhiteboardChannel>(P2PUri, P2PUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpWhiteBoardp);
         VMuktiAPI.ClsException.WriteToLogFile("P2PUri: " + P2PUri + " P2PUri.ToString().Split(':')[2].Split('/')[2] " + P2PUri.ToString().Split(':')[2].Split('/')[2].ToString());
         while (tempcounter < 20)
         {
             try
             {
                 channelNettcpWhiteBoard.svcJoin(UserName);
                 tempcounter = 20;
             }
             catch
             {
                 tempcounter++;
                 System.Threading.Thread.Sleep(1000);
             }
         }
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegWhiteBoardP2pClient()", "p2pWhiteBoardClient.cs");
     }
 }
        void RegWhiteBoardp2pClient(string P2PUri)
        {
            try
            {
                NetPeerClient npcDummyWhiteBoardp = new NetPeerClient();
                objNetTcpWhiteBoardp = new clsNetTcpWhiteboard();
                ((clsNetTcpWhiteboard)objNetTcpWhiteBoardp).EJoin += new clsNetTcpWhiteboard.UserJoin(P2PWhiteBoardClient_EJoin);
                ((clsNetTcpWhiteboard)objNetTcpWhiteBoardp).ESignOutChat += new clsNetTcpWhiteboard.SignOutChat(P2PWhiteBoardClient_ESignOutChat);
                channelNettcpWhiteBoard = (INetTcpWhiteboardChannel)npcDummyWhiteBoardp.OpenClient<INetTcpWhiteboardChannel>(P2PUri, P2PUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpWhiteBoardp);
                VMuktiAPI.ClsException.WriteToLogFile("P2PUri: " + P2PUri + " P2PUri.ToString().Split(':')[2].Split('/')[2] " + P2PUri.ToString().Split(':')[2].Split('/')[2].ToString());
                while (tempcounter < 20)
                {
                    try
                    {
                        channelNettcpWhiteBoard.svcJoin(UserName);
                        tempcounter = 20;
                    }
                    catch
                    {
                        tempcounter++;
                        System.Threading.Thread.Sleep(1000);
                    }
                }
            }
            catch (Exception ex)
            {

                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegWhiteBoardP2pClient()", "p2pWhiteBoardClient.cs");


            }
        }
예제 #3
0
        void RegNetP2PClient(object netP2pUri)
        {
            try
            {
                NetPeerClient npcDummyWhiteboard = new NetPeerClient();
                objNetTcpWhiteboard = new clsNetTcpWhiteboard();

                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EJoin        += new clsNetTcpWhiteboard.UserJoin(NetP2PWhiteboard_EJoin);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EClear       += new clsNetTcpWhiteboard.ClearCnv(NetP2PWhiteboard_EClear);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EColor       += new clsNetTcpWhiteboard.ChangeColor(NetP2PWhiteboard_EColor);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EEllipse     += new clsNetTcpWhiteboard.DrawEllipse(NetP2PWhiteboard_EEllipse);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).ELine        += new clsNetTcpWhiteboard.DrawLine(NetP2PWhiteboard_ELine);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).ERect        += new clsNetTcpWhiteboard.DrawRect(NetP2PWhiteboard_ERect);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EStamper     += new clsNetTcpWhiteboard.DrawStamper(NetP2PWhiteboard_EStamper);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EStrokes     += new clsNetTcpWhiteboard.DrawStrokes(NetP2PWhiteboard_EStrokes);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EText        += new clsNetTcpWhiteboard.ChangeText(NetP2PWhiteboard_EText);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EThickness   += new clsNetTcpWhiteboard.ChangeThickness(NetP2PWhiteboard_EThickness);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).ETTool       += new clsNetTcpWhiteboard.DrawTextTool(NetP2PWhiteboard_ETTool);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EGetUserList += new clsNetTcpWhiteboard.GetUserList(NetP2PWhiteboard_GetUserList);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).ESetUserList += new clsNetTcpWhiteboard.SetUserList(NetP2PWhiteboard_SetUserList);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).ESignOutChat += new clsNetTcpWhiteboard.SignOutChat(NetP2PWhiteboard_ESignOutChat);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EUnjoin      += new clsNetTcpWhiteboard.Unjoin(NetP2PWhiteboard_EUnjoin);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EFontSize    += new clsNetTcpWhiteboard.ChangeFontSize(NetP2PWhiteboard_EFontSize);
                VMuktiAPI.ClsException.WriteToLogFile("Opening P2pClient on URI: " + netP2pUri + "With mesh: " + netP2pUri.ToString().Split(':')[2].Split('/')[2].ToString());
                channelNettcpWhiteboard = (INetTcpWhiteboardChannel)npcDummyWhiteboard.OpenClient <INetTcpWhiteboardChannel>(netP2pUri.ToString(), netP2pUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpWhiteboard);
                VMuktiAPI.ClsException.WriteToLogFile("Client opened Successfully");

                while (tempcounter < 20)
                {
                    try
                    {
                        channelNettcpWhiteboard.svcJoin(UserName);
                        tempcounter = 20;
                    }
                    catch
                    {
                        tempcounter++;
                        System.Threading.Thread.Sleep(1000);
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegNetP2PClient()", "WhiteBoardDummy.cs");
            }
        }
예제 #4
0
        void RegNetP2PClient(object netP2pUri)
        {
            try
            {
                NetPeerClient npcDummyWhiteboard = new NetPeerClient();
                objNetTcpWhiteboard = new clsNetTcpWhiteboard();

                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EJoin += new clsNetTcpWhiteboard.UserJoin(NetP2PWhiteboard_EJoin);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EClear += new clsNetTcpWhiteboard.ClearCnv(NetP2PWhiteboard_EClear);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EColor += new clsNetTcpWhiteboard.ChangeColor(NetP2PWhiteboard_EColor);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EEllipse += new clsNetTcpWhiteboard.DrawEllipse(NetP2PWhiteboard_EEllipse);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).ELine += new clsNetTcpWhiteboard.DrawLine(NetP2PWhiteboard_ELine);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).ERect += new clsNetTcpWhiteboard.DrawRect(NetP2PWhiteboard_ERect);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EStamper += new clsNetTcpWhiteboard.DrawStamper(NetP2PWhiteboard_EStamper);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EStrokes += new clsNetTcpWhiteboard.DrawStrokes(NetP2PWhiteboard_EStrokes);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EText += new clsNetTcpWhiteboard.ChangeText(NetP2PWhiteboard_EText);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EThickness += new clsNetTcpWhiteboard.ChangeThickness(NetP2PWhiteboard_EThickness);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).ETTool += new clsNetTcpWhiteboard.DrawTextTool(NetP2PWhiteboard_ETTool);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EGetUserList += new clsNetTcpWhiteboard.GetUserList(NetP2PWhiteboard_GetUserList);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).ESetUserList += new clsNetTcpWhiteboard.SetUserList(NetP2PWhiteboard_SetUserList);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).ESignOutChat += new clsNetTcpWhiteboard.SignOutChat(NetP2PWhiteboard_ESignOutChat);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EUnjoin += new clsNetTcpWhiteboard.Unjoin(NetP2PWhiteboard_EUnjoin);
                ((clsNetTcpWhiteboard)objNetTcpWhiteboard).EFontSize += new clsNetTcpWhiteboard.ChangeFontSize(NetP2PWhiteboard_EFontSize);                
                VMuktiAPI.ClsException.WriteToLogFile("Opening P2pClient on URI: " + netP2pUri + "With mesh: " + netP2pUri.ToString().Split(':')[2].Split('/')[2].ToString());
                channelNettcpWhiteboard = (INetTcpWhiteboardChannel)npcDummyWhiteboard.OpenClient<INetTcpWhiteboardChannel>(netP2pUri.ToString(), netP2pUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpWhiteboard);
                VMuktiAPI.ClsException.WriteToLogFile("Client opened Successfully");

                while (tempcounter < 20)
                {
                    try
                    {
                        channelNettcpWhiteboard.svcJoin(UserName);
                        tempcounter = 20;
                    }
                    catch
                    {
                        tempcounter++;
                        System.Threading.Thread.Sleep(1000);
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegNetP2PClient()", "WhiteBoardDummy.cs");
            }
        }