private void AddRoutePaths_Click(object sender, EventArgs e) { if (MSTSfolderBrowse.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string path = MSTSfolderBrowse.SelectedPath; Program.aePreference.RoutePaths.Add(path); ListRoutePaths.DataSource = null; ListRoutePaths.DataSource = Program.aePreference.RoutePaths; RemoveRoutePaths.Enabled = true; } }
private void browseMSTSPath_Click(object sender, EventArgs e) { if (MSTSfolderBrowse.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string path = MSTSfolderBrowse.SelectedPath; MSTSPath.Text = path; Program.aePreference.MSTSPath = path; string completeFileName = Path.Combine(path, "routes"); if (Directory.Exists(completeFileName)) { Program.aePreference.RoutePaths.Add(completeFileName); ListRoutePaths.DataSource = null; ListRoutePaths.DataSource = Program.aePreference.RoutePaths; RemoveRoutePaths.Enabled = true; } } }