private void btnPlay_Click(object sender, EventArgs e)
        {
            StopSound(false);

            // Check to see if our voicemail already exists
            WOSI.CallButler.Data.CallButlerDataset.VoicemailsRow voicemail = GetSelectedVoicemail();

            if (voicemail != null)
            {
                if (GetVoicemailSound != null)
                {
                    VoicemailEventArgs vmArgs = new VoicemailEventArgs(voicemail);
                    GetVoicemailSound(this, vmArgs);

                    if (File.Exists(vmArgs.SoundFilename))
                    {
                        btnStop.Enabled = true;
                        btnPlay.Enabled = false;

                        // Finally play our file
                        soundPlayer.PlaySoundAsync(vmArgs.SoundFilename);
                    }
                }
            }
        }
        private void btnSaveMessage_Click(object sender, EventArgs e)
        {
            WOSI.CallButler.Data.CallButlerDataset.VoicemailsRow vRow = GetSelectedVoicemail();
            if (vRow != null)
            {
                saveFileDialog.FileName = vRow.CallerUsername + ".snd";
                if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
                {
                    // Check to see if our voicemail already exists
                    if (GetVoicemailSound != null)
                    {
                        VoicemailEventArgs vmArgs = new VoicemailEventArgs(vRow);
                        GetVoicemailSound(this, vmArgs);

                        if (vmArgs.SoundFilename != String.Empty)
                        {
                            System.IO.File.Copy(vmArgs.SoundFilename, saveFileDialog.FileName, true);
                        }
                    }
                }
            }
        }
示例#3
0
        private void btnSaveMessage_Click(object sender, EventArgs e)
        {
            WOSI.CallButler.Data.CallButlerDataset.VoicemailsRow vRow = GetSelectedVoicemail();
            if (vRow != null)
            {
                saveFileDialog.FileName = vRow.CallerUsername + ".snd";
                if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
                {
                    // Check to see if our voicemail already exists
                    if (GetVoicemailSound != null)
                    {
                        VoicemailEventArgs vmArgs = new VoicemailEventArgs(vRow);
                        GetVoicemailSound(this, vmArgs);

                        if (vmArgs.SoundFilename != String.Empty)
                        {
                            System.IO.File.Copy(vmArgs.SoundFilename, saveFileDialog.FileName, true);
                        }
                    }
                }
            }
        }
示例#4
0
        private void btnPlay_Click(object sender, EventArgs e)
        {
            StopSound(false);

            // Check to see if our voicemail already exists
            WOSI.CallButler.Data.CallButlerDataset.VoicemailsRow voicemail = GetSelectedVoicemail();

            if (voicemail != null)
            {
                if (GetVoicemailSound != null)
                {
                    VoicemailEventArgs vmArgs = new VoicemailEventArgs(voicemail);
                    GetVoicemailSound(this, vmArgs);

                    if (File.Exists(vmArgs.SoundFilename))
                    {
                        btnStop.Enabled = true;
                        btnPlay.Enabled = false;

                        // Finally play our file
                        soundPlayer.PlaySoundAsync(vmArgs.SoundFilename);
                    }
                }
            }
        }