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