1

有人可以给我一个示例,说明如何使用方法开始向用户显示警告说正在加载...使用下面的代码,我使用 Completed 事件放置查询,使用方法作为开始?

service.EventosDoDiaCompleted += RecebeEventos;
service.EventosDoDiaAsync();

private void RecebeEventos(object sender, AsyncCompletedEventArgs e)
{
   Dataset ds = service.EventosDoDia();
}
4

1 回答 1

2

只需放置简单的 Textblock 或类似的东西:

    service.EventosDoDiaCompleted += RecebeEventos;
    textblock.Text="Loading....";
    service.EventosDoDiaAsync();
    private void RecebeEventos(object sender, AsyncCompletedEventArgs e)
    {
        textblock.Text="Loaded";
        Dataset ds = service.EventosDoDia();
    }
于 2013-03-04T12:21:01.660 回答