void Print()
        {
            string templateFileName             = "";
            string savePath                     = "";
            CommonOpenFileDialog templateDialog = new CommonOpenFileDialog("Выберите шаблон для печати");

            if (templateDialog.ShowDialog() == CommonFileDialogResult.Ok)
            {
                templateFileName = templateDialog.FileName;
            }
            else
            {
                return;
            }

            CommonOpenFileDialog dialog = new CommonOpenFileDialog();

            dialog.IsFolderPicker = true;
            if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
            {
                savePath = dialog.FileName;
            }
            else
            {
                return;
            }

            var cf = new CreaterCertificates(templateFileName, savePath, new List <Student>()
            {
                Student
            });
        }
Пример #2
0
        private void Print()
        {
            string templateFileName             = "";
            string savePath                     = "";
            CommonOpenFileDialog templateDialog = new CommonOpenFileDialog("Выберите шаблон для печати");

            if (templateDialog.ShowDialog() == CommonFileDialogResult.Ok)
            {
                templateFileName = templateDialog.FileName;
            }
            else
            {
                return;
            }

            CommonOpenFileDialog dialog = new CommonOpenFileDialog();

            dialog.IsFolderPicker = true;
            if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
            {
                savePath = dialog.FileName;
            }
            else
            {
                return;
            }


            var cf = new CreaterCertificates(templateFileName, savePath,
                                             Students
                                             .Where(x => x.IsChecked)
                                             .Select(x => x.Item)
                                             .ToList());
        }