private void buttonImport_Click(object sender, EventArgs e)
{
using (var loadDialog = new OpenFileDialog())
{
loadDialog.DefaultExt = ".rb";
loadDialog.Filter = "Ruby File|*.rb";
loadDialog.InitialDirectory =
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
loadDialog.Title = "Import Script...";
loadDialog.Multiselect = true;
if (loadDialog.ShowDialog() == DialogResult.OK)
{
foreach (string filename in loadDialog.FileNames)
this._scripts.Add(new Script(filename));
}
}
}