如何在智能设备中执行线程处理或诸如背景工作者之类的操作 [英] How to do threading or something like background worker in smart devices

查看:63
本文介绍了如何在智能设备中执行线程处理或诸如背景工作者之类的操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我最近创建了一个vb.net Windows窗体应用程序,在其中使用了后台工作程序组件,现在我正在尝试对C#.NET或VB.NET中的智能设备执行相同的操作,如何在其中进行线程化智能设备,我基本上想做的是在按下一个按钮后开始循环,然后在按下另一个按钮后停止循环,我该如何在智能设备中做到这一点?
在此先感谢您的帮助:)

Hello,

I''ve recently created a vb.net windows form application which i used the background worker component in it, Now i''m trying to do the same for smart devices in C#.NET or VB.NET, how to do threading in smart devices , what i basically wanna do is start a loop after pressing one button then stopping it after pressing another, how can i do that in smart devices ?

thanks in advance for helping :)

推荐答案

我找到了一种方法,我使用了一个计时器,并根据需要启用/禁用了该计时器,然后我包括了要在timer.tick事件上重复的所需代码,希望这会对某人有所帮助:)
I found a way to do that , i used a timer and i enabled/disabled the timer depending on my need , then i included the needed code to be repeated on the timer.tick event , hope this would help someone :)


这篇关于如何在智能设备中执行线程处理或诸如背景工作者之类的操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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