private void basicIdeCtl1_GetMacroName(object sender, WinWrap.Basic.Classic.GetMacroNameEventArgs e) { FileDialogForm dialog = new FileDialogForm(); foreach (string script in Scripts) dialog.listBox1.Items.Add(script); dialog.listBox1.SelectedIndex = 0; dialog.Text = e.OpenDialog ? "Open" : "Save"; dialog.ShowDialog(this); if (dialog.DialogResult == System.Windows.Forms.DialogResult.OK) e.FileName = Scripts[dialog.listBox1.SelectedIndex] + ".bas"; e.Handled = true; }
private void basicIdeCtl1_GetMacroName(object sender, WinWrap.Basic.Classic.GetMacroNameEventArgs e) { FileDialogForm dialog = new FileDialogForm(); foreach (string script in Scripts) { dialog.listBox1.Items.Add(script); } dialog.listBox1.SelectedIndex = 0; dialog.Text = e.OpenDialog ? "Open" : "Save"; dialog.ShowDialog(this); if (dialog.DialogResult == System.Windows.Forms.DialogResult.OK) { e.FileName = Scripts[dialog.listBox1.SelectedIndex] + ".bas"; } e.Handled = true; }