Esempio n. 1
0
        private void DisplayNextNote()
        {
            int  actualNoteIndex = Convert.ToInt32(this.ActualNoteIndex.Value);
            Tone nextTone        = this.GetNextToneToDisplay();

            if (nextTone != null)
            {
                StaveObjectsPosition        sop          = new StaveObjectsPosition(226, 30);
                Tuple <Point, Point, Point> notePosition = sop.DrawNote(nextTone, 150 + (117 * (actualNoteIndex - 1)));

                this.ActualNoteIndex.Value = (Convert.ToInt32(this.ActualNoteIndex.Value) + 1).ToString();
                this.PreviousTone.Value    = nextTone.Name;

                switch (actualNoteIndex)
                {
                case 1: this.ChangePositionOfNote(notePosition, this.Note1, this.LedgerLine1, this.SharpFlatSymbol1,
                                                  nextTone);
                    break;

                case 2: this.ChangePositionOfNote(notePosition, this.Note2, this.LedgerLine2, this.SharpFlatSymbol2,
                                                  nextTone);
                    break;

                case 3: this.ChangePositionOfNote(notePosition, this.Note3, this.LedgerLine3, this.SharpFlatSymbol3,
                                                  nextTone);
                    break;

                case 4: this.ChangePositionOfNote(notePosition, this.Note4, this.LedgerLine4, this.SharpFlatSymbol4,
                                                  nextTone);
                    break;

                case 5: this.ChangePositionOfNote(notePosition, this.Note5, this.LedgerLine5, this.SharpFlatSymbol5,
                                                  nextTone);
                    break;

                case 6: this.ChangePositionOfNote(notePosition, this.Note6, this.LedgerLine6, this.SharpFlatSymbol6,
                                                  nextTone);
                    break;

                case 7: this.ChangePositionOfNote(notePosition, this.Note7, this.LedgerLine7, this.SharpFlatSymbol7,
                                                  nextTone);
                    break;

                case 8: this.ChangePositionOfNote(notePosition, this.Note8, this.LedgerLine8, this.SharpFlatSymbol8,
                                                  nextTone);
                    this.SetQuestionAsAnswered();
                    break;
                }
            }
        }
Esempio n. 2
0
        private void NextExercise()
        {
            this.clearAnswerLabels();
            this.ChangeBackgroundOfAnswerButtons("#8C8C8C");
            IntervalGenerator intervalGenerator = new IntervalGenerator();

            ActualInterval = intervalGenerator.GenerateIntervalWithTones();

            StaveObjectsPosition sop = new StaveObjectsPosition(226, 30);

            Tuple <Point, Point, Point>[] notesPosition = sop.DrawInterval(ActualInterval, 240);

            this.ChangePositionOfNote(notesPosition[0], this.Note1, this.LedgerLine1, this.SharpFlatSymbol1,
                                      this.ActualInterval.Tone1);
            this.ChangePositionOfNote(notesPosition[1], this.Note2, this.LedgerLine2, this.SharpFlatSymbol2,
                                      this.ActualInterval.Tone2);
        }
Esempio n. 3
0
        private void SetQuestionAsAnswered()
        {
            StaveObjectsPosition sop = new StaveObjectsPosition(226, 30);

            Tuple <Point, Point, Point>[] notesPosition = sop.DrawInterval(this.ActualInterval, 240);

            this.ChangePositionOfNote(notesPosition[0], this.Note1, this.LedgerLine1, this.SharpFlatSymbol1,
                                      this.ActualInterval.Tone1);
            this.ChangePositionOfNote(notesPosition[1], this.Note2, this.LedgerLine2, this.SharpFlatSymbol2,
                                      this.ActualInterval.Tone2);

            this.Tone1Index.Value = "";

            Note1.Style.Add("cursor", "default");
            LedgerLine1.Style.Add("cursor", "default");
            SharpFlatSymbol1.Style.Add("cursor", "default");
        }
Esempio n. 4
0
        private void NextExercise()
        {
            this.HideSecondNote();
            this.AddPointerToFirstNote();

            IntervalGenerator intervalGenerator = new IntervalGenerator();

            this.ActualInterval             = intervalGenerator.GenerateIntervalWithTones();
            this.QuestionInterval.InnerText = this.ActualInterval.GeneralInterval.ToString();
            this.QuestionInterval.Attributes.Add("title",
                                                 this.WholeIntervalAdjective(this.ActualInterval.GeneralInterval.adjective) + " " +
                                                 this.WholeIntervalNumeral(this.ActualInterval.GeneralInterval.numeral));
            this.Tone1Index.Value = ToneGraph.GetReferenceToneIndex(this.ActualInterval.Tone1).ToString();

            StaveObjectsPosition        sop          = new StaveObjectsPosition(226, 30);
            Tuple <Point, Point, Point> notePosition = sop.DrawNote(this.ActualInterval.Tone1, 240);

            this.ChangePositionOfNote(notePosition, this.Note1, this.LedgerLine1, this.SharpFlatSymbol1,
                                      this.ActualInterval.Tone1);
        }
        private void SetQuestionAsAnswered()
        {
            StaveObjectsPosition sop = new StaveObjectsPosition(226, 30);
            Tuple<Point, Point, Point>[] notesPosition = sop.DrawInterval(this.ActualInterval, 240);

            this.ChangePositionOfNote(notesPosition[0], this.Note1, this.LedgerLine1, this.SharpFlatSymbol1,
                                      this.ActualInterval.Tone1);
            this.ChangePositionOfNote(notesPosition[1], this.Note2, this.LedgerLine2, this.SharpFlatSymbol2,
                                      this.ActualInterval.Tone2);

            this.Tone1Index.Value = "";

            Note1.Style.Add("cursor", "default");
            LedgerLine1.Style.Add("cursor", "default");
            SharpFlatSymbol1.Style.Add("cursor", "default");
        }
        private void NextExercise()
        {
            this.HideSecondNote();
            this.AddPointerToFirstNote();

            IntervalGenerator intervalGenerator = new IntervalGenerator();
            this.ActualInterval = intervalGenerator.GenerateIntervalWithTones();
            this.QuestionInterval.InnerText = this.ActualInterval.GeneralInterval.ToString();
            this.QuestionInterval.Attributes.Add("title",
                this.WholeIntervalAdjective(this.ActualInterval.GeneralInterval.adjective) + " " +
                this.WholeIntervalNumeral(this.ActualInterval.GeneralInterval.numeral));
            this.Tone1Index.Value = ToneGraph.GetReferenceToneIndex(this.ActualInterval.Tone1).ToString();

            StaveObjectsPosition sop = new StaveObjectsPosition(226, 30);
            Tuple<Point, Point, Point> notePosition = sop.DrawNote(this.ActualInterval.Tone1, 240);

            this.ChangePositionOfNote(notePosition, this.Note1, this.LedgerLine1, this.SharpFlatSymbol1,
                                      this.ActualInterval.Tone1);
        }
        private void DisplayNextNote()
        {
            int actualNoteIndex = Convert.ToInt32(this.ActualNoteIndex.Value);
            Tone nextTone = this.GetNextToneToDisplay();

            if (nextTone != null)
            {
                StaveObjectsPosition sop = new StaveObjectsPosition(226, 30);
                Tuple<Point, Point, Point> notePosition = sop.DrawNote(nextTone, 150 + (117 * (actualNoteIndex - 1)));

                this.ActualNoteIndex.Value = (Convert.ToInt32(this.ActualNoteIndex.Value) + 1).ToString();
                this.PreviousTone.Value = nextTone.Name;

                switch (actualNoteIndex)
                {
                    case 1: this.ChangePositionOfNote(notePosition, this.Note1, this.LedgerLine1, this.SharpFlatSymbol1,
                                 nextTone);
                            break;
                    case 2: this.ChangePositionOfNote(notePosition, this.Note2, this.LedgerLine2, this.SharpFlatSymbol2,
                                nextTone);
                             break;
                    case 3: this.ChangePositionOfNote(notePosition, this.Note3, this.LedgerLine3, this.SharpFlatSymbol3,
                                nextTone);
                             break;
                    case 4: this.ChangePositionOfNote(notePosition, this.Note4, this.LedgerLine4, this.SharpFlatSymbol4,
                                nextTone);
                            break;
                    case 5: this.ChangePositionOfNote(notePosition, this.Note5, this.LedgerLine5, this.SharpFlatSymbol5,
                                nextTone);
                            break;
                    case 6: this.ChangePositionOfNote(notePosition, this.Note6, this.LedgerLine6, this.SharpFlatSymbol6,
                                nextTone);
                            break;
                    case 7: this.ChangePositionOfNote(notePosition, this.Note7, this.LedgerLine7, this.SharpFlatSymbol7,
                                nextTone);
                            break;
                    case 8: this.ChangePositionOfNote(notePosition, this.Note8, this.LedgerLine8, this.SharpFlatSymbol8,
                                nextTone);
                            this.SetQuestionAsAnswered();
                            break;
                }
            }
        }
Esempio n. 8
0
        private void NextExercise()
        {
            this.clearAnswerLabels();
            this.ChangeBackgroundOfAnswerButtons("#8C8C8C");
            IntervalGenerator intervalGenerator = new IntervalGenerator();
            ActualInterval = intervalGenerator.GenerateIntervalWithTones();

            StaveObjectsPosition sop = new StaveObjectsPosition(226, 30);
            Tuple<Point, Point, Point>[] notesPosition = sop.DrawInterval(ActualInterval, 240);

            this.ChangePositionOfNote(notesPosition[0], this.Note1, this.LedgerLine1, this.SharpFlatSymbol1,
                                      this.ActualInterval.Tone1);
            this.ChangePositionOfNote(notesPosition[1], this.Note2, this.LedgerLine2, this.SharpFlatSymbol2,
                                      this.ActualInterval.Tone2);
        }