SL - 摘录 - 在MVVM模式下的VM层里使用线程的方法
来源:互联网 发布:java定义包的关键字 编辑:程序博客网 时间:2024/04/28 14:00
Dispatcher.CurrentDispatcher.BeginInvoke(new ThreadStart(() =>
{
using (CICSvr1.CICSvr1Client client = new CICSvr1.CICSvr1Client())
{
var users = client.GetUserSummarizationsByParentUserGroup(LoginViewModel.Instance.LoginedAccount, userGroupSummarization.Id);
ICollection<UserTreeItemViewModel> collection = new Collection<UserTreeItemViewModel>();
if (users != null)
{
foreach (var user in users)
{
collection.Add(new UserTreeItemForUserViewModel(user));
}
}
ItemsSource = collection.ToArray();
}
}));
{
using (CICSvr1.CICSvr1Client client = new CICSvr1.CICSvr1Client())
{
var users = client.GetUserSummarizationsByParentUserGroup(LoginViewModel.Instance.LoginedAccount, userGroupSummarization.Id);
ICollection<UserTreeItemViewModel> collection = new Collection<UserTreeItemViewModel>();
if (users != null)
{
foreach (var user in users)
{
collection.Add(new UserTreeItemForUserViewModel(user));
}
}
ItemsSource = collection.ToArray();
}
}));
0 0
- SL - 摘录 - 在MVVM模式下的VM层里使用线程的方法
- MVVM模式下的Visiblox Chart使用
- MVVM模式的使用
- SL - 使用在程序集中的图片
- SL 事件的使用
- 在线程里运行scrapy的方法
- 在wpf编程中使用MVVM模式的优劣
- 在SL中使用全屏模式 (zz)
- AfxGetMainWnd()在线程里使用的问题
- SL - DataGrid - DataGridTemplateColumn的使用
- java里 对线程的wait方法只有在synchronized下才有用吗?
- 在VM里的Redhat9与windows设置共享文件夹的方法
- 在mvvm 开发模式下使用JSonModel解析数据
- 移除vm fusion虚拟机在 launch pad里windows应用程序图标的方法
- MVVM模式---Command与CommandParameter的使用
- 使用WPF+MVVM模式的小案例
- 在任意方法里开启另外的线程
- C#如何在线程里调用带参数的方法
- SL - SetBinding的用法
- SL - 摘录 - 输入验证
- SL - 摘录 - 解决PasswordBox的Password无法正常绑定的问题
- SL - 整理 - 输入更变事件(使即时输入内容能被更新到vm)
- SL - 整理 - WPF实现MDI窗体
- SL - 摘录 - 在MVVM模式下的VM层里使用线程的方法
- 常用的语言代码与国家地区对照表
- SL - 整理 - 将验证做到资源文件中
- SL - 整理 - 定义Dependency属性(使自定义组件属性能被绑定)
- bitmap 将图片压缩到指定的大小 JAVA
- SL - 整理 - 多线程调用UI组件时需注意的
- SL - 总结 - AutoCompleteSelector
- HD2 - 刷到wp7 NODO版
- Java Web中资源的访问路径