private void Alert(string text, MessageBoxIcon icon) { if (MessageBox.Show(text + "\nWould you like to view the log?", "DeeMirror", MessageBoxButtons.YesNo, icon) == DialogResult.Yes) { using (var form = new GUI.LogForm("Robocopy log", _process.FullOutput)) form.ShowDialog(); } }
private void listView1_DoubleClick(object sender, EventArgs e) { if (listView1.SelectedIndices.Count != 1) { return; } var entry = (Log.LogEntry)listView1.SelectedItems[0].Tag; if (string.IsNullOrEmpty(entry.Data)) { return; } using (var dialog = new LogForm("Robocopy log", entry.Data)) { dialog.ShowDialog(this); } }