private void init() { //MainPage.BT.Write("$B"); this.Rack.Visibility = Visibility.Collapsed; this.finishedTextBox.Visibility = Visibility.Collapsed; this.finishedTextBox1.Visibility = Visibility.Collapsed; this.repeatButton.Visibility = Visibility.Collapsed; this.nextLesoonButton.Visibility = Visibility.Collapsed; this.lessonsButton.Visibility = Visibility.Collapsed; i = 0; lessonNumber = MainPage.userDetails.lastLesson; sl = chooseLesson.DB.getLesson(lessonNumber); if (sl.getType() == "chords") { chordBlock.Text = sl.getchordsList()[0].ToString(); writeChord(sl.getchordsList()[0].ToString()); lessonSize = sl.getchordsList().Count(); nextButtun.Visibility = Visibility.Visible; prevButtun.Visibility = Visibility.Visible; } else //its a song { showMenu(); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed; lessonNumber = MainPage.userDetails.lastLesson; sl = chooseLesson.DB.getLesson(lessonNumber); if (sl.getType() == "chords") { chordBlock.Text = sl.getchordsList()[0].ToString(); lessonSize = sl.getchordsList().Count(); nextButtun.Visibility = Visibility.Visible; prevButtun.Visibility = Visibility.Visible; //TODO //GuitarMethods.setMode(Mode.Chords); //GuitarMethods.playChord(sl.getchordsList()[0])){ } else //its a song { //TODO //GuitarMethods.setMode(Mode.Stream); //GuitarMethods.playChord(sl.getchordsList()[0]); //set stream to return bool // if (GuitarMethods.Stream(sl.getchordsList().ToArray(), sl.getDelaysList().ToArray(), true)){ // showMenu(); // } showMenu(); } }
public void addLesson(int lessonNum, singleLesson lesson) { lessonDataBase.Add(lessonNum, lesson); return; }