Server/FormEditAction.cs
author Stephane Lenclud
Sun, 24 Jul 2016 13:30:08 +0200
changeset 212 1a0791daa243
parent 211 96f8b4dc4300
child 214 4961ede27e0a
permissions -rw-r--r--
Actions persistence working.
     1 using System;
     2 using System.Collections.Generic;
     3 using System.ComponentModel;
     4 using System.Data;
     5 using System.Drawing;
     6 using System.Linq;
     7 using System.Text;
     8 using System.Threading.Tasks;
     9 using System.Windows.Forms;
    10 using SharpLib.Ear;
    11 
    12 namespace SharpDisplayManager
    13 {
    14     public partial class FormEditAction : Form
    15     {
    16         public SharpLib.Ear.Action Action = null;
    17 
    18         public FormEditAction()
    19         {
    20             InitializeComponent();
    21         }
    22 
    23         private void FormEditAction_Load(object sender, EventArgs e)
    24         {
    25             //Populate registered actions
    26             foreach (string key in ManagerEventAction.Current.ActionTypes.Keys)
    27             {
    28                 Type t = ManagerEventAction.Current.ActionTypes[key];
    29                 comboBoxActionType.Items.Add(t);                
    30             }
    31 
    32             comboBoxActionType.SelectedIndex = 0;
    33         }
    34 
    35         private void buttonOk_Click(object sender, EventArgs e)
    36         {
    37             Action = (SharpLib.Ear.Action)Activator.CreateInstance((Type)comboBoxActionType.SelectedItem);
    38         }
    39 
    40         private void FormEditAction_Validating(object sender, CancelEventArgs e)
    41         {
    42 
    43         }
    44     }
    45 }