コード例 #1
0
 private void Pause_Click(object sender, EventArgs e)
 {
     if (AudioPlayOrginal != null)
     {
         AudioPlayOrginal.Pause();
         audioIsOginalPlayed = false;
     }
 }
コード例 #2
0
 private void Pause_Click(object sender, EventArgs e)
 {
     if (AudioPlay != null)
     {
         AudioPlay.Pause();
         audioIsPlayed = false;
     }
 }
コード例 #3
0
 private void EncodeTextInWav_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (AudioPlayOrginal != null && audioIsOginalPlayed)
     {
         AudioPlayOrginal.Pause();
     }
     if (AudioPlaySteganography != null && audioIsSteganographPlayed)
     {
         AudioPlaySteganography.Pause();
     }
 }
コード例 #4
0
        private void loadSteganographWav_Click(object sender, EventArgs e)
        {
            string file = audioManipulation.getFille("(*.wav)|*.wav");

            if (Path.GetExtension(file) == ".wav")
            {
                audioSteganohraph     = audioManipulation.getWavFile(file);
                AudioPlaySteganohraph = new AudioPlay(file);
                fille2Label.ForeColor = Color.Black;
                fille2Label.Text      = string.Format("Wykożystujesz plik wave: {0}", Path.GetFileName(file));
                fille2Label.Visible   = true;
            }
            else
            {
                AudioPlaySteganohraph = null;
                audioSteganohraph     = null;
                fille2Label.Text      = "Nie wybrałeś pliku wav";
                fille2Label.ForeColor = Color.Red;
                if (audioSteganohraphIsPalyed)
                {
                    AudioPlaySteganohraph.Pause();
                    audioSteganohraphIsPalyed = false;
                    playSteganograph.Text     = "Play";
                }
            }
        }
コード例 #5
0
 private void Play_Click(object sender, EventArgs e)
 {
     if (AudioPlay != null)
     {
         if (audioIsPlayed)
         {
             AudioPlay.Pause();
             audioIsPlayed = false;
             Play.Text     = "Play";
         }
         else
         {
             AudioPlay.Play();
             audioIsPlayed = true;
             Play.Text     = "Pause";
         }
     }
 }
コード例 #6
0
 private void playSteganograph_Click(object sender, EventArgs e)
 {
     if (AudioPlaySteganography != null)
     {
         if (audioIsSteganographPlayed)
         {
             AudioPlaySteganography.Pause();
             audioIsSteganographPlayed = false;
             playSteganograph.Text     = "Play";
         }
         else
         {
             AudioPlaySteganography.Play();
             audioIsSteganographPlayed = true;
             playSteganograph.Text     = "Pause";
         }
     }
 }
コード例 #7
0
        private void loadFile_Click(object sender, EventArgs e)
        {
            string file = audioManipulation.getFille("(*.wav)|*.wav");

            if (Path.GetExtension(file) == ".wav")
            {
                audioBeforeSteganography = audioManipulation.getWavFile(file);
                isSteganograph.Text      = audioSteganography.CheckWav(audioBeforeSteganography);
                AudioPlayOrginal         = new AudioPlay(file);
                var bitsToEncode = new BindingList <KeyValuePair <int, int> >();
                for (int i = 1; i <= audioBeforeSteganography.bitsPerSample; i++)
                {
                    bitsToEncode.Add(new KeyValuePair <int, int>(i, i));
                }
                comboBox1.Visible       = true;
                comboBox1.DataSource    = bitsToEncode;
                comboBox1.ValueMember   = "Key";
                comboBox1.DisplayMember = "Value";
                comboBox1.SelectedIndex = 0;
                label1.Visible          = true;;
                encodeLabel.ForeColor   = Color.Black;
                encodeLabel.Text        = string.Format("Wykożystujesz plik wave: {0}", Path.GetFileName(file));
                encodeLabel.Visible     = true;
                calculateFreeMemorySize();
            }
            else
            {
                AudioPlayOrginal         = null;
                audioBeforeSteganography = null;
                encodeLabel.Text         = "Nie wybrałeś pliku wav";
                encodeLabel.ForeColor    = Color.Red;
                if (audioIsOginalPlayed)
                {
                    AudioPlayOrginal.Pause();
                    audioIsOginalPlayed = false;
                    Play.Text           = "Play";
                }
            }
        }