Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var fileDetails             = new List <FileDetails>();
            var filenamePopulator       = new FilenamePopulator();
            var digitalSignatureChecker = new DigitalSignatureChecker();
            var fileDetailPopulator     = new FileDetailPopulator();
            var persister = new ResultsPersister();

            filenamePopulator.Execute(fileDetails);
            digitalSignatureChecker.Execute(fileDetails);
            fileDetailPopulator.Execute(fileDetails);

            if (args.Length > 0)
            {
                persister.WriteToCsvFile(fileDetails);
            }
            else
            {
                var resultsViewer = new ResultsViewer(persister);
                resultsViewer.SetupResultsForDisplay(fileDetails);
                Application.Run(resultsViewer);
            }
        }
 private void buttonExport_Click(object sender, System.EventArgs e)
 {
     _persister.WriteToCsvFile(_fileDetails);
     MessageBox.Show("Export complete", "FilesAreDigitallySigned", MessageBoxButtons.OK, MessageBoxIcon.Information);
 }