private void openTemplate() { if (Template.TemplateFile == null) { return; } //WinFormPDFViewer viewer = new WinFormPDFViewer(); //viewer.LoadPDF ( this.Template.TemplateFile ); PDFViewer.OpenOnSTAThread(Template.TemplateFile); }
private void openProfile(object obj) { if (obj is AthleteVM) { List <Athlete> athletes = new List <Athlete>(); athletes.Add(((AthleteVM)obj).Athlete); string previewFile; try { previewFile = Exports.GenerateAthleteProfile(athletes, false, PrintOptions.NO_PRINT, true, true); } catch (Exception ex) { MessageBox.Show("Failed to open athletes profile sheets. \n" + ex.Message); return; } PDFViewer.OpenOnSTAThread(previewFile); } }