예제 #1
0
        private void Add_Word_Click(object sender, RoutedEventArgs e)
        {
            string
                s0 = TB_Add1.Text.Trim(),
                s1 = TB_Add2.Text.Trim();

            if (s0.Length != 0 && s1.Length != 0)
            {
                var
                    todb = new WordMap {
                    Word = s0, Meaning = s1
                };
                words_.InsertSorted(todb, x => x.Word);
                // Show the first dialog.
                new PluginWordsRecord("English", todb.Id).ShowDialog();
                new PluginWordsRecord("Russian", todb.Id).ShowDialog();
                MP3Recorder.Mix(
                    "./Clips/" + todb.Id.ToString() + "_English_Russian.mp3",
                    "./Raw/" + todb.Id.ToString() + "_English.mp3",
                    "./Raw/" + todb.Id.ToString() + "_Russian.mp3");
                MP3Recorder.Mix(
                    "./Clips/" + todb.Id.ToString() + "_Russian_English.mp3",
                    "./Raw/" + todb.Id.ToString() + "_Russian.mp3",
                    "./Raw/" + todb.Id.ToString() + "_English.mp3");
            }
            TB_Add1.Text = "";
            TB_Add2.Text = "";
            TB_Add1.Focus();
        }
예제 #2
0
 private void Retry_Click(object sender, RoutedEventArgs e)
 {
     if (mp3_ != null)
     {
         mp3_.Dispose();
     }
     mp3_ = new MP3Recorder(name_);
 }