Server/ItemActionType.cs
author StephaneLenclud
Tue, 16 Aug 2016 12:59:32 +0200
changeset 235 ba14a29944c4
parent 219 99c407831232
permissions -rw-r--r--
Removing JSON type converter from ear manager.
Using bindings for some application settings.
StephaneLenclud@219
     1
using SharpLib.Ear;
StephaneLenclud@219
     2
using System;
StephaneLenclud@219
     3
using System.Collections.Generic;
StephaneLenclud@219
     4
using System.Linq;
StephaneLenclud@219
     5
using System.Text;
StephaneLenclud@219
     6
using System.Threading.Tasks;
StephaneLenclud@219
     7
StephaneLenclud@219
     8
namespace SharpDisplayManager
StephaneLenclud@219
     9
{
StephaneLenclud@219
    10
    /// <summary>
StephaneLenclud@219
    11
    /// Used to populate our action type combobox with friendly names
StephaneLenclud@219
    12
    /// </summary>
StephaneLenclud@231
    13
    class ItemObjectType
StephaneLenclud@219
    14
    {
StephaneLenclud@219
    15
        public Type Type;
StephaneLenclud@219
    16
StephaneLenclud@231
    17
        public ItemObjectType(Type type)
StephaneLenclud@219
    18
        {
StephaneLenclud@219
    19
            this.Type = type;
StephaneLenclud@219
    20
        }
StephaneLenclud@219
    21
StephaneLenclud@219
    22
        public override string ToString()
StephaneLenclud@219
    23
        {
StephaneLenclud@219
    24
            //Get friendly action name from action attribute.
StephaneLenclud@219
    25
            //That we then show up in our combobox
StephaneLenclud@231
    26
            return SharpLib.Utils.Reflection.GetAttribute<AttributeObject>(Type).Name;
StephaneLenclud@219
    27
        }
StephaneLenclud@219
    28
    }
StephaneLenclud@219
    29
}