private void menuImportLabels_Click(object sender, EventArgs e) { string[] filesToImportAsLabels; using (OpenFileDialog d = new OpenFileDialog()) { d.CheckFileExists = true; d.CheckPathExists = true; d.Multiselect = true; d.ReadOnlyChecked = true; if (d.ShowDialog(this) != DialogResult.OK) { return; } filesToImportAsLabels = d.FileNames; } MapLabelImporter importer = new MapLabelImporter(filesToImportAsLabels); importer.Start(); }
private void menuImportLabels_Click(object sender, EventArgs e) { string[] filesToImportAsLabels; using(OpenFileDialog d = new OpenFileDialog()) { d.CheckFileExists = true; d.CheckPathExists = true; d.Multiselect = true; d.ReadOnlyChecked = true; if(d.ShowDialog(this) != DialogResult.OK) { return; } filesToImportAsLabels = d.FileNames; } MapLabelImporter importer = new MapLabelImporter(filesToImportAsLabels); importer.Start(); }