Server/ItemActionType.cs
author StephaneLenclud
Sun, 21 Aug 2016 19:31:08 +0200
changeset 251 f60cfcb98c9a
parent 219 99c407831232
permissions -rw-r--r--
Published v0.12.2.0
Adding setting for Logitech user name.
Improved event tree view update following Harmony connection.
Removed unneeded editable fields from Harmony command action.
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
}