public void SaveGO95(PPLMain pPPLMain, PPLPole pPole, string pFileName) { PPLReportsForm reportTemplate = new PPLReportsForm(pPPLMain, pPole); reportTemplate.BuildReportsList(); //don't worry about the dock content error. it still works in ocalc MigraDocReportControl mgDocControl = new MigraDocReportControl(); foreach (ReportTemplate rep in reportTemplate.cAvailableReports) { if (Convert.ToString(rep.Description).Equals("GO95 Analysis Report")) { rep.CreateReport(pPPLMain, null); rep.AddPole(pPole, (string)null); //mgDocControl.SetReport(doc, pPPLMain, (PPLWorkingDialog)null); Document doc = rep.GetReport(); MigraDoc.Rendering.PdfDocumentRenderer pdfRenderer = new MigraDoc.Rendering.PdfDocumentRenderer(false, PdfSharp.Pdf.PdfFontEmbedding.Always); pdfRenderer.Document = doc; pdfRenderer.RenderDocument(); pdfRenderer.PdfDocument.Save(pFileName); rep.Reset(); //mgDocControl.SetReport(doc, pPPLMain, (PPLWorkingDialog)null); } } }
public void OcalcReload(PPLMain pPPLmain) { cPPLMain = pPPLmain; cPPLMain.ForceReloadDEP(); cPPLMain.Rebuild3DDisplay(); cPPLMain.UpdateCapacitySummary(); }
public void PgeDebug() { Thread th = new Thread(OverrideFaa); th.Start(); /////////////////// ///reference to pplmain PPLMessageBox.Show(Environment.UserName); Thread.Sleep(30000); PPLMain pMain = null; foreach (Form f in Application.OpenForms) { //if (f.Name is "PGE_PPL") //{ // pMain = f.ActiveControl as PPLMain; //} //if (f.Name is "PGE_DataBlockForm") //{ // var pge = f; // foreach(Control ctl in pge.Controls) // { // } //} // if (f.Name is "Form1") // { // foreach (Control ctl in f.Controls) // { // } // } } th.Abort(); }
public void SaveCustomReport(PPLMain pPPLMain, string pOsmoseCustomReportFileName, string pOutputPath) { PPLExcelReportsForm excelReport = new PPLExcelReportsForm(pPPLMain); excelReport.CreateExcelReport(pOsmoseCustomReportFileName, pOutputPath); }
public void SavePPLX(PPLMain pPPLMain, string pFileName) { pPPLMain.DoSavePole(pFileName, pPPLMain.SaveAsVersion, true, true); }