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.
StephaneLenclud@211
     1
using System;
StephaneLenclud@211
     2
using System.Collections.Generic;
StephaneLenclud@211
     3
using System.ComponentModel;
StephaneLenclud@211
     4
using System.Data;
StephaneLenclud@211
     5
using System.Drawing;
StephaneLenclud@211
     6
using System.Linq;
StephaneLenclud@211
     7
using System.Text;
StephaneLenclud@211
     8
using System.Threading.Tasks;
StephaneLenclud@211
     9
using System.Windows.Forms;
StephaneLenclud@211
    10
using SharpLib.Ear;
StephaneLenclud@211
    11
StephaneLenclud@211
    12
namespace SharpDisplayManager
StephaneLenclud@211
    13
{
StephaneLenclud@211
    14
    public partial class FormEditAction : Form
StephaneLenclud@211
    15
    {
StephaneLenclud@211
    16
        public SharpLib.Ear.Action Action = null;
StephaneLenclud@211
    17
StephaneLenclud@211
    18
        public FormEditAction()
StephaneLenclud@211
    19
        {
StephaneLenclud@211
    20
            InitializeComponent();
StephaneLenclud@211
    21
        }
StephaneLenclud@211
    22
StephaneLenclud@211
    23
        private void FormEditAction_Load(object sender, EventArgs e)
StephaneLenclud@211
    24
        {
StephaneLenclud@211
    25
            //Populate registered actions
Stephane@212
    26
            foreach (string key in ManagerEventAction.Current.ActionTypes.Keys)
StephaneLenclud@211
    27
            {
Stephane@212
    28
                Type t = ManagerEventAction.Current.ActionTypes[key];
StephaneLenclud@211
    29
                comboBoxActionType.Items.Add(t);                
StephaneLenclud@211
    30
            }
StephaneLenclud@211
    31
StephaneLenclud@211
    32
            comboBoxActionType.SelectedIndex = 0;
StephaneLenclud@211
    33
        }
StephaneLenclud@211
    34
StephaneLenclud@211
    35
        private void buttonOk_Click(object sender, EventArgs e)
StephaneLenclud@211
    36
        {
StephaneLenclud@211
    37
            Action = (SharpLib.Ear.Action)Activator.CreateInstance((Type)comboBoxActionType.SelectedItem);
StephaneLenclud@211
    38
        }
StephaneLenclud@211
    39
StephaneLenclud@211
    40
        private void FormEditAction_Validating(object sender, CancelEventArgs e)
StephaneLenclud@211
    41
        {
StephaneLenclud@211
    42
StephaneLenclud@211
    43
        }
StephaneLenclud@211
    44
    }
StephaneLenclud@211
    45
}