コード例 #1
0
        private void openTemplate()
        {
            if (Template.TemplateFile == null)
            {
                return;
            }

            //WinFormPDFViewer viewer = new WinFormPDFViewer();
            //viewer.LoadPDF ( this.Template.TemplateFile );

            PDFViewer.OpenOnSTAThread(Template.TemplateFile);
        }
コード例 #2
0
        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);
            }
        }