Beispiel #1
0
        private void TS_New_Click(object sender, EventArgs e)
        {
            File = new SQCBFile();

            LB_Files.Items.Clear();
            foreach (var entry in File.Entries)
            {
                LB_Files.Items.Add(entry.Name);
            }

            TS_Save.Enabled  = true;
            TS_CEdit.Enabled = true;
        }
Beispiel #2
0
        private void SaveFile(object sender, EventArgs e)
        {
            //Shouldn't really happen, but whatever
            if (File != null)
            {
                SaveFileDialog sfd = new SaveFileDialog()
                {
                    Filter = "Sequencer bank file|*.sqcb",
                };

                if (sfd.ShowDialog() == DialogResult.OK)
                {
                    using (Stream fs = sfd.OpenFile())
                    {
                        SQCBFile.SaveFile(fs, File);
                    }
                }
            }
        }
Beispiel #3
0
        private void LoadFile(object sender, EventArgs e)
        {
            OpenFileDialog fd = new OpenFileDialog
            {
                Filter = "Sequencer bank file|*.sqcb"
            };

            if (fd.ShowDialog() == DialogResult.OK)
            {
                using (Stream stream = fd.OpenFile())
                {
                    File = SQCBFile.LoadFile(stream);
                }
            }

            LB_Files.Items.Clear();
            foreach (var entry in File.Entries)
            {
                LB_Files.Items.Add(entry.Name);
            }

            TS_Save.Enabled  = true;
            TS_CEdit.Enabled = true;
        }