Пример #1
0
        MethodInvoker updateList(Synth.Track track)
        {
            const int _column1Idx = 0;
            var       _trackIdx   = track.Index - 1; // exclude conductor track;

            return(() => {
                var _listViewItem = new ListViewItem(new string[] {
                    "  ●",
                    track.Name,
                    Synth.GetVoice(track.Index),
                    track.Channel.ToString(),
                    track.Bank.ToString(),
                    track.Program.ToString()
                });
                listView.BeginUpdate();
                listView.Items[_trackIdx] = _listViewItem;
                listView.Items[_trackIdx].UseItemStyleForSubItems = false;
                if (track.Sounds)
                {
                    listView.Items[_trackIdx].SubItems[_column1Idx].ForeColor = Color.Lime;
                }
                else
                {
                    listView.Items[_trackIdx].SubItems[_column1Idx].ForeColor = Color.Black;
                }
                listView.EndUpdate();
            });
        }
Пример #2
0
        public void GetVoiceTest2()
        {
            var _result = Synth.GetVoice(8);

            AreEqual("Power Kit", _result);
        }
Пример #3
0
        public void GetVoiceTest3()
        {
            var _result = Synth.GetVoice(4);

            AreEqual("Warm Pad", _result);
        }
Пример #4
0
        public void GetVoiceTest1()
        {
            var _result = Synth.GetVoice(1);

            AreEqual("Tuba", _result);
        }