private void Midi_DeviceInputStatusChanged(int index, eTodoMidiStatus status) { BeginInvoke((MethodInvoker) delegate() { this.lvMidiInput.Items[index].SubItems[4].Text = status.ToString(); if (status == eTodoMidiStatus.Disconnected || status == eTodoMidiStatus.Error) { this.lvMidiInput.Items[index].BackColor = Color.LightSalmon; this.lvMidiInput.Items[index].SubItems[2].Text = "False"; } else { if (status == eTodoMidiStatus.Started) { this.lvMidiInput.Items[index].BackColor = Color.LightGreen; this.lvMidiInput.Items[index].SubItems[2].Text = "True"; } else { this.lvMidiInput.Items[index].BackColor = Color.White; this.lvMidiInput.Items[index].SubItems[2].Text = "False"; } } }); }
private void OnMidiOutputStatusChange(int index, eTodoMidiStatus status) { if (this.DeviceOutputStatusChanged != null) { this.DeviceOutputStatusChanged(index, status); } }