Beispiel #1
0
 public AddWindow()
 {
     InitializeComponent();
     this.songStyle = SongStyle.None;
     SetTheme();
     SetLanguage();
 }
Beispiel #2
0
 public Song(Song sng)
 {
     this.Title = sng.Title;
     this.Author = sng.Author;
     this.Path = sng.Path;
     this.Style = sng.Style;
 }
Beispiel #3
0
 public Song(string author, string title, SongStyle style, double length, string path)
 {
     Title = title;
     Author = author;
     Style = style;
     Path = path;
 }
 public static void SwitchMusicStyle()
 {
     if (currentSongStyle == SongStyle.Play)
     {
         currentSongStyle = SongStyle.Lobby;
     }
     else
     {
         currentSongStyle = SongStyle.Play;
     }
 }
Beispiel #5
0
        public Song ComposeSong(string root, int octave, ScaleType mode, float minNoteLength)
        {
            var song = CreateSong(minNoteLength);

            MusicalScale scale = new MusicalScale(root, mode, octave);

            SongStyle songStyle = new SongStyle(this, song, scale, minNoteLength);

            songStyle
            .Compose();

            return(song);
        }
        public void StartNewSong(SongStyle style = SongStyle.Lobby)
        {
            foreach (ListOfMusic list in StackOfMusic)
            {
                if (list.style == style)
                {
                    Song song = list.GetRandomSongFromList();

                    lastPlayedSong = song;
                    _source.clip   = song.clip;
                    _source.Play();
                }
            }
        }
Beispiel #7
0
        private void RadioButton_Checked(object sender, RoutedEventArgs e)
        {
            var checkedRadioButton = sender as RadioButton;

            this.songStyle = Song.TryParse(checkedRadioButton.Content.ToString());
        }
Beispiel #8
0
 private void RadioButton_Checked(object sender, RoutedEventArgs e){
     var checkedRadioButton = sender as RadioButton;
     
     this.songStyle = Song.TryParse(checkedRadioButton.Content.ToString());
 }
Beispiel #9
0
 public AddWindow(){
     InitializeComponent();
     this.songStyle = SongStyle.None;
     SetTheme();
     SetLanguage();
 }