Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         var guitarTune = new GuitarTune(textBox1.Text.Split(' ')
                                         .Select <string, int>(noteName => StaticUsefulStuff.ConvertToNoteIndex(noteName))
                                         .ToArray());
         var notes = StaticUsefulStuff.GetNotes();
         foreach (var desiredNoteIndex in guitarTune.StringTunes)
         {
             if (desiredNoteIndex < 0 || desiredNoteIndex >= notes.Count)
             {
                 throw new Exception();
             }
         }
         tablatureProcessor.ChangeTune(guitarTune);
     }
     catch
     {
         MessageBox.Show("Wrong syntax of desired tune, thus tune was not updated", "Error!");
     }
 }
Esempio n. 2
0
 private void button3_Click(object sender, EventArgs e)
 {
     tablatureProcessor.ChangeTune(GuitarTune.GetDefaultGuitarTune());
     UpdateText();
 }
Esempio n. 3
0
 public void ChangeTuneToThis(GuitarTune newTune)
 {
     this.StringTunes = newTune.StringTunes.Select(x => x).ToArray();
 }
Esempio n. 4
0
 public void ChangeTune(GuitarTune guitarTune)
 {
     this.Tune.ChangeTuneToThis(guitarTune);
 }
Esempio n. 5
0
 public StringRelatedChord(GuitarTune tune, List <int?> frets = null)
 {
     Tune  = tune;
     Frets = frets ?? new List <int?>();
 }
Esempio n. 6
0
 public TablatureProcessor(GuitarTune guitarTune = null)
 {
     this.Tune = guitarTune ?? GuitarTune.GetDefaultGuitarTune();
 }