Exemple #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!");
     }
 }
Exemple #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     tablatureProcessor.ChangeTune(GuitarTune.GetDefaultGuitarTune());
     UpdateText();
 }
Exemple #3
0
 public void ChangeTuneToThis(GuitarTune newTune)
 {
     this.StringTunes = newTune.StringTunes.Select(x => x).ToArray();
 }
Exemple #4
0
 public void ChangeTune(GuitarTune guitarTune)
 {
     this.Tune.ChangeTuneToThis(guitarTune);
 }
Exemple #5
0
 public StringRelatedChord(GuitarTune tune, List <int?> frets = null)
 {
     Tune  = tune;
     Frets = frets ?? new List <int?>();
 }
Exemple #6
0
 public TablatureProcessor(GuitarTune guitarTune = null)
 {
     this.Tune = guitarTune ?? GuitarTune.GetDefaultGuitarTune();
 }