コード例 #1
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();
        }
コード例 #2
0
        public void SetMappingRecord(MidiMappingRecord record)
        {
            LoadActions();

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

                RefreshActionSelection();
                RefreshMidiInputText();
                RefreshParameterText();
            }
        }
コード例 #3
0
        public void SetMappingRecord(MidiMappingRecord record)
        {
            LoadActions();

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

                RefreshActionSelection();
                RefreshMidiInputText();
                RefreshParameterText();
            }
        }
コード例 #4
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];
            }
        }
コード例 #5
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];
            }
        }
コード例 #6
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();
 }