private void ThreadFunctionActionDecrypt(WavFormatManager wfm, String originalName)
        {
            WindowPasswordInput wpi = new WindowPasswordInput(WindowPasswordInput.ProcessType.DECRYPTION, originalName);

            if (wpi.ShowDialog() == true)
            {
                WavFormatManager encryptedSound = new WavFormatManager();
                encryptedSound.SetBitsPerSample(24);
                encryptedSound.SetSampleRate(wfm.GetSampleRate());

                if (wfm.GetNumberOfChannels() == 1)
                {
                    encryptedSound.SetChannelCount(1);

                    Complex[] frq = FourierTransform.FFT_segmented(wfm.ReadAudioMono());
                    CryptoFFT.Decrypt(frq, wpi.GetPassword());
                    encryptedSound.WriteAudioMono(FourierTransform.IFFT_segmented(frq));
                }
                else
                {
                    encryptedSound.SetChannelCount(2);

                    Complex[] frqLeft  = FourierTransform.FFT_segmented(wfm.ReadAudioLeft());
                    Complex[] frqRight = FourierTransform.FFT_segmented(wfm.ReadAudioRight());
                    CryptoFFT.Decrypt(frqLeft, wpi.GetPassword());
                    CryptoFFT.Decrypt(frqRight, wpi.GetPassword());
                    encryptedSound.WriteAudioLeft(FourierTransform.IFFT_segmented(frqLeft));
                    encryptedSound.WriteAudioRight(FourierTransform.IFFT_segmented(frqRight));
                }

                Dispatcher.Invoke(new AddSoundPanelDelegate(CommitProcessedSoundToInterface), encryptedSound, wpi.GetName());
            }
        }
        private void ThreadFunctionActionSave(WavFormatManager wfm, String originalName)
        {
            SaveFileDialog sfd = new SaveFileDialog();

            sfd.FileName = originalName + ".wav";
            if (sfd.ShowDialog() == true)
            {
                String filename = sfd.FileName;
                wfm.SetBitsPerSample(24);
                wfm.EncodeFile(filename);
            }
        }