52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace StgSharp.Graphics
|
|
{
|
|
|
|
|
|
public partial class Form
|
|
{
|
|
Dictionary<KeyboardKey, KeyEvent> keyEventDictionary = new Dictionary<KeyboardKey, KeyEvent>();
|
|
|
|
|
|
|
|
internal void InternalLoadInput(MethodInfo[] methods)
|
|
{
|
|
if (methods.Length == 0)
|
|
{
|
|
return;
|
|
}
|
|
foreach (MethodInfo m in methods) //find all methods decorated by RenderActivityAttribute
|
|
{
|
|
KeyEventAttribute attr = m.GetCustomAttribute<KeyEventAttribute>(false);
|
|
if (attr == null)
|
|
{
|
|
continue;
|
|
}
|
|
if (!m.IsStatic && (m.GetParameters().Length != 0) && (m.ReturnType != typeof(void)))
|
|
{
|
|
throw new NotSupportedException("A render activity cannot have parameters, returning value or be static.");
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
internal void InternalProcessInput()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
public sealed class KeyEvent
|
|
{
|
|
|
|
}
|
|
}
|