public MidiCtrlDialog(string[] _cmds)
        {
            InitializeComponent();
            cmds = _cmds;

            ctrlChoice.ItemsSource       = ControllerLists.GetCtrlNames();
            ctrlChoice.SelectedIndex     = 0;
            ctrlChoice.SelectionChanged += CtrlBox_SelectionChanged;

            addCmd.ItemsSource       = ControllerLists.GetCmdList();
            addCmd.SelectionChanged += AddCmd_SelectionChanged;

            cmdBox.TextChanged += CmdBox_TextChanged;
        }
Пример #2
0
        public static DataTable GetMidiMapTable()
        {
            using (DataTable midiTable = new DataTable("MidiMap"))
            {
                midiTable.Columns.Add("Name");
                midiTable.Columns.Add("Commands");

                int x = 0;
                foreach (string name in ControllerLists.GetCtrlNames())
                {
                    midiTable.Rows.Add();
                    midiTable.Rows[x][0] = name;
                    midiTable.Rows[x][1] = string.Join(Environment.NewLine, ctrlVals.cmds[x]);
                    x++;
                }
                return(midiTable);
            }
        }