コード例 #1
0
        private void ExportNsf()
        {
            var filename = PlatformUtils.ShowSaveFileDialog("Export NSF File", "Nintendo Sound Files (*.nsf)|*.nsf");

            if (filename != null)
            {
                var props  = dialog.GetPropertyPage((int)ExportFormat.Nsf);
                var kernel = (FamitoneMusicFile.FamiToneKernel)Enum.Parse(typeof(FamitoneMusicFile.FamiToneKernel), props.GetPropertyValue <string>(5));

                NsfFile.Save(project, kernel, filename,
                             GetSongIds(props.GetPropertyValue <bool[]>(4)),
                             props.GetPropertyValue <string>(0),
                             props.GetPropertyValue <string>(1),
                             props.GetPropertyValue <string>(2));
            }
        }
コード例 #2
0
ファイル: ExportDialog.cs プロジェクト: Jjagg/FamiStudio
        private void ExportNsf()
        {
            var sfd = new SaveFileDialog()
            {
                Filter = "Nintendo Sound Files (*.nsf)|*.nsf",
                Title  = "Export NSF File"
            };

            if (sfd.ShowDialog() == DialogResult.OK)
            {
                var props = formatProps[(int)ExportFormat.Nsf];

                NsfFile.Save(project, sfd.FileName,
                             GetSongIds(props.GetPropertyValue <bool[]>(4)),
                             props.GetPropertyValue <string>(0),
                             props.GetPropertyValue <string>(1),
                             props.GetPropertyValue <string>(2));
            }
        }