private void StatsToolStripMenuItem_Click(object sender, EventArgs e) { string resultsPath = Environment.ExpandEnvironmentVariables(settings[Settings.Default.IniSection]["ResultsFolder"]); if (!Directory.Exists(resultsPath)) { MessageBox.Show("Please go to settings and set a results folder location."); } else if (IsDirectoryEmpty(resultsPath)) { MessageBox.Show("Chosen results folder is empty. Go to settings and select a different results folder."); } else { FrmStatistics Statistics = new FrmStatistics(frmSettings); Statistics.Show(); } }