コード例 #1
0
ファイル: Form1.cs プロジェクト: WinWrap/WinWrapExamples
        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;
        }
コード例 #2
0
        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;
        }