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


C# EventInfo类代码示例

本文整理汇总了C#中EventInfo的典型用法代码示例。如果您正苦于以下问题:C# EventInfo类的具体用法?C# EventInfo怎么用?C# EventInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: EventReceivedHandler

        public void EventReceivedHandler(object sender, EventInfo eventInfo)
        {
            if (eventInfo.Type == EventInfo.EventTypes.TAG_REPORT)
            {
                var tagid = eventInfo.GetParameter(EventInfo.EventTagReportParams.TagId);
                var antenna = eventInfo.GetParameter(EventInfo.EventTagReportParams.Antenna);
                var time = eventInfo.GetParameter(EventInfo.EventTagReportParams.Time);
                var phase = eventInfo.GetParameter(EventInfo.EventTagReportParams.Phase);
                var frequency = eventInfo.GetParameter(EventInfo.EventTagReportParams.Frequency);
                var rssi = eventInfo.GetParameter(EventInfo.EventTagReportParams.Rssi);

                var phaseAngle = _phaseUtils.PhaseAngle(phase);

                if (tagid != null)
                {
                    var reading = new Reading
                    {
                        TagId = tagid,
                        Antenna = antenna,
                        PhaseAngle = phaseAngle,
                        Frequency = frequency,
                        Rssi = rssi,
                        Time = time
                    };

                    //Console.WriteLine(reading);
                    Readings.Add(reading);
                }
            }
        }
开发者ID:kalayl,项目名称:rfid,代码行数:30,代码来源:EventReader.cs

示例2: OnPreferencesChanged

        protected override IEnumerator<object> OnPreferencesChanged(EventInfo evt, string[] prefNames)
        {
            string prefsJson = null;
            yield return Preferences.GetAllJson().Bind(() => prefsJson);

            yield return CallFunction("weaponhelper", "notifyPrefsChanged", prefsJson);
        }
开发者ID:kg,项目名称:shootbluesscripts,代码行数:7,代码来源:WeaponHelper.cs

示例3: __GetDeclaredEvents

		public override EventInfo[] __GetDeclaredEvents()
		{
			int token = this.MetadataToken;
			// TODO use binary search?
			for (int i = 0; i < module.EventMap.records.Length; i++)
			{
				if (module.EventMap.records[i].Parent == token)
				{
					int evt = module.EventMap.records[i].EventList - 1;
					int end = module.EventMap.records.Length > i + 1 ? module.EventMap.records[i + 1].EventList - 1 : module.Event.records.Length;
					EventInfo[] events = new EventInfo[end - evt];
					if (module.EventPtr.RowCount == 0)
					{
						for (int j = 0; evt < end; evt++, j++)
						{
							events[j] = new EventInfoImpl(module, this, evt);
						}
					}
					else
					{
						for (int j = 0; evt < end; evt++, j++)
						{
							events[j] = new EventInfoImpl(module, this, module.EventPtr.records[evt] - 1);
						}
					}
					return events;
				}
			}
			return Empty<EventInfo>.Array;
		}
开发者ID:ngraziano,项目名称:mono,代码行数:30,代码来源:TypeDefImpl.cs

示例4: ColorChanged

    void ColorChanged(EventInfo eventInfo)
    {
        ColorEventInfo info = (ColorEventInfo)eventInfo;
        currentColor = info.newColor;

        SetCurrentMaterials();
    }
开发者ID:ChromaTeamUPC,项目名称:ChromaVirus,代码行数:7,代码来源:ColoredObjectsManager.cs

示例5: BroadcastStateChange

    private void BroadcastStateChange(EventInfo eventInfo)
    {
        Debug.Log ("Broadcasting state change.");

        foreach (ScreenController screenController in screenControllers) {
            screenController.MatchStateChanged (eventInfo);
        }
    }
开发者ID:hackcraft-sk,项目名称:swarm,代码行数:8,代码来源:SceneManager.cs

示例6: OnPreferencesChanged

        protected override IEnumerator<object> OnPreferencesChanged(EventInfo evt, string[] prefNames)
        {
            long fontScale = 100, fontWidth = 100;
            yield return Preferences.Get<long>("FontScale").Bind(() => fontScale);
            yield return Preferences.Get<long>("FontWidth").Bind(() => fontWidth);

            yield return CallFunction("fontsizer", "setFontSize", fontScale / 100.0f, fontWidth / 100.0f);
        }
开发者ID:kg,项目名称:shootbluesscripts,代码行数:8,代码来源:FontSizer.cs

示例7: PlayerDied

    public void PlayerDied(EventInfo eventInfo)
    {
        PlayerController playerController = ((PlayerSpawnedEventInfo)eventInfo).player;

        switch (playerController.Id)
        {
            case 1: target1 = null; break;
            case 2: target2 = null; break;
        }
    }
开发者ID:ChromaTeamUPC,项目名称:ChromaVirus,代码行数:10,代码来源:MainCameraScript.cs

示例8: ColorChanged

 //Test function
 void ColorChanged(EventInfo eventInfo)
 {
     switch (((ColorEventInfo)eventInfo).newColor)
     {
         case ChromaColor.RED: RenderSettings.skybox.SetColor("_Tint", Color.red); break;
         case ChromaColor.GREEN: RenderSettings.skybox.SetColor("_Tint", Color.green); break;
         case ChromaColor.BLUE: RenderSettings.skybox.SetColor("_Tint", Color.blue); break;
         case ChromaColor.YELLOW: RenderSettings.skybox.SetColor("_Tint", Color.yellow); break;
     }
     
 }
开发者ID:ChromaTeamUPC,项目名称:ChromaVirus,代码行数:12,代码来源:GameManager.cs

示例9: TaskSheduler_ResourceHistory_ShouldConstructCorrectly

        // ReSharper disable InconsistentNaming
        public void TaskSheduler_ResourceHistory_ShouldConstructCorrectly()
        // ReSharper restore InconsistentNaming
        {
            var a = new List<IDebugState>();
            var b = new EventInfo(new DateTime(2001, 01, 01), new TimeSpan(1, 0, 0), new DateTime(2001, 01, 01), ScheduleRunStatus.Error, "sdf");
            var res = new ResourceHistory("output", a, b, "bob");
            Assert.AreEqual(a, res.DebugOutput);
            Assert.AreEqual(b, res.TaskHistoryOutput);
            Assert.AreEqual("bob", res.UserName);

        }
开发者ID:Robin--,项目名称:Warewolf,代码行数:12,代码来源:ResourceHistoryTest.cs

示例10: GetEventHandler

            /// <summary>
            /// Creates an event handler for the specified event
            /// </summary>
            /// <param Name="Info">The event info class of the event</param>
            /// <returns>The created event handler help class.</returns>
            public object GetEventHandler(EventInfo Info)
            {
                Type eventHandlerType = emitter.GetEventHandlerType(Info);

                // Call constructor of event handler type to create event handler
                ConstructorInfo myCtor = eventHandlerType.GetConstructor(new Type[] { typeof(EventInfo) });
                object[] ctorArgs = new object[] { Info };
                object eventHandler = myCtor.Invoke(ctorArgs);

                return eventHandler;
            }
开发者ID:royosherove,项目名称:cthru,代码行数:16,代码来源:EventHandlerFactory.cs

示例11: GetEventHandlerType

 /// <summary>
 /// Emits dynamically a event handler with a given signature, which fills all arguments of the event in an object array 
 /// and calls a common event.
 /// </summary>
 /// <returns></returns>
 public Type GetEventHandlerType(EventInfo Info)
 {
     string handlerName = assemblyName + Info.Name;
     Type tpEventHandler = (Type)handlerTypes[handlerName];
     if (tpEventHandler == null)
     {
     // Create the type
     tpEventHandler = EmitHelperClass(handlerName, Info);
     handlerTypes.Add(handlerName, tpEventHandler);
     }
     return tpEventHandler;
 }
开发者ID:royosherove,项目名称:cthru,代码行数:17,代码来源:EventHandlerFactory.cs

示例12: TestMethod1

        public void TestMethod1()
        {
            EventInfo eventinfo = new EventInfo();
            eventinfo.Name = "1";
            eventinfo.Root = "helo";
            eventinfo.Description = "helloo";
            eventinfo.Save();

            eventinfo = EventInfo.Load(1);

            eventinfo.DeleteOnSave();
        }
开发者ID:dalinhuang,项目名称:cq-police-photo-gallery,代码行数:12,代码来源:UnitTest1.cs

示例13: STElementInfo

 public STElementInfo(JSONNode stJson)
 {
     string spriteName = stJson["sprite"];
     m_alwaysSeen = stJson["doShow"].AsBool;
     JSONNode color = stJson["color"];
     Color col = Color.white;
     if(color != null) {
         col = new Color(color["r"].AsFloat, color["g"].AsFloat, color["b"].AsFloat);
     }
     m_spriteName = spriteName;
     m_spriteColor = col;
     m_eventInfo = new EventInfo(stJson);
 }
开发者ID:roaet,项目名称:LD28,代码行数:13,代码来源:STElementInfo.cs

示例14: LoadEventInfo

 public void LoadEventInfo(MobManager mobManager, Storytrack storyTrack, EventInfo info)
 {
     ClearMobs();
     m_st = storyTrack;
     m_info = info;
     foreach(string mobName in m_info.mobs) {
         MobInfo mobInfo = mobManager.GetMobByName(mobName);
         Mob mob = CreateMob(mobInfo, transform.position);
         if(mob == null) continue;
         m_mobs.Add(mob);
     }
     MoveMobsToSpawns();
 }
开发者ID:roaet,项目名称:LD28,代码行数:13,代码来源:Event.cs

示例15: ArrayToCommaList

 public static string ArrayToCommaList(EventInfo[] ArrayToConvert)
 {
     string returnString = "";
     if (ArrayToConvert.Length > 0)
     {
         returnString = ArrayToConvert[0].ToString();
         for (int i = 1; i < ArrayToConvert.Length; i++)
         {
             returnString += ", " + ArrayToConvert[i].ToString();
         }
     }
     return returnString;
 }
开发者ID:noahfalk,项目名称:corefx,代码行数:13,代码来源:GetEvents.cs


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