C#Raffle Draw with List [英] C# Raffle Draw with List

查看:76
本文介绍了C#Raffle Draw with List的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个List< Object>。一旦用户按下开始按钮,我需要逐个读取它并逐个显示标签上的每个值,直到用户按下停止按钮。这个意思是列表一次又一次地读,直到用户按下停止。





1)。每个列表对象都应该通过保持可读时间显示在标签上。



2)。列表应该读到按停止。



3)。一旦用户停止,我需要捕获标签上的对象(文本值)。

解决方案

1 - 为什么要使用对象列表而不是字符串?

2 - 您可以创建一个循环来持续读取列表,但为了使您的UI响应,您可能需要在一个线程中执行它。 Application.DoEvents()可能已经足够了(在你的循环中做到这一点_

3 - '捕获'是什么意思?



这听起来像一个奇怪的要求,为什么你需要它?你写过任何代码吗?你甚至没有说你正在使用什么UI框架?


我已经把这个标签上显示值之前的代码..

Itz适用于我..





Application.DoEvents ();

I have a List<Object>. I need to read it one by one once user press start button and display each value on the label one by one until user press Stop button. That mean list is reading again and again until user press stop.


1). Each list object should be display on label by keeping readable time.

2). List should read until press stop.

3). Once user pres stop i need to capture what is object(text value) on the label.

解决方案

1 - Why would you use a list of objects instead of strings ?
2 - you can create a loop that keeps reading the list, but to make your UI responsive, you probably need to do it in a thread. Application.DoEvents() might be enough, though ( do it inside your loop _
3 - What do you mean by 'capture' ?

This sounds like an odd requirement, why do you need it ? Have you written any code ? You don't even say what UI framework you're using ?


I have put this code before display value on the label..
Itz works for me..


Application.DoEvents();


这篇关于C#Raffle Draw with List的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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