public override void ViewDidAppear(bool animated)
 {
     PDFView.LoadRequest(new NSUrlRequest(NSUrl.FromFilename(PdfFileName)));
     this.NavigationController.SetToolbarHidden(false, true);
     this.NavigationController.SetToolbarItems(this.ToolbarItems, true);
     base.ViewDidAppear(animated);
 }
Exemplo n.º 2
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            string pdfFileName = (this.NavigationController as SigningNavigationController).Tabs._payment.pdfReceiptFileName;

            PDFView.LoadRequest(new NSUrlRequest(NSUrl.FromFilename(pdfFileName)));
        }
        public override void ViewDidAppear(bool animated)
        {
            hasBeenSigned = false;
            string pdfFileName = Tabs._prePlumbView.pdfPrePlumbingFileName;             // Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), pdfID+"_NotSigned.pdf");;

            PDFView.LoadRequest(new NSUrlRequest(NSUrl.FromFilename(pdfFileName)));

            Tabs.SigningNav.SetToolbarHidden(false, true);
            Tabs.SigningNav.SetToolbarItems(this.ToolbarItems, true);

            base.ViewDidAppear(animated);
        }
Exemplo n.º 4
0
        public override void ViewDidAppear(bool animated)
        {
            hasBeenSigned = false;
            string pdfFileName = Tabs._jobService.pdfServiceReportFileName;             // Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), pdfID+"_NotSigned.pdf");

            try
            {
                PDFView.LoadRequest(new NSUrlRequest(NSUrl.FromFilename(pdfFileName)));
            }
            catch (Exception e) {
                this.Tabs._scView.Log(e.Message);
            }

            Tabs.SigningNav.SetToolbarHidden(false, true);
            Tabs.SigningNav.SetToolbarItems(this.ToolbarItems, true);

            base.ViewDidAppear(animated);
        }
        public void RedrawDailyStockPDF(bool DocumentSigned)
        {
            // render created preview in PDF context
            NSMutableData pdfData = new NSMutableData();

            UIGraphics.BeginPDFContext(pdfData, GeneratedPDFView.Bounds, null);
            UIGraphics.BeginPDFPage();
            GeneratedPDFView.Layer.RenderInContext(UIGraphics.GetCurrentContext());
            UIGraphics.EndPDFContent();

            // save the rendered context to disk
            NSError err;
            string  pdfID = String.Format("{0}_{1}_{2}_UsedStock", MyConstants.EmployeeID, MyConstants.EmployeeName, DateTime.Now.Date.ToString("yyyy-MM-dd"));
            string  pdfFileName;

            if (DocumentSigned)
            {
                pdfFileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), pdfID + "_Signed.pdf");
            }
            else
            {
                pdfFileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), pdfID + "_Not_Signed.pdf");
            }
            pdfData.Save(pdfFileName, true, out err);

            if (err != null)
            {
                err.Dispose(); err = null;
            }
            if (pdfData != null)
            {
                pdfData.Dispose(); pdfData = null;
            }

            // set up UIWebView in signature view controller
            this.PDFView.MultipleTouchEnabled = true;
            this.PDFView.ScalesPageToFit      = true;
            this.PdfFileName = pdfFileName;

            if (DocumentSigned)
            {
                PDFView.LoadRequest(new NSUrlRequest(NSUrl.FromFilename(PdfFileName)));
            }
        }