示例#1
0
        private void btnExport_Click(object sender, EventArgs e)
        {
            SaveFileDialog o = new SaveFileDialog();

            o.AddExtension    = true;
            o.CheckPathExists = true;
            o.DefaultExt      = "wav";
            o.Filter          = "WAVE audio (*.wav)|*.wav";
            o.OverwritePrompt = true;
            if (o.ShowDialog() == DialogResult.OK)
            {
                soundBase.Save_WAV(o.FileName, false);
            }

            if (soundBase.CanLoop)
            {
                XElement xml = XElement.Load(Application.StartupPath + Path.DirectorySeparatorChar + "Plugins" +
                                             Path.DirectorySeparatorChar + "SoundLang.xml");
                xml = xml.Element(pluginHost.Get_Language()).Element("SoundControl");
                if (MessageBox.Show(xml.Element("S05").Value, "", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    if (o.ShowDialog() == DialogResult.OK)
                    {
                        string path = Path.GetDirectoryName(o.FileName) + Path.DirectorySeparatorChar +
                                      Path.GetFileNameWithoutExtension(o.FileName) + "_loop.wav";
                        soundBase.Save_WAV(path, true);
                    }
                }
            }
        }
示例#2
0
        public SoundControl(SoundBase sb, IPluginHost pluginHost)
        {
            InitializeComponent();

            this.soundBase  = sb;
            this.pluginHost = pluginHost;

            this.wav_file = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
            soundBase.Save_WAV(wav_file, false);
            if (soundBase.CanLoop)
            {
                wav_loop_file = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
                soundBase.Save_WAV(wav_loop_file, true);
            }

            checkLoop.Enabled = soundBase.CanLoop;
            btnImport.Enabled = soundBase.CanEdit;

            ReadLanguage();
            Information();
        }
示例#3
0
        public SoundControl(SoundBase sb, IPluginHost pluginHost)
        {
            InitializeComponent();

            this.soundBase = sb;
            this.pluginHost = pluginHost;

            this.wav_file = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
            soundBase.Save_WAV(wav_file, false);
            if (soundBase.CanLoop)
            {
                wav_loop_file = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
                soundBase.Save_WAV(wav_loop_file, true);
            }

            checkLoop.Enabled = soundBase.CanLoop;
            btnImport.Enabled = soundBase.CanEdit;

            ReadLanguage();
            Information();
        }