private void cmbAction_SelectedIndexChanged(object sender, EventArgs e)
        {
            var selectedAction = (IdeAutomatableAction)cmbAction.SelectedValue;

            if (selectedAction != null && (action == null || selectedAction.GetType() != action.GetType()))
            {
                action = selectedAction;
            }
            RefreshParameterText();
        }
        public void SetMappingRecord(MidiMappingRecord record)
        {
            LoadActions();

            if (record != null)
            {
                inputTrigger = record.Trigger;
                action = record.Action;

                RefreshActionSelection();
                RefreshMidiInputText();
                RefreshParameterText();
            }
        }
        public void SetMappingRecord(MidiMappingRecord record)
        {
            LoadActions();

            if (record != null)
            {
                inputTrigger = record.Trigger;
                action       = record.Action;

                RefreshActionSelection();
                RefreshMidiInputText();
                RefreshParameterText();
            }
        }
        private void LoadActions()
        {
            var actions = Assembly.GetExecutingAssembly().GetTypes()
                          .Where(type => typeof(IdeAutomatableAction).IsAssignableFrom(type) && !type.IsAbstract)
                          .Select(Activator.CreateInstance)
                          .Cast <IdeAutomatableAction>()
                          .OrderBy(act => act.DisplayOrder)
                          .ToArray();

            cmbAction.DataSource = actions;

            if (actions.Length > 0)
            {
                cmbAction.SelectedItem = actions[0];
                action = actions[0];
            }
        }
        private void LoadActions()
        {
            var actions = Assembly.GetExecutingAssembly().GetTypes()
                .Where(type => typeof(IdeAutomatableAction).IsAssignableFrom(type) && !type.IsAbstract)
                .Select(Activator.CreateInstance)
                .Cast<IdeAutomatableAction>()
                .OrderBy(act => act.DisplayOrder)
                .ToArray();

            cmbAction.DataSource = actions;

            if (actions.Length > 0)
            {
                cmbAction.SelectedItem = actions[0];
                action = actions[0];
            }
        }
 private void cmbAction_SelectedIndexChanged(object sender, EventArgs e)
 {
     var selectedAction = (IdeAutomatableAction)cmbAction.SelectedValue;
     if (selectedAction != null && (action == null || selectedAction.GetType() != action.GetType()))
     {
         action = selectedAction;
     }
     RefreshParameterText();
 }