2013年7月9日

Winform跨线程操作界面的策略

摘要: BeginInvoke(new ThreadStart(() => toolStripButton1.Text = "aaa"));1、非跨线程操作和部分跨线程get不会引发异常;2、跨线程set,见上面的例子。3、部分跨线程get,见下面的例子。var a = (int)EndInvoke(BeginInvoke(new Func(() => toolStripComboBox1.SelectedIndex)));public static class UIInvokeHelper{ public static void InvokeUI(this Form 阅读全文

posted @ 2013-07-09 17:29 yao2yao4 阅读(399) 评论(0) 推荐(0) 编辑

Winform DataGridView扩展

摘要: public class ObjectPropertyCompare : IComparer{ private readonly PropertyDescriptor property; private readonly ListSortDirection direction; public ObjectPropertyCompare(PropertyDescriptor property, ListSortDirection direction) { this.property = property; this.direction = di... 阅读全文

posted @ 2013-07-09 08:22 yao2yao4 阅读(443) 评论(0) 推荐(0) 编辑

导航