Exemplo n.º 1
0
        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog fd = new SaveFileDialog();

            fd.Filter = "All Script Files|*.xbx;*.ks";
            if (fd.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            string[] Strings = listBox1.Items.Cast <string>().ToArray();
            byte[]   Script  = FilterMode ? Filter.Export(Strings) : Editor.Export(Strings);
            File.WriteAllBytes(fd.FileName, Script);

            MessageBox.Show("Script Saved");
        }