SchemaFactor.Vst.MidiMapperX.MainWindow.InitializeGrid C# (CSharp) Method

InitializeGrid() private method

private InitializeGrid ( ) : void
return void
        private void InitializeGrid()
        {
            int XNudge = MainPanel.Location.X + 1;
            int YSpacing = MapperTextBox.OCRFont.Height + 6;
            int YSize = 16;

            for (int note = 0; note < Constants.MAXNOTES; note++)
            {
                int Yloc = 2 + note * YSpacing;

                // Note Number
                MapperTextBox mtb = new MapperTextBox(NoteNumber.Location.X - XNudge - 10, Yloc, NoteNumber.Size.Width, YSize, "Note # that triggers this map.", true);
                mtb.Text = note.ToString("000");
                MapNums[note] = mtb;
                MainPanel.Controls.Add(mtb);

                // Map Name
                mtb = new MapperTextBox(MapName.Location.X - XNudge, Yloc, MapName.Size.Width, YSize, "Enter a name for this mapping.");
                mtb.Text = "Undefined " + note;
                MapNames[note] = mtb;
                mtb.nocheck = true;
                mtb.LostFocus += TextBoxExited;
                MainPanel.Controls.Add(mtb);

                // Note On
                mtb = new MapperTextBox(MIDIDataOn.Location.X - XNudge, Yloc, MIDIDataOn.Size.Width, YSize, "Enter bytes to send in hexadecimal in the form ## ## ##...\nUse N for Channel and VV for Velocity from original note.\nLeave blank to ignore Note On events.");
                mtb.CharacterCasing = CharacterCasing.Upper;
                OnMaps[note] = mtb;
                mtb.LostFocus += TextBoxExited;
                MainPanel.Controls.Add(mtb);

                // Note Off
                mtb = new MapperTextBox(MIDIDataOff.Location.X - XNudge, Yloc, MIDIDataOff.Size.Width, YSize, "Enter bytes to send in hexadecimal in the form ## ## ##...\nUse N for Channel and VV for Velocity from original note.\nLeave blank to ignore Note Off events.");
                mtb.CharacterCasing = CharacterCasing.Upper;
                OffMaps[note] = mtb;
                mtb.LostFocus += TextBoxExited;
                MainPanel.Controls.Add(mtb);

                // New!  CCs
                mtb = new MapperTextBox(MIDIDataCC.Location.X - XNudge, Yloc, MIDIDataCC.Size.Width, YSize, "Enter bytes to send in hexadecimal in the form ## ## ##...\nUse N for Channel and VV for Value from original CC.\nLeave blank to ignore CC events.");
                mtb.CharacterCasing = CharacterCasing.Upper;
                CCMaps[note] = mtb;
                mtb.LostFocus += TextBoxExited;
                MainPanel.Controls.Add(mtb);
            }
        }