public SMidiOutput ToOutput()
        {
            var r = new SMidiOutput();

            r.Type   = TypeOut;
            r.Action = new SMidiAction {
                Channel = _channel, Cmd = _cmd, Data1 = _data1, Data2 = _data2
            };
            return(r);
        }
 private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (parent.Device != null && parent.Device.IsReady())
     {
         var senderGrid = (DataGridView)sender;
         if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn)
         {
             SMidiOutput data = datalist_out[e.RowIndex].ToOutput();
             parent.Device.Send(data.Action);
         }
     }
 }
 public void OutputData(SMidiOutput d)
 {
     TypeOut = d.Type;
     setData(d.Action);
 }