Example #1
0
 public DocumentSharingEx(WebMeeting.Common.DocumentMessageType type,int session,string ServerIP,string ServerUsername,string ServerPassword,string meetingID)
 {
     m_DocumentType = type;
     sessionID = session;
     m_serverIP = ServerIP;
     m_username = ServerUsername;
     m_password = ServerPassword;
     m_meetingID = meetingID;
 }
Example #2
0
        public void SendMessage(ref WebMeeting.Common.AudioMessage m)
        {
            currentFrame=m;

            ((IMessageReceiver) this._dispatcher.TransparentProxy).ReceiveAudioMessage(m);

            //foreach( IMessageReceiver iMessageReceiver in clientList)
            //	{
            //		iMessageReceiver.ReceiveAudioMessage(m);
            //	}
        }
Example #3
0
 public DocumentSharingEx(WebMeeting.Common.DocumentMessageType type,int session)
 {
     m_DocumentType = type;
     sessionID = session;
 }
        private void startSlideShow(object sender,WebMeeting.Client.ManageContent.DartbordEventArgs e)
        {
            if(e.CurrentStatus =="completed")
            {
                try
                {
                    //MessageBox.Show("==> manage content presentatiuon 400");

                    ClientUI.getInstance().ShareMyDocumentByContentManagement(e.UploadPath);
                //	nCountOpenFiles=1;
                //	this.flagToUnique=false;
                    //this.StopNavigation=false;
                }
                catch(Exception ex)
                {
                    MessageBox.Show("error downloading " +  ex.ToString());
                }
            }
            //			else
            //			{
            //				//nCountOpenFiles=1;
            //				//this.flagToUnique=false;
            //				//this.StopNavigation=false;
            //			}
        }
Example #5
0
 public void ChangeWindowState(WebMeeting.Common.PollType pollType)
 {
     testPollType = pollType;
     switch(pollType)
     {
         case PollType.FreeResponse:
             panel1.Controls.Clear();
             panel1.Controls.Add(groupTextBox);
             panel1.Controls.Remove(groupRadio);
             groupTextBox.Dock = DockStyle.Fill;
             break;
         case PollType.SingleSelect:
             panel1.Controls.Clear();
             panel1.Controls.Add(groupRadio);
             panel1.Controls.Remove(groupCheckboxes);
             groupRadio.Dock = DockStyle.Fill;
             break;
         case PollType.MultipleSelect:
             panel1.Controls.Clear();
             panel1.Controls.Add(groupCheckboxes);
             panel1.Controls.Remove(groupRadio);
             groupCheckboxes.Dock = DockStyle.Fill;
             break;
         case PollType.TrueFalse:
             panel1.Controls.Clear();
             panel1.Controls.Add(groupRadio);
             panel1.Controls.Remove(groupCheckboxes);
             groupRadio.Dock = DockStyle.Fill;
             break;
         case PollType.YesNo:
             panel1.Controls.Clear();
             panel1.Controls.Add(groupRadio);
             panel1.Controls.Remove(groupCheckboxes);
             groupRadio.Dock = DockStyle.Fill;
             break;
     }
 }
        private void ProcessMessageManageContent(WebMeeting.Common.DocumentSharing DocSharing)
        {
            try
            {
            //				if(DocSharing!=null)
            //				{
            //					string[] strSplit=DocSharing.DownloadURL.Split(@",");
            //
            //
            //				}

                if(DocSharing != null)
                {

            //					MessageBox.Show(DocSharing.DownloadURL);
                    string[] strLen=DocSharing.DownloadURL.Split(',');
            //					MessageBox.Show(strLen.Length.ToString());
                    if(strLen.Length>0)
                    {
                        DocSharing.DownloadURL=strLen[1];

                    }
                    //WebMeeting.Common.DocumentSharing DocSharing = (WebMeeting.Common.DocumentSharing)obj;

                    //DocumentSharingEx DocEx = new WebMeeting.Client.DocumentSharingEx(DocSharing.DocumentType,DocSharing.sessionID);
                    //DocEx.OnStatusUpdateFunction = new WebMeeting.Client.DocumentSharingEx.OnStatusUpdate(OnStatusUpdate);

                    string localFilePath = this.strRemoteUrl;//this.DocumentFilePath;
                    SetControls(false);

            //					if(!m_DocumentDownloaded) // these checks are for ppt and xls sharing cause there can be Next and Previous movement messages
            //					{ // keep track if the presentation has already been downloaded don't download it again. just move the the current page of presentation
            //						if(!DocEx.RecieveDocumentSharing(obj,out localFilePath)) //Failed
            //						{
            //							this.MessagePool.Remove(obj);
            //
            //							//						alert.ShowMessage(4,"Unable to download document to webserver","WebMeeting",MessageBoxButtons.OK,MessageBoxIcon.Error);
            //							//Process failure
            //
            //							return;
            //						}
            //						else
            //							this.m_DocumentDownloaded = true;
            //
            //						this.DocumentFilePath = localFilePath;
            //
            //						annotationBrowser.sheetsEventStores = new ArrayList();
            //						annotationBrowser.sheetsEventStores.Add(annotationBrowser.eventStore);
            //						/*  // only for checking purpose
            //						try
            //						{
            //							for(int i = 1 ;i < DocSharing.TotalPages ; i++) //Create Transparent Annotation windows over the
            //								//browser control for drawing on each presentation page.
            //							{
            //								annotationBrowser.eventStore = new ArrayList();
            //								annotationBrowser.sheetsEventStores.Add(annotationBrowser.eventStore );
            //							}
            //						}
            //						catch(Exception ee)
            //						{
            //							annotationBrowser.eventStore = new ArrayList();
            //							annotationBrowser.sheetsEventStores.Add(annotationBrowser.eventStore );
            //							ee = ee;
            //						}
            //						*/
            //
            //
            //						this.documentTitle = Path.GetFileNameWithoutExtension(DocumentFilePath);
            //						AddSaveMenus();
            //
            //
            //					}

                    /////////////

                    //this.DocumentFilePath = localFilePath;
                    //this.pictureCount = DocSharing.TotalPages;
                    //synchornizePPTAnnotations();
            //					m_DocumentMessage = DocSharing;

                    switch(DocSharing.DocumentType)
                    {
                        case DocumentMessageType.typeDocument:
                        {//Load the Word Document
                            object oUrl = DocSharing.DownloadURL;
                            object o = new object();
                            if(!m_bVisited)
                            {
                                this.axWebBrowser1.Navigate2(ref oUrl,ref o,ref o,ref o,ref o);
                                lblStatus.Text ="Document " + Path.GetFileName(localFilePath);
                                m_bVisited = true;
                            }
                        }
                            break;
                        case DocumentMessageType.typePresentation:
                        {
                            //this.DocumentFilePath = localFilePath;
                            //localFilePath = Directory.GetParent(localFilePath).FullName;
                            //object oUrl = localFilePath + "\\slide" + DocSharing.CurrentPage.ToString() + ".jpg";
                            object oUrl = DocSharing.DownloadURL+ DocSharing.CurrentPage.ToString() + ".jpg";
                            object o = new object();
                            if(currentImage != DocSharing.CurrentPage)
                            {
                                this.axWebBrowser1.Navigate2(ref oUrl,ref o,ref o,ref o,ref o);
                            }

                            currentImage = DocSharing.CurrentPage;
                            pictureCount = DocSharing.TotalPages;
                            /////////////////////////////////////////

                            annotationBrowser.currentSlideNo=currentImage ;
                            /////////////////////////////////////////
                            lblStatus.Text = "Slide " + currentImage.ToString() + " of " + pictureCount.ToString();

                        }break;
                        case DocumentMessageType.typePDF:
                        {
                            //object oUrl = Path.GetDirectoryName(localFilePath) + "\\"+  Path.GetFileNameWithoutExtension(localFilePath) + "\\index.htm";
                            object oUrl=DocSharing.DownloadURL;
                            object o = new object();
                            if(!m_bVisited)
                            {
                                this.axWebBrowser1.Navigate2(ref oUrl,ref o,ref o,ref o,ref o);
                                m_bVisited = true;
                            }
                        }
                            break;
                        case DocumentMessageType.typeExcel:
                        {
                            object oUrl = DocSharing.DownloadURL;
                            object o = new object();
                            if((this.pictureCount == 1) || (DocSharing.TotalPages == 1))
                            {
                                lblStatus.Text = "Book 1 of 1";
                                this.axWebBrowser1.Navigate2(ref oUrl,ref o,ref o,ref o,ref o);
                            }
                            else
                            {
                                string basePath = DocSharing.DownloadURL;
                                //basePath +=  "\\" + Path.GetFileNameWithoutExtension(localFilePath) + "_files\\sheet";
                                //currentImage+=1;
                                if(currentImage > 10)
                                    basePath += DocSharing.CurrentPage.ToString() + ".htm";
                                else
                                    basePath += "00" +  DocSharing.CurrentPage.ToString() + ".htm";
                                //MessageBox.Show(basePath);

                                oUrl = basePath;
                                if(!m_bVisited)
                                {
                                    this.axWebBrowser1.Navigate2(ref oUrl,ref o,ref o,ref o,ref o);
                                    lblStatus.Text = "Book " + currentImage.ToString() + " of " + pictureCount.ToString();
                                    //m_bVisited =true;
                                }

                            }

                        }
                            break;
                    }
                    SetControls(true);
                    lblStatus.Visible = false;

                    if(m_bOwnerofthisControl)
                    {
                        btnOptions.Visible = true;
                        btnOptions.Enabled = true;
                        btnOptions.Top = btnLast.Top+4;
                        //chkSynch.Visible = true;
                    }
                    else
                    {
                        btnOptions.Visible = false;

                    }
                    chkThumbNail.Enabled =  m_bIsAllowedToAddAnnotations;
                    if(this.documentType == DocumentMessageType.typePresentation && chkThumbnail==false)
                    {
                        if(ClientUI.getInstance().IsShowThumbnails())/*check either we need to display thumnails or not*/
                        {
                            createThumbnailThread = new Thread(new ThreadStart(CreateThumbnails));
                            createThumbnailThread.Name = "createThumbnailThread() : documentSharingControl";
                            createThumbnailThread.Start();
                            chkThumbnail=true;
                            this.panelAnnotations.Height=65;
                        }
                    }
                }
            }
            catch (WebException exp)
            {
                WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("documentSharingControl.cs ==>ProcessMessageManageContent( line==> 2470",exp,null,false);
            //				MeetingAlerts alert=new MeetingAlerts();
            //				alert.ShowMessage(Alerts.MeetingAlerts.AlertType.NonFatal,this.Name + " Class : ProcessMessageManageContent() function ," + ex.Source + " Source ," + ex.Message  ,true,false);
            }
        }
Example #7
0
 public void SendMessage(ref WebMeeting.Common.AppSharingMessageEx m)
 {
     ((IMessageReceiver) this._dispatcher.TransparentProxy).ReceiveDesktopMessage(m);
 }
Example #8
0
        /// <summary>
        /// This method is the implementation of IConferenceServer.
        /// This methos is called from client side to connect to a particular meeting.
        /// This methods do the following things:
        /// -Search Conference from running conferences on this server--if found return conference room object
        /// otherwise search db  & make new object of conferenceroom and return that
        /// -Create new AuthenticationMessage with profile.ClientId that is passed to JoinConference method.
        /// -Check conf==null then throw exception that specified conference id not found.
        /// -check conference capacity by executing query to mysql and throw exception in the case when capacity is full
        /// -sleep thread 1 seconds.
        /// -validate password of the meeting....its just empty function return true in all casees
        /// -Always else condition of if(!ValidateAuthentication(Password,"" + conferenceID)) statement run
        ///  --check ctool_guest if IsGuest=true, if IsGuest=false then check ctool_company_member table
        ///  --Assign Msg object different values like ftp_ip,username & password etc
        ///  --check query result that is run again IsGuest true/false, assign different values to profile & msg object
        /// -check duplicate profile name..if found throw exception of duplicate user
        /// -this condition will not run because on previous statement we throw exception on same name
        ///  if(cp.ClientRegistrationId == profile.ClientRegistrationId) // client exist in this meeting 
        /// -conf.AttachClient(profile.Name,profile,Msg); will add the profile uri to dispatcher list so that 
        ///  user can get the message when some message is broadcast.
        ///  -Add message join messages
        ///  -insert profile.cleintid in the ctool_billing with billing_mtype=1 with quest and billing_mtype=0 for non-guest.
        ///  -Select billing id against insertion and asssign it into the profile.billingid which further used in the billing consumer function named 
        ///  public void UpdateBillingInformation()
        ///  -return conferenceroom object.
        /// </summary>
        /// <param name="conferenceID"></param>
        /// <param name="profile"></param>
        /// <param name="Msg"></param>
        /// <param name="Password"></param>
        /// <param name="IsGuest"></param>
        /// <returns></returns>
        public IConferenceRoom JoinConference(int conferenceID,ref WebMeeting.Common.ClientProfile profile,out AuthenticationMessage Msg, string Password,bool IsGuest)
        {
            Console.WriteLine(" On Join Called \n Going inside Search Conference");
                ConferenceRoom      conf;

                //
                // Find the conference
                //
                conf = SearchConference(conferenceID.ToString());
                Msg = new AuthenticationMessage(profile.ClientId,true);
                //try
                //{

                //
                // If conf not found, raise an error
                //
                if(conf == null)
                {
                    throw (new System.ArgumentException("No conference with specified Id found hosted on this server", conferenceID.ToString()));
                }
                string sql = "select meeting_capacity from ctool_meeting where meeting_id = " + conf.ConferenceId;
                ArrayList Recordset = dbCon.Execute(sql);
                //Console.WriteLine(sql + "\n Execute. Recordset Count = " + Recordset.Count.ToString());
                if(Recordset.Count < 1)
                {
                    throw (new System.ArgumentException("No conference with specified Id found hosted on this server", conferenceID.ToString() ));
                }
                ArrayList Record = (ArrayList)Recordset[0];
                int nTotal = Convert.ToInt32(Record[0]);
                if((conf.ClientList.Count + 1) > (nTotal+1))
                {
                    throw (new System.ArgumentException("No More users can join this conference. Conference Capacity reached", "Max" + conferenceID.ToString()));
                }
                //this sleep code should be removed as it slow the connection speed of the application.
                System.Threading.Thread.Sleep(1000);
                //ValidateAuthentication(Password,"" + conferenceID)--this method does nothing,its always send
                //true
                /*
                if(!ValidateAuthentication(Password,"" + conferenceID))
                {
                    Console.WriteLine("\nUser not validated ");
                    throw (new System.ArgumentException("Invalid Meeting Password", Password));
                }
                else
                */
                {
                    string sql2= "Select company_member_fname,company_member_email,company_acc_name From ctool_company_member,ctool_company_acc where company_acc_id = company_member_cid AND company_member_id = " + profile.ClientRegistrationId;
                    if(IsGuest)
                    {
                        sql2 = "Select * from ctool_guest where guest_id = " +  profile.ClientRegistrationId;
                    }
                    profile.IsGuest = IsGuest;
                    ArrayList recordSet = dbCon.Execute(sql2);
                    if(recordSet.Count < 1)
                    {
                        throw (new System.ArgumentException("No user exists with specified username","ClientRegistrationId"));

                    }
                    else
                    {

                        Msg.ConferenceName = conf.conferenceName;
                        Msg.FTPPassoword = this.FTP_Password;
                        Msg.FTPUsername = this.FTP_Username;
                        Msg.FTPPort = this.FTP_PORT;
                        Msg.FTP_IP = this.FTP_IP;
                        Msg.ImageURL = GetImage("" + conferenceID);
                        Msg.SenderID=-1;
                        Msg.VoiceIP = voiceServerIP;
                        Msg.VoicePort = voiceServerPort;
                        Msg.voiceConferenceId = conf.conferenceVoiceSessionID;
                        if(recordSet.Count > 0)
                        {
                            if(IsGuest)
                            {
                                ArrayList record = (ArrayList)recordSet[0];
                                string strFName =record[3].ToString();
                                profile.Name = strFName;
                                profile.EMailAddress = record[4].ToString().ToLower();
                                Msg.companyName = "Guest Account";
                                Msg.ClientName = strFName;
                                Msg.ClientEmail = profile.EMailAddress;//record[1].ToString().ToLower();
                                Msg.SenderID=-1;
                            }
                            else
                            {
                                ArrayList record = (ArrayList)recordSet[0];
                                string strFName =record[0].ToString();
                                profile.Name = strFName;
                                profile.EMailAddress = record[1].ToString().ToLower();
                                profile.Name = strFName;
                                Msg.companyName =record[2].ToString();
                                Msg.ClientName = strFName;
                                Msg.ClientEmail = record[1].ToString().ToLower();
                                Msg.SenderID=-1;
                            }
                        }
                    }
                }
                Console.WriteLine("profile name :::"+profile.Name);

                foreach(ClientProfile cp in conf.ClientList.Values)
                {
                    Console.WriteLine("client List name :::"+cp.Name.Trim());
                    // To avoid the duplicate name
                    if(cp.Name.Trim()==profile.Name.Trim())
                    {
                        Console.WriteLine("Exception fired of login duplicate");
                        throw (new System.ArgumentException("A user is already login with name.", profile.Name.Trim()));
                    }
                    //
                    if(cp.ClientRegistrationId == profile.ClientRegistrationId) // client exist in this meeting
                    {

                        // zaeem Vierw thios condition doesnt seem to be working ok
                        // Wil see that later
                        conf.checkConnectionUrgent(cp.ClientId );
                        //break;
                    }
                }
                Console.WriteLine("Meeting Name " + Msg.ConferenceName);

                Console.WriteLine("\n Calling AttachClient");
                conf.AttachClient(profile.Name,profile,Msg);
                Console.WriteLine("\n Attach Client Called");

                GenuineUtility.CurrentSession["Profile"] = profile;

                //******************** Logging
                ST_flowMsg FlowMsgObj = new  ST_flowMsg ();
                FlowMsgObj.meetID = conf.ConferenceId ;
                FlowMsgObj.curDate= DateTime.Now.Year + "-" + DateTime.Now.Month +"-" + DateTime.Now.Day + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute + ":" + DateTime.Now.Second;
                FlowMsgObj.curMsg = profile.Name + " has joined the "+ conf.conferenceName +" conference ." ;
                FlowMsgObj.MsgCategory = "Attendee Joins and Leaves";
                //Zaeem Removed logging
                //flowMsgs.Add(FlowMsgObj);

                FlowMsgObj = null;
                return conf;
            /*
            }

            catch(Exception exp)
            {

                Console.WriteLine("******** Exception in Join conference **********");
                Console.WriteLine(exp.Message.ToString());
                Console.WriteLine(exp.StackTrace.ToString());
                Console.WriteLine("********End Exception in Join conference **********");
                return conf;

            }
            */
        }
Example #9
0
		public void ReInsertClientProfile(WebMeeting.Common.ClientProfile clientProf, int nIndex)
		{
			try
			{
				ListViewItem v;
				int X = 0;				
				if(clientProf.clientType ==  ClientType.ClientHost)
				{				
					v = pClient.listParticipents.Items.Insert(0, clientProf.Name);				
					if(profile.clientType!=ClientType.ClientAttendee)
					{
						v.SubItems.Add("");
						v.SubItems.Add("");				
						v.SubItems.Add("");
					}
				}
				else
				{								
					v = pClient.listParticipents.Items.Insert(pClient.listParticipents.Items.Count, clientProf.Name);
					if(profile.clientType!=ClientType.ClientAttendee)
					{
						v.SubItems.Add("");
						v.SubItems.Add("");					
						v.SubItems.Add("");
					}
				}
				if(clientProf.clientType!=ClientType.ClientAttendee)
					v.SubItems[0].Font=new System.Drawing.Font("Arial",8,System.Drawing.FontStyle.Bold);
				v.UseItemStyleForSubItems = false;
				v.SubItems.Add("").BackColor = clientProf.m_AssignedColor;
				v.SubItems.Add("");															
				X = v.Index;											
				ClientUI.getInstance().listParticipents.SetImage(X,0,0); // by kamran
				SetArrow(X);
				SetClientTypeImage(X,clientProf);
				SetConnItemImage(X,clientProf);
				SetMoodSubItemImage(X,clientProf);		          
	        
				ClientUI.getInstance().ListParticipentCheckBoxChange(X,clientProf.clientType);													
			}
			catch(Exception exp)
			{
				WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Line==> 325 receivethread ReinsertClientProfile;",exp,null,false);	
			}
		}
Example #10
0
		public void SetConnItemImage(int nItem,WebMeeting.Common.ClientProfile profile)
		{
			SetCheckBox(nItem,profile);
			if(this.profile.clientType == ClientType.ClientAttendee)
				return ;
			int nIndex = 15;
			switch(profile.m_ConnectionIndicator)
			{
				case ConnectionIndicator.Green:
					nIndex = 15;
					break;
				case ConnectionIndicator.Yellow:
					nIndex = 16;
					break;
				case ConnectionIndicator.Red:
					nIndex = 17;
					break;
			}
			ClientUI.getInstance().listParticipents.SetImage(nItem,2,nIndex);
		}
Example #11
0
		public void SetCheckBox(int nItem,WebMeeting.Common.ClientProfile profile)
		{
			if(this.profile.clientType == ClientType.ClientAttendee)
				return ;

			if(profile.clientType == ClientType.ClientAttendee)
				ClientUI.getInstance().listParticipents.SetImage(nItem,1,23);
			else
				ClientUI.getInstance().listParticipents.SetImage(nItem,1,22);
				
		}
Example #12
0
		public void SetMoodSubItemImage(int nItem,WebMeeting.Common.ClientProfile profile)
		{
			if(this.profile.clientType == ClientType.ClientAttendee)
				return ;

			int nIndex = 12;
			switch(profile.m_MoodIndicatorColor)
			{
				case MoodIndicator.Yellow:					
					nIndex =10;
					break;				
				case MoodIndicator.Blue:			
					nIndex =11;
					break;	
				case MoodIndicator.Green:					
					nIndex =12;
					break;
				case MoodIndicator.Red:					
					nIndex =13;
					break;
				case MoodIndicator.Question:					
					nIndex =14;
					break;
			}
			ClientUI.getInstance().listParticipents.SetImage(nItem,3,nIndex);
		}
Example #13
0
		//private int DesktopSessionID;
		#region set properties
		public void SetClientTypeImage(int nItem,WebMeeting.Common.ClientProfile profile)
		{
			int nColumnIndex = 0;
			
			//if(this.profile.clientType == ClientType.ClientHost) // by kamran 
			//	nColumnIndex = 1;
	
			int nIndex = 19;
			switch(profile.clientType)
			{
				case ClientType.ClientAttendee:
					nIndex = 24;
					break;
				case ClientType.ClientPresenter:
					nIndex = 24;
					break;
				case ClientType.ClientHost:
					nIndex = 25;
					break;
			}
			ClientUI.getInstance().listParticipents.SetImage(nItem,nColumnIndex,nIndex);
		}
Example #14
0
 public int DetachUser(WebMeeting.Common.ClientProfile profile)
 {
     this.ClientList.Remove(profile.ClientId);
     string receiverUri =profile.clientURI;
     IMessageReceiver iMessageReceiver = (IMessageReceiver) Activator.GetObject(typeof(IMessageReceiver), receiverUri);
     this._dispatcher.Remove((MarshalByRefObject) iMessageReceiver);
     SendUserDisconnectedMessage(profile);
     return 0;
 }
Example #15
0
 private void SendUserUpdateMessage(WebMeeting.Common.ClientProfile clientUpdated)
 {
     ControlMessage m = new ControlMessage(ControlCode.AttendeeUpdate);
     m.Parameter = clientUpdated;
     ((IMessageReceiver) this._dispatcher.TransparentProxy).ReceiveMessage(m);
     m = null; //GC
     GC.Collect(); //GC
 }
Example #16
0
        /// <summary>
        /// Send User joining message  to all participant  in the meeting
        /// This method is called from AttachClient.
        /// </summary>
        /// <param name="newlyJoined">profile of new comming participant</param>
        public void SendUserJoinMessage(WebMeeting.Common.ClientProfile newlyJoined)
        {
            ControlMessage m = new ControlMessage(ControlCode.AttendeeJoin);
            m.SenderID =-1;
            m.Parameter= newlyJoined;
            ((IMessageReceiver) this._dispatcher.TransparentProxy).ReceiveMessage(m);

            m = null; //GC
            GC.Collect(); //GC
        }