optimized demo start-up speed

This commit is contained in:
NaBian committed 2020-05-23 15:21:24 +08:00
1 parent b57e6e8961
commit aa745e32b1
14 files changed
+116 -69

No files matched your search

@@ -57,12 +57,12 @@ namespace HandyControlDemo.ViewModel
ContentTitle = LangProvider.GetLang(DemoItemCurrent.Name);
});
DataList = dataService.GetDemoDataList();
DemoInfoCollection = new ObservableCollection<DemoInfoModel>();
#if netle40
Task.Factory.StartNew(() =>
{
DataList = dataService.GetDemoDataList();
foreach (var item in dataService.GetDemoInfo())
{
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
@@ -74,6 +74,7 @@ namespace HandyControlDemo.ViewModel
#else
Task.Run(() =>
{
DataList = dataService.GetDemoDataList();
foreach (var item in dataService.GetDemoInfo())
{
Application.Current.Dispatcher.BeginInvoke(new Action(() =>