当前位置: 首页>>代码示例>>C#>>正文


C# EventTypes.ToString方法代码示例

本文整理汇总了C#中EventTypes.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# EventTypes.ToString方法的具体用法?C# EventTypes.ToString怎么用?C# EventTypes.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EventTypes的用法示例。


在下文中一共展示了EventTypes.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UniEvent

        public UniEvent(EventTypes type)
        {
            Type = type;
            Actions = new List<UniAction>();

            Options = new JSONObject();
            Options.AddField("type", Type.ToString());
        }
开发者ID:bL00RiSe,项目名称:UniMaker,代码行数:8,代码来源:UniEvent.cs

示例2: EventHandlerProperty

 public EventHandlerProperty(EventTypes eventType)
     : base()
 {
     EventType = eventType;
     TargetValueType = mdr.ValueTypes.Function;
     //We should static or constants in the following methods to avoid expensive delegates!
     OnGetDValue = (mdr.DObject This, ref mdr.DValue v) =>
     {
         var eventListeners = GetEventListeners(This, eventType);
         var idlListener = eventListeners.IdlListener;
         if (idlListener != null)
             v.Set(idlListener);
         else
             v.Set(mdr.Runtime.Instance.DefaultDNull);
     };
     OnSetDValue = (mdr.DObject This, ref mdr.DValue v) =>
     {
         var eventListeners = GetEventListeners(This, eventType);
         Debug.WriteLine("Setting the IDL listener for event type " + eventType.ToString() + " : type " + v.ValueType.ToString());
         var idlListener = (v.ValueType == mdr.ValueTypes.Function) ? v.AsDFunction() : null;
         eventListeners.IdlListener = idlListener;
     };
 }
开发者ID:reshadi2,项目名称:mcjs,代码行数:23,代码来源:EventHandlerProperty.cs

示例3: CreateEventComment

        XComment CreateEventComment( EventTypes aType, int aParameter )
        {
            string parameter = null;
              Dictionary<int, string> parameterNames;

              if ( aType == EventTypes.Create || aType == EventTypes.Destroy || aType == EventTypes.Draw )
            return new XComment( "Node below refers to an event of type " + aType.ToString() );
              else if ( aType == EventTypes.Alarm )
            parameter = aParameter.ToString();
              else if ( aType == EventTypes.Collision )
            parameter = FindResourceName( m_gmk.Objects, aParameter );
              else if ( aType == EventTypes.Keyboard || aType == EventTypes.KeyPress || aType == EventTypes.KeyRelease )
            parameter = GetKeyName( aParameter );
              else if ( aType == EventTypes.Trigger )
            parameter = FindResourceName( m_gmk.Triggers, aParameter );
              else if ( EventTable.TryGetValue( aType, out parameterNames ) )
            parameter = parameterNames[aParameter];
              else if ( aType == EventTypes.Other ) {
            if ( aParameter >= 40 && aParameter <= 47 )
              parameter = "Outside view " + (aParameter - 40);
            else if ( aParameter >= 50 && aParameter <= 57 )
              parameter = "Boundary view " + (aParameter - 50);
              } else
            return null;

              return new XComment( "Node below refers to an event of type \"" + aType.ToString() +
                           "\" with parameter \"" + parameter + '"' );
        }
开发者ID:snakedeveloper,项目名称:GMK-Assembler,代码行数:28,代码来源:XmlExporter.cs

示例4: GetEventInstanceByType

 public static UniEvent GetEventInstanceByType(EventTypes type)
 {
     return (UniEvent)Activator.CreateInstance("Assembly-CSharp", "UniMaker.Events.Event" + type.ToString()).Unwrap();
 }
开发者ID:bL00RiSe,项目名称:UniMaker,代码行数:4,代码来源:UniEvent.cs


注:本文中的EventTypes.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。