Server/ItemActionType.cs
author StephaneLenclud
Sat, 07 Jan 2017 20:21:42 +0100
changeset 277 71ba0dd622a5
parent 219 99c407831232
permissions -rw-r--r--
Created Audio Manager class.
Clean up CScore audio usage.
Fixing broken audio device change handler.
Fixed various audio Dispose deadlock due to Invoke usage.
Thus now using BeginInvoke instead.
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
}