private void newEventLogToolStripMenuItem_Click(object sender, EventArgs e) { if (treeViewLogs.SelectedNode != null) { if (treeViewLogs.SelectedNode.Parent != null) { // Pass in the machine name NewEventLog log = new NewEventLog(treeViewLogs.SelectedNode.Parent.Text); // Check if a log has actually been created if (log.ShowDialog() == DialogResult.OK) { // Refresh the event logs under the machine RefreshEventLogs(treeViewLogs.SelectedNode.Parent); } } } }
public void NewClicked() { if (treeViewLogs.SelectedNode != null) { if (treeViewLogs.SelectedNode.Parent != null) { // Pass in the machine name NewEventLog log = new NewEventLog(treeViewLogs.SelectedNode.Parent.Text); // Check if a log has actually been created if (log.ShowDialog() == DialogResult.OK) { // Refresh the event logs under the machine RefreshEventLogs(treeViewLogs.SelectedNode.Parent); } } } }