开发者

user notification while waiting

I am writing a simple win forms app in C#. There is a method call in my method which loads files but is 开发者_JS百科taking a while to respond. Below is the method call

Directory.GetFiles(selectedFolder, "*.xml", SearchOption.AllDirectories);

I want to notify this to users. Is there a way to show them that file loading is in progress? I want a simplest way. I suppose Splash screen is too costly for my app.


Depending on the application type (windows, web, ...) different techniques might be used. For a windows application you could use the BackgroundWorker class. There are hundreds of examples over the internet, here's one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜