单个timer_tick()用于多个计时器,如何获取发件人 [英] Single timer_tick() for multiple timers, how to get the sender

查看:73
本文介绍了单个timer_tick()用于多个计时器,如何获取发件人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么知道哪个Timer_Tick哪个定时器对象引发了tick事件?

请参考一些代码。

解决方案

你的计划为多个计时器使用相同的_tick()函数?

有什么意义?


无论如何,对象发送者是指...传入的参数,将告诉您哪个对象触发了事件。



您计划对多个使用相同的_tick()函数定时器?

重点是什么?


无论如何,对象发送者是指...传入的参数将告诉您哪个对象触发了该事件。



是的我打算使用same_tick()函数。

你可以给我发一些代码来获取该对象和定时器索引使用对象发送者的数组参数。


是的我打算使用same_tick()函数。

你可以给我发一些代码来获取那个对象和定时器数组的索引使用 ;对象发送者参数

How do I know which Timer_Tick which timer object has raised the tick event?
Please refer some code.

解决方案

You plan to use the same _tick() function for multiple timers?
What is the point of that?

At any rate, the "object sender" parameter that gets passed in, will tell you which object triggered the event.


You plan to use the same _tick() function for multiple timers?
What is the point of that?

At any rate, the "object sender" parameter that gets passed in, will tell you which object triggered the event.


yes i plan to use the same_tick() function.
can u please send me some code to fetch that object and index of timer array using "object sender" parameter.


yes i plan to use the same_tick() function.
can u please send me some code to fetch that object and index of timer array using "object sender" parameter.


这篇关于单个timer_tick()用于多个计时器,如何获取发件人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆