Пример #1
0
        void GlobalVariable()
        {
            try
            {
                disposed = false;

                objDelGetMsg = new DelGetMessage(delGetMessage);

                objDelPageSpecialMsg = new DelPageSpecialMsg(delPageSpecialMsg);
                objDelPageBuddyRetSetSpecialMsg = new DelPageBuddyRetSetSpecialMsg(delPageBuddyRetSetSpecialMsg);

                objDelRemoveDraggedBuddy = new DelRemoveDraggedBuddy(delRemoveDraggedBuddy);
                objDelAsyncGetMsg = new DelAsyncGetMessage(delAsyncGetMessage);

                #region Monitoring System

                objNetTcpConsole = new ClsNetP2PConsoleDelegates();
                blnISConsole = false;
                arr = new byte[5000];
                dictConsoleLog = new Dictionary<string, Stream>();

                #endregion

                #region Disaster Recovery

                delBandWidthUsage = new DelBandWidthUsage(fncBandWidthUsage);

                #endregion

                #region Download Zip For Nodes

                al = new ArrayList();

                #endregion

                #region Bandwidth

                dblbandwidthdl = 0;
                dblbandwidthul = 0;
                count = 0;

                objDelDownload = new DelDownload(delBandwidthDownload);
                objDelUpload = new DelUpload(delBandwidthUpload);
                objBandwidth = new DelBandwidth(BandwidthUploadSpeed);

                #endregion

                #region Multiple Buddy Selection

                objDelSetSpecialMsg4Buddies = new DelSetSpecialMsg4Buddies(delSetSpecialMsg4Buddies);
                objDelSetSpecialMsgBuddiesClick = new DelSetSpecialMsgBuddiesClick(delSetSpecialMsgBuddiesClick);

                #endregion

                
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "GlobalVariable()", "pgHome.xaml.cs");
            }
        }
Пример #2
0
        private void OpenConsoleClient()
        {
            try
            {
                npc = new NetPeerClient();

                ClsNetP2PConsoleDelegates objP2PConsoleDel = new ClsNetP2PConsoleDelegates();

                objP2PConsoleDel.EntsvcNetP2PConsoleJoin += new ClsNetP2PConsoleDelegates.DelsvcNetP2PConsoleJoin(pgHome_EntsvcNetP2PConsoleJoin);
                objP2PConsoleDel.EntsvcNetP2PConsoleSendMsg += new ClsNetP2PConsoleDelegates.DelsvcNetP2PConsoleSendMsg(pgHome_EntsvcNetP2PConsoleSendMsg);
                objP2PConsoleDel.EntsvcNetP2PConsoleGetLog += new ClsNetP2PConsoleDelegates.DelsvcNetP2PConsoleGetLog(pgHome_EntsvcNetP2PConsoleGetLog);
                objP2PConsoleDel.EntsvcNetP2PConsoleSendLog += new ClsNetP2PConsoleDelegates.DelsvcNetP2pConsoleSendLog(pgHome_EntsvcNetP2PConsoleSendLog);
                objP2PConsoleDel.EntsvcNetP2PConsoleUnJoin += new ClsNetP2PConsoleDelegates.DelsvcNetP2PConsoleUnJoin(pgHome_EntsvcNetP2PConsoleUnJoin);

                objNetTcpConsole = objP2PConsoleDel;

                objChannel = (INetP2PConsoleChannel)npc.OpenClient<INetP2PConsoleChannel>("net.tcp://" + VMuktiAPI.VMuktiInfo.BootStrapIPs[0] + ":8080/NetP2PConsole", "ConsoleMesh", ref objNetTcpConsole);
                objChannel.svcNetP2ConsoleJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName);
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "openConsoleClient()", "pgHome.xaml.cs");
            }

        }