Exemplo n.º 1
0
        private void axWebBrowser1_TitleChange(object sender, AxSHDocVw.DWebBrowserEvents2_TitleChangeEvent e)
        {
            //System.Net.WebClient Client = new System.Net.WebClient ();
            System.Windows.Forms.SaveFileDialog SvgFileDia = new SaveFileDialog();
            string filePath = "";

            filePath = (string )e.text;
//		if(RefreshPage==true)
//		{
//			RefreshPage=false;
//			this.axWebBrowser1_Enter(null,null);
//		}
//		else
            if (filePath.IndexOf(".php") < 0)
            {
                //if(ncountFiles==2)
                //	{
                //		ncountFiles=1;
                //Trace.WriteLine("Evnet Occurs" + filePath.ToString());
                changeTitleofPage();
                SvgFileDia.FileName = System.IO.Path.GetFileName(filePath);

                if (SvgFileDia.ShowDialog() == DialogResult.OK)
                {
                    if (SvgFileDia.CheckPathExists)
                    {
                        WebMeeting.Client.ManageContent.frmDownloader frm = new WebMeeting.Client.ManageContent.frmDownloader(filePath, SvgFileDia.FileName);
                        frm.Show();
                        //			RefreshPage=true;

                        //this.axWebBrowser1.
//					if(NetworkManager.getInstance().profile.IsGuest)
//						axWebBrowser1.LocationName=  Info.getInstance().WebsiteName + "/application/uploads.php?meetingid=" + NetworkManager.getInstance().profile.ConferenceID + "&gid=" + NetworkManager.getInstance().profile.ClientRegistrationId;
//					else
//						axWebBrowser1.LocationName= Info.getInstance().WebsiteName + "/application/uploads.php?meetingid=" + NetworkManager.getInstance().profile.ConferenceID + "&mid=" + NetworkManager.getInstance().profile.ClientRegistrationId ;
//
                        //axWebBrowser1.GoBack();
                        //this.axWebBrowser1.

                        //frmDownloadWaiting frmDownload = new frmDownloadWaiting();
//					frmDownload.Show();
//					Client.DownloadFile(filePath,SvgFileDia.FileName);
//					frmDownload.Close();
//					SvgFileDia.Dispose();
                    }
                    //System.Windows.Forms.MessageBox.Show("file location is selected");
                }
                else
                {
                    RefreshPage = true;
                }
            }
            //SvgFileDia.FileOk += new CancelEventHandler(this.pickfile);
            //

            //	}
            //	else
            //		ncountFiles=ncountFiles+1;
            //	Trace.WriteLine("Evnet Occurs" + ncountFiles.ToString());
        }
Exemplo n.º 2
0
        private void axWebBrowser1_TitleChange(object sender, AxSHDocVw.DWebBrowserEvents2_TitleChangeEvent e)
        {
            System.Windows.Forms.SaveFileDialog SvgFileDia = new SaveFileDialog();
            string str      = (string )e.text;
            string filePath = e.text;

            if (strOpenedPage == "")
            {
                return;
            }
            if (locktoexecute == true)
            {
                return;
            }
            //MessageBox.Show(str);
            if ((filePath.IndexOf("&") < 0 && filePath.IndexOf(".php") < 0))             //&&  nCountOpenFiles==2)
            {
                //MessageBox.Show(strOpenedPage,"CompassNav");
                if (strOpenedPage == "dmquestion")
                {
                    changeTitleofPage();
                    Client.ClientUI.getInstance().CreateNewPollingWindowFrmMangeContent(null, null, false, str);
                    return;
                }
                else if (strOpenedPage == "webshare")
                {
                    changeTitleofPage();
                    Client.ClientUI.getInstance().shareBrowserForWebFiles(str);
                    return;
                }
                else if (strOpenedPage == "uploads")
                {
                    changeTitleofPage();
                    SvgFileDia.FileName = System.IO.Path.GetFileName(str);
                    if (SvgFileDia.ShowDialog() == DialogResult.OK)
                    {
                        if (SvgFileDia.CheckPathExists)
                        {
                            WebMeeting.Client.ManageContent.frmDownloader frm = new WebMeeting.Client.ManageContent.frmDownloader(filePath, SvgFileDia.FileName);
                            frm.Show();
                        }
                    }
                    return;
                }


                string fileName = filePath.Substring(filePath.LastIndexOf("/") + 1);
                nCountOpenFiles = 0;
                changeTitleofPage();
                //string uploadPath = WebMeeting.Client.DocumentSharingEx.createUploadFullPath_MangCont(fileName);
                try
                {
//					WebMeeting.Client.ManageContent.frmDownloader frm=new WebMeeting.Client.ManageContent.frmDownloader(filePath ,uploadPath,true);
//					frm.DownComp +=new WebMeeting.Client.ManageContent.DownloadingComplete(this.startSlideShow);
//					frm.TopMost=true;
//					frm.Owner=ClientUI.getInstance();
//					frm.ShowDialog();
                    prevFileName = filePath;
                    //MessageBox.Show(filePath);
                    ClientUI.getInstance().ShareMyDocumentByContentManagement(filePath);
                    filePath = filePath.Substring(filePath.LastIndexOf("/") + 1);
                }
                catch (Exception exp)
                {
                    //frmDownload.Close();
                    WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("ManageContents ===>ManageContentWebPresentation.cs line==> 458", exp, "Error downloading " + exp.Message.ToString(), true);
                }

                //					filePath = filePath.Substring( filePath.LastIndexOf("/")+1 );
                //
                //					//MessageBox.Show("sharing: " + Application.StartupPath + "\\Downloaded\\" + fileName);
                //					//ClientUI.getInstance().ShareMyDocumentByContentManagement(filePath);
                //					ClientUI.getInstance().ShareMyDocumentByContentManagement(uploadPath);
            }
            else
            {
                //		if(nCountOpenFiles==2)nCountOpenFiles=0;
                //		nCountOpenFiles+=1;
            }
            flagToUnique = !flagToUnique;
            //}

            //flagToUnique = !flagToUnique ;
        }
        private void axWebBrowser1_TitleChange(object sender, AxSHDocVw.DWebBrowserEvents2_TitleChangeEvent e)
        {
            System.Windows.Forms.SaveFileDialog SvgFileDia = new SaveFileDialog();
            string str = (string ) e.text;
            string filePath = e.text ;

            if(strOpenedPage=="")
                return;
            if(locktoexecute==true)
                return;
            //MessageBox.Show(str);
            if( (filePath.IndexOf("&") < 0  && filePath.IndexOf(".php") < 0))//&&  nCountOpenFiles==2)
            {
                //MessageBox.Show(strOpenedPage,"CompassNav");
                if(strOpenedPage=="dmquestion")
                {
                    changeTitleofPage();
                    Client.ClientUI.getInstance().CreateNewPollingWindowFrmMangeContent(null,null,false,str);
                    return;
                }
                else if(strOpenedPage=="webshare")
                {
                    changeTitleofPage();
                    Client.ClientUI.getInstance().shareBrowserForWebFiles(str);
                    return;
                }
                else if(strOpenedPage=="uploads")
                {
                    changeTitleofPage();
                    SvgFileDia.FileName=System.IO.Path.GetFileName(str);
                    if( SvgFileDia.ShowDialog()==DialogResult.OK)
                    {
                        if(SvgFileDia.CheckPathExists)
                        {
                            WebMeeting.Client.ManageContent.frmDownloader frm=new WebMeeting.Client.ManageContent.frmDownloader(filePath,SvgFileDia.FileName);
                            frm.Show();
                        }
                    }
                    return;
                }

                string fileName = filePath.Substring( filePath.LastIndexOf("/")+1);
                nCountOpenFiles=0;
                changeTitleofPage();
                //string uploadPath = WebMeeting.Client.DocumentSharingEx.createUploadFullPath_MangCont(fileName);
                try
                {
            //					WebMeeting.Client.ManageContent.frmDownloader frm=new WebMeeting.Client.ManageContent.frmDownloader(filePath ,uploadPath,true);
            //					frm.DownComp +=new WebMeeting.Client.ManageContent.DownloadingComplete(this.startSlideShow);
            //					frm.TopMost=true;
            //					frm.Owner=ClientUI.getInstance();
            //					frm.ShowDialog();
                    prevFileName = filePath;
                    //MessageBox.Show(filePath);
                    ClientUI.getInstance().ShareMyDocumentByContentManagement(filePath);
                    filePath = filePath.Substring( filePath.LastIndexOf("/")+1 );
                }
                catch(Exception exp)
                {
                    //frmDownload.Close();
                    WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("ManageContents ===>ManageContentWebPresentation.cs line==> 458",exp,"Error downloading " +  exp.Message.ToString(),true);

                }

                //					filePath = filePath.Substring( filePath.LastIndexOf("/")+1 );
                //
                //					//MessageBox.Show("sharing: " + Application.StartupPath + "\\Downloaded\\" + fileName);
                //					//ClientUI.getInstance().ShareMyDocumentByContentManagement(filePath);
                //					ClientUI.getInstance().ShareMyDocumentByContentManagement(uploadPath);
            }
            else
            {
                //		if(nCountOpenFiles==2)nCountOpenFiles=0;
                //		nCountOpenFiles+=1;
            }
            flagToUnique = !flagToUnique ;
            //}

            //flagToUnique = !flagToUnique ;
        }
Exemplo n.º 4
0
        private void axWebBrowser1_TitleChange(object sender, AxSHDocVw.DWebBrowserEvents2_TitleChangeEvent e)
        {
            //System.Net.WebClient Client = new System.Net.WebClient ();
            System.Windows.Forms.SaveFileDialog SvgFileDia = new SaveFileDialog();
            string filePath="";
            filePath = (string )e.text;
            //		if(RefreshPage==true)
            //		{
            //			RefreshPage=false;
            //			this.axWebBrowser1_Enter(null,null);
            //		}
            //		else
            if(filePath.IndexOf(".php") < 0)
            {

            //if(ncountFiles==2)
            //	{
            //		ncountFiles=1;
            //Trace.WriteLine("Evnet Occurs" + filePath.ToString());
            changeTitleofPage();
            SvgFileDia.FileName=System.IO.Path.GetFileName(filePath);

            if( SvgFileDia.ShowDialog()==DialogResult.OK)
            {

                if(SvgFileDia.CheckPathExists)
                {

                    WebMeeting.Client.ManageContent.frmDownloader frm=new WebMeeting.Client.ManageContent.frmDownloader(filePath,SvgFileDia.FileName);
                    frm.Show();
            //			RefreshPage=true;

                    //this.axWebBrowser1.
            //					if(NetworkManager.getInstance().profile.IsGuest)
            //						axWebBrowser1.LocationName=  Info.getInstance().WebsiteName + "/application/uploads.php?meetingid=" + NetworkManager.getInstance().profile.ConferenceID + "&gid=" + NetworkManager.getInstance().profile.ClientRegistrationId;
            //					else
            //						axWebBrowser1.LocationName= Info.getInstance().WebsiteName + "/application/uploads.php?meetingid=" + NetworkManager.getInstance().profile.ConferenceID + "&mid=" + NetworkManager.getInstance().profile.ClientRegistrationId ;
            //
                    //axWebBrowser1.GoBack();
                    //this.axWebBrowser1.

                    //frmDownloadWaiting frmDownload = new frmDownloadWaiting();
            //					frmDownload.Show();
            //					Client.DownloadFile(filePath,SvgFileDia.FileName);
            //					frmDownload.Close();
            //					SvgFileDia.Dispose();
                }
            //System.Windows.Forms.MessageBox.Show("file location is selected");
            }
            else RefreshPage=true;

            }
            //SvgFileDia.FileOk += new CancelEventHandler(this.pickfile);
            //

            //	}
            //	else
            //		ncountFiles=ncountFiles+1;
            //	Trace.WriteLine("Evnet Occurs" + ncountFiles.ToString());
        }