Пример #1
0
        public void GetScaleNotes()
        {
            String[] testNotes = { "A", "B", "C#", "D", "E", "F#", "G#" };
            var      notes     = _scaleFinderController.GetScaleNotes("Ionian", "A");

            if (testNotes.Length != notes.Length)
            {
                Assert.Fail();
            }

            for (int i = 0; i < testNotes.Length; i++)
            {
                if (testNotes[i] != notes[i])
                {
                    Assert.Fail();
                }
            }
        }
        private void UpdateChords()
        {
            ScaleLabel.Content = "Scale: ";
            StringBuilder builder = new StringBuilder();

            foreach (
                String note in
                _controller.GetScaleNotes(ScaleBox.SelectedValue.ToString(), KeyBox.SelectedValue.ToString()))
            {
                if (builder.Length != 0)
                {
                    builder.Append(", " + note);
                }
                else
                {
                    builder.Append(note);
                }
            }
            ScaleLabel.Content += builder.ToString();
        }