private void btnPrintAll_Click(object sender, EventArgs e) { var сertificates = new List <Certificate>(CertificateManager.GetCertificatesRegistry()); using (var printRegistryForm = new RegistryPrintForm(TemplateManager.FillTemplate(сertificates))) { printRegistryForm.ShowDialog(); } }
private void btnPrintSelected_Click(object sender, EventArgs e) { string certificatesTable = TemplateManager.FillTemplate(selectedCertificatesList.ToList()); using (var form = new RegistryPrintForm(certificatesTable, "Печать выбранных")) { if (form.ShowDialog() == DialogResult.OK) { ClearHideSelectedList(); } } }