Ejemplo n.º 1
0
        private bool ExportPdfs()
        {
            bool res = false;

            // Checking gauge, and exporting.
            try {
                PDFArchiver pda = new PDFArchiver(ref swApp, APathSet);
                GaugeSetter gs  = new GaugeSetter(swApp, APathSet);
                gs.CheckAndUpdateGaugeNotes2();
                res = (pda.ExportPdfs());

                if (APathSet.ExportEDrw && !pda.MetalDrawing)
                {
                    res = res && pda.ExportEDrawings();
                }

                if (pda.IsTarget && pda.savedFile != string.Empty)
                {
                    string profilePath = string.Format(@"{0}{1}", Properties.Settings.Default.TargetProfilePath,
                                                       System.IO.Path.GetFileName(pda.savedFile));
                    UsefulInformationDestroyer uid_ = new UsefulInformationDestroyer(pda.savedFile, profilePath);
                    uid_.RedactUsefulDataFromDocument();
                }
            } catch (MustHaveRevException mhre) {
                swApp.SendMsgToUser2(mhre.Message, (int)swMessageBoxIcon_e.swMbStop, (int)swMessageBoxBtn_e.swMbOk);
            } catch (MustSaveException mse) {
                swApp.SendMsgToUser2(mse.Message,
                                     (int)swMessageBoxIcon_e.swMbStop,
                                     (int)swMessageBoxBtn_e.swMbOk);
            } catch (GaugeSetterException gEx) {
                //PDFArchiver._sendErrMessage(gEx, swApp);
                ErrMsg em = new ErrMsg(gEx);
                em.ShowDialog();
            } catch (ExportPDFException e) {
                //PDFArchiver._sendErrMessage(e, swApp);
                ErrMsg em = new ErrMsg(e);
                em.ShowDialog();
            } catch (Exception ex) {
                //PDFArchiver._sendErrMessage(ex, swApp);

                ErrMsg em = new ErrMsg(ex);
                em.ShowDialog();
            }

            return(res);
        }
Ejemplo n.º 2
0
        public void CheckGauges()
        {
            GaugeSetter gs_ = new GaugeSetter(swApp, APathSet);

            gs_.CheckAndUpdateGaugeNotes2();
        }