Esempio n. 1
0
        public static ControlDial AddSoundFile(string s)
        {
            var ad = new AudioFileReader(s);
            var cd = new ControlDial();

            cd.audioFile = ad;
            cd.UpdateTooltip();
            cd.Width           = 690;
            cd.Height          = 755;
            cd.LayoutTransform = new ScaleTransform(0.15, 0.15);
            Files.Add(cd);
            SoundsListEx.Children.Add(cd);
            return(cd);
        }
Esempio n. 2
0
 public static void RemoveSoundFile(ControlDial file)
 {
     Files.Remove(file);
     SoundsListEx.Children.Remove(file);
     if (currentlyPlayingAudioFile == file.audioFile)
     {
         outputDevice.Stop();
         currentlyPlayingAudioFile = null;
         IsPlaying = false;
         MiniHud.TrackCurrentPos.Text = "00:00";
         MiniHud.TrackProgress.BeginAnimation(ProgressBar.ValueProperty, null);
         MiniHud.TrackProgress.Value    = 0;
         MainWindow.StopSource_Unloaded = true;
     }
 }