Removing obsolete CEC options.
2 using System.Collections.Generic;
3 using System.ComponentModel;
8 using System.Threading.Tasks;
9 using System.Windows.Forms;
12 namespace SharpDisplayManager
15 /// Used to populate our action type combobox with friendly names
21 public ItemActionType(Type type)
26 public override string ToString()
28 //Get friendly action name from action attribute.
29 //That we then show up in our combobox
30 return SharpLib.Utils.Reflection.GetAttribute<AttributeAction>(Type).Name;
37 /// Action edit dialog form.
39 public partial class FormEditAction : Form
41 public SharpLib.Ear.Action Action = null;
43 public FormEditAction()
45 InitializeComponent();
48 private void FormEditAction_Load(object sender, EventArgs e)
50 //Populate registered actions
51 foreach (string key in ManagerEventAction.Current.ActionTypes.Keys)
53 ItemActionType item = new ItemActionType(ManagerEventAction.Current.ActionTypes[key]);
54 comboBoxActionType.Items.Add(item);
57 comboBoxActionType.SelectedIndex = 0;
60 private void buttonOk_Click(object sender, EventArgs e)
62 Action = (SharpLib.Ear.Action)Activator.CreateInstance(((ItemActionType)comboBoxActionType.SelectedItem).Type);
65 private void FormEditAction_Validating(object sender, CancelEventArgs e)