static void Main() { // Before running anything accept the EULA of Contig var contigPath = Utilities.GetContigPath(); if (string.IsNullOrWhiteSpace(contigPath)) { return; } var process = new ProcessUtility(contigPath); process.Arguments = " -accepteula"; process.Run(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); }
private void startButton_Click(object sender, EventArgs e) { var contigPath = GetContigPath(); if (string.IsNullOrWhiteSpace(contigPath)) { return; } var outDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), "ContiGUI")); var driveFileName = Path.Combine(Path.GetTempPath(), "ContigUI", "driveOut.log"); var folderFileName = Path.Combine(Path.GetTempPath(), "ContigUI", "folderOut.log"); var fileFileName = Path.Combine(Path.GetTempPath(), "ContigUI", "fileOut.log"); var process = new ProcessUtility(contigPath); var driveParameters = new List <string>(); var folderParameters = new List <string>(); var fileParameters = new List <string>(); foreach (ListViewItem item in DriveListView.Items) { if (item.Checked) { driveParameters.Add(item.Text); } } foreach (ListViewItem item in FolderListView.Items) { folderParameters.Add(item.Text); } foreach (ListViewItem item in FileListView.Items) { fileParameters.Add(item.Text); } //Hide(); foreach (var folder in folderParameters) { process.Arguments = "-v -s " + Path.Combine(folder, "*.*"); //process.StandardErrorFileName = folderFileName; process.StandardOutputFileName = folderFileName; //new ProgressDialog().ShowDialog(this); process.Run(); } foreach (var file in fileParameters) { process.Arguments = "-v -s " + file; //process.StandardErrorFileName = fileFileName; process.StandardOutputFileName = fileFileName; process.Run(); } foreach (var drive in driveParameters) { process.Arguments = "-v -s " + drive + "*.*"; //process.StandardErrorFileName = driveFileName; process.StandardOutputFileName = driveFileName; process.Run(); } MessageBox.Show("Process Complete", "ContiGUI", MessageBoxButtons.OK, MessageBoxIcon.Information); //Show(); }