private void btnSign_Click(object sender, EventArgs e) { if (chkCopyDocuments.Checked) { LastBackedUpFolder.SetValue("LastBackUpFolder", txtPath.Text, RegistryValueKind.String); } compatibleDocuments.Clear(); if (compatibleDocumentsList.Count < 1) { compatibleDocuments = FileOperations.ListAllowedFilesAndSubfolders(documentsToSign, true, chkIncludeSubfolders.Checked); foreach (string str in compatibleDocuments) { FileHistory fh = new FileHistory(str, str); compatibleDocumentsList.Add(fh); } } else { compatibleDocuments = FileOperations.ListAllowedFilesAndSubfolders(compatibleDocumentsList, true, chkIncludeSubfolders.Checked); } if (compatibleDocuments.Count > 0) { string[] signedDocuments = signDocuments(); List <string> docs = new List <string>(); List <FileHistory> docsHist = new List <FileHistory>(); foreach (FileStatus fs in documentsSignStatus) { docs.Add(fs.Path); FileHistory fh = new FileHistory(fs.OldPath, fs.Path); docsHist.Add(fh); } if (signedDocuments != null) { if (!chkViewDocuments.Visible) { ((frmManageDigitalSignature)this.Owner).listFiles(docsHist); } if (chkViewDocuments.Checked) { frmViewDigitalSignature FormViewDigitalSignature = new frmViewDigitalSignature(docs.ToArray()); FormViewDigitalSignature.Show(); } this.Visible = false; frmReport FormReport = new frmReport(documentsSignStatus, "sign"); FormReport.ShowDialog(); } } else { MessageBox.Show("Os arquivos selecionados não são pacotes válidos.", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Error); this.Close(); } }
private void viewReport(List <FileStatus> fileStatusList) { frmReport FormReport = new frmReport(fileStatusList, "remove"); FormReport.ShowDialog(); }