예제 #1
0
        public void runCreatePdf(bool argument)
        {
            ProgressBarLoad progress = new ProgressBarLoad();

            progress.ShowDialog();
            bool controlForPhoto = pdfController.PdfIntro(doc, sec, reportNote.Text, profilePic.ImageLocation, reportNote.Lines.Count(), argument);

            if (controlForPhoto)
            {
                pdfController.CreatePdf(doc, sec, formHistoryGrid, 5, "Form History");
                pdfController.CreatePdf(doc, sec, webHistoryGrid, 6, "Web History");
                pdfController.CreatePdf(doc, sec, inputHistoryGrid, 2, "Input History");
                pdfController.CreatePdf(doc, sec, bookmarkMozillaGrid, 4, "Bookmark");
                pdfController.CreatePdf(doc, sec, cookiesMozillaGrid, 7, "Cookies");
                pdfController.CreatePdf(doc, sec, annosMozillaGrid, 3, "Downloads");
                int check = setPdf.SavePdf(doc, reportName.Text);
                if (check == 1)
                {
                    Exception.ThrowExc.Instance.InformationMessage(Const.Constants.REPORT_CREATED);
                    reportNote.Text = "";
                    reportName.Text = "";
                    this.Close();
                }
                else if (check == -1)
                {
                    Exception.ThrowExc.Instance.ErrorMessage(Const.Constants.REPORT_COULDNT_SAVED);
                }
            }
            else
            {
                Exception.ThrowExc.Instance.ErrorMessage(Const.Constants.PICTURE_SIZE_ERROR);
                doc = null;
                doc = pdfController.Create();
            }
        }
예제 #2
0
        public void RunCreatePdf(bool argument)
        {
            ProgressBarLoad progress = new ProgressBarLoad();

            progress.ShowDialog();
            bool controlForPhoto = pdfController.PdfIntro(doc, sec, reportNote.Text, profilePic.ImageLocation, reportNote.Lines.Length, argument);

            if (controlForPhoto)
            {
                pdfController.CreatePdf(doc, sec, keywordsGrid, 1, "Keyword History");
                pdfController.CreatePdf(doc, sec, urlHistoryGrid, 6, "Url History");
                pdfController.CreatePdf(doc, sec, downloadsHistoryGrid, 6, "Download History");
                pdfController.CreatePdf(doc, sec, autofillGrid, 5, "Autofill");
                pdfController.CreatePdf(doc, sec, cookiesGrid, 6, "Cookies");
                pdfController.CreatePdf(doc, sec, topsitesGrid, 3, "Top Sites");
                int check = setPdf.SavePdf(doc, reportName.Text);
                if (check == 1)
                {
                    Exception.ThrowExc.Instance.InformationMessage(Const.Constants.REPORT_CREATED);
                    reportNote.Text = "";
                    reportName.Text = "";
                    this.Close();
                }
                else if (check == -1)
                {
                    Exception.ThrowExc.Instance.ErrorMessage(Const.Constants.REPORT_COULDNT_SAVED);
                }
            }
            else
            {
                Exception.ThrowExc.Instance.ErrorMessage(Const.Constants.PICTURE_SIZE_ERROR);
                doc = null;
                doc = pdfController.Create();
            }
        }