コード例 #1
0
        private void buttonVistaPrevia_Click(object sender, EventArgs e)
        {
            System.Uri a;
            if (webBrowser1 != null)
            {
                this.tabPageCurriculum.Controls.Remove(webBrowser1);
                webBrowser1.Dispose();
                File.Delete(@Application.StartupPath.ToString() + "\\aux1.pdf");
                webBrowser1 = null;
            }

            buttonWord.Enabled        = false;
            buttonPDF.Enabled         = false;
            buttonVistaPrevia.Enabled = false;

            this.tabPageCurriculum.Cursor = Cursors.WaitCursor;

            webBrowser1                    = new System.Windows.Forms.WebBrowser();
            webBrowser1.Location           = new System.Drawing.Point(190, 16);
            webBrowser1.MinimumSize        = new System.Drawing.Size(20, 20);
            webBrowser1.Name               = "webBrowser1";
            webBrowser1.Size               = new System.Drawing.Size(600, 450);
            webBrowser1.TabIndex           = 51;
            webBrowser1.Url                = new System.Uri("", System.UriKind.Relative);
            webBrowser1.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowser1_DocumentCompleted);
            webBrowser1.Show();
            this.tabPageCurriculum.Controls.Add(webBrowser1);
            //this.tabControl1.Refresh();

            arc = new Curriculum(p, 3);

            a = new System.Uri(@Application.StartupPath.ToString() + "\\aux1.pdf");
            //webBrowser1.Url = a ;
            webBrowser1.Navigate(a);
        }
コード例 #2
0
 private void buttonPDF_Click(object sender, EventArgs e)
 {
     buttonWord.Enabled        = false;
     buttonPDF.Enabled         = false;
     buttonVistaPrevia.Enabled = false;
     arc = new Curriculum(p, 2);
     buttonWord.Enabled        = true;
     buttonPDF.Enabled         = true;
     buttonVistaPrevia.Enabled = true;
 }