mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-11-24 16:43:24 +08:00
ILoading
This commit is contained in:
@@ -65,6 +65,16 @@ namespace CPF.Toolkit.Demo
|
||||
Content = "关闭窗体",
|
||||
Commands = { { nameof(Button.Click),(s,e) => vm.Test() } }
|
||||
},
|
||||
new Button
|
||||
{
|
||||
Content = "关闭窗体",
|
||||
Commands = { { nameof(Button.Click),(s,e) => vm.Test() } }
|
||||
},
|
||||
new Button
|
||||
{
|
||||
Content = "loading",
|
||||
Commands = { { nameof(Button.Click),(s,e) => vm.LoadingTest() } }
|
||||
},
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -24,5 +24,18 @@ namespace CPF.Toolkit.Demo
|
||||
e.Cancel = !this.isClose;
|
||||
base.OnClose(e);
|
||||
}
|
||||
|
||||
public async void LoadingTest()
|
||||
{
|
||||
await this.ShowLoading(Task.Delay(3000));
|
||||
this.Dialog.Sucess("test");
|
||||
|
||||
//var result = await this.ShowLoading(async () =>
|
||||
//{
|
||||
// await Task.Delay(5000);
|
||||
// return "test";
|
||||
//});
|
||||
//this.Dialog.Sucess(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user