private void loadSongFromFile(string fileName) { this.CurrentSong = SongManager.LoadSong(fileName); if (this.currentSong.Patterns.Count > 0) { if (this.currentSong.PlayOrder.Count > 0) { this.currentPattern = this.currentSong.Patterns[this.currentSong.PlayOrder[0]]; } else { this.currentPattern = this.currentSong.Patterns[0]; } } this.songFileName = fileName; this.bindControls(); if (this.currentSong.Effects.Count > 0) { this.lstFX.ClearSelected(); this.lstFX.SelectedIndex = 0; } checkSawtoothExists(); this.lstInstruments.ClearSelected(); this.lstInstruments.SelectedIndex = 0; }
private Song loadSongFromResources() { Song result = null; using (MemoryStream songStream = new MemoryStream(Properties.Resources.OX)) { result = SongManager.LoadSong(songStream); } return(result); }