コード例 #1
0
        public void ClosePod()
        {
            //call unjoin method
            try
            {

                if (_MyMeetingRole == MeetingRoles.Host)
                {
                    if (channelNetP2P != null)
                    {
                        channelNetP2P.svcClose(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName);
                    }
                }

                foreach (ctlUserVideo ctl1 in cnvVideos.Children)
                {
                    ctl1.ClosePod();
                }
                if (dispTimer != null)
                {
                    dispTimer.Stop();
                }
                if (channelHttp != null)
                {
                    channelHttp = null;
                }
                if (channelNetP2P != null && channelNetP2P.State == CommunicationState.Opened)
                {
                    channelNetP2P.svcUnJoin(VMuktiInfo.CurrentPeer.DisplayName);
                }

                if (channelNetP2P != null)
                {
                    channelNetP2P.Close();
                    channelNetP2P.Dispose();
                    channelNetP2P = null;
                }

                cnvVideos.Children.Clear();
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "ClosePod", "ctlVideo.xaml.cs");
            }
        }
コード例 #2
0
        public void Dispose()
        {
            //MessageBox.Show("Dispose of chat called");
			try
			{		
                
				if (channelNetP2P != null)
				{
                    channelNetP2P.Close();
                    channelNetP2P.Dispose();
                    channelNetP2P = null;
				}
				if (channelHttp != null)
				{
					channelHttp = null;
				}
                GC.Collect();
                GC.WaitForPendingFinalizers();
                //GC.SuppressFinalize(this);
			}
			catch (Exception exp)
			{
                VMuktiAPI.VMuktiHelper.ExceptionHandler(exp, "Dispose", "ctlVideo.xaml.cs");             
			}
        }
コード例 #3
0
 void Current_Exit(object sender, ExitEventArgs e)
 {
     try
     {
         if (dispTimer != null)
         {
             dispTimer.Stop();
         }
         if (channelHttp != null)
         {
             channelHttp = null;
         }
         if (channelNetP2P != null && channelNetP2P.State == CommunicationState.Opened)
         {
             channelNetP2P.svcUnJoin(VMuktiInfo.CurrentPeer.DisplayName);
             channelNetP2P.Dispose();
             channelNetP2P = null;
         }
         cnvVideos.Children.Clear();
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "Current_Exit", "ctlVideo.xaml.cs");             
     }
 }