Server/ItemActionType.cs
author Stephane Lenclud
Thu, 18 Aug 2016 20:14:30 +0200
changeset 242 0a956121c273
parent 219 99c407831232
permissions -rw-r--r--
Weird signing crap.
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
}