Beispiel #1
0
 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();
     }
 }
Beispiel #2
0
        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();
            }
        }
Beispiel #3
0
 private void nextButtun_Click(object sender, RoutedEventArgs e)
 {
     if (i < lessonSize - 1)
     {
         ++i;
         chordBlock.Text = sl.getchordsList()[i].ToString();
         writeChord(sl.getchordsList()[i].ToString());
     }
     else       //finished lesson
     {
         MainPage.BT.Write("$B");
         this.chordBlock.Text             = "";
         this.nextButtun.Visibility       = Visibility.Collapsed;
         this.prevButtun.Visibility       = Visibility.Collapsed;
         this.Rack.Visibility             = Visibility.Visible;
         this.finishedTextBox.Visibility  = Visibility.Visible;
         this.finishedTextBox1.Visibility = Visibility.Visible;
         this.repeatButton.Visibility     = Visibility.Visible;
         this.nextLesoonButton.Visibility = Visibility.Visible;
         this.lessonsButton.Visibility    = Visibility.Visible;
     }
 }
Beispiel #4
0
 private void nextButtun_Click(object sender, RoutedEventArgs e)
 {
     if (i < lessonSize - 1)
     {
         ++i;
         chordBlock.Text = sl.getchordsList()[i].ToString();
         //  popUp(i.ToString());
         //GuitarMethods.playChord(sl.getchordsList()[i]))
     }
     else       //finished lesson
     {
         this.chordBlock.Text             = "";
         this.nextButtun.Visibility       = Visibility.Collapsed;
         this.prevButtun.Visibility       = Visibility.Collapsed;
         this.Rack.Visibility             = Visibility.Visible;
         this.finishedTextBox.Visibility  = Visibility.Visible;
         this.finishedTextBox1.Visibility = Visibility.Visible;
         this.repeatButton.Visibility     = Visibility.Visible;
         this.nextLesoonButton.Visibility = Visibility.Visible;
         this.lessonsButton.Visibility    = Visibility.Visible;
     }
 }