2012年2月16日
摘要: Note: This blog post will use the WCF RIA Services PDC Beta and VS2010 Preview, changes to the framework can me made before it hits RTM.Some questions that pops up about WCF RIA Services is how to enable transactions. So I decided to write a blog post about it, but to not make this post just a few . 阅读全文
posted @ 2012-02-16 11:34 xqiwei 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 在C#中,非主线程(即非UI线程,就是通过new Thread创建的线程)是不能直接操作UI元素的,Android中也一样,必须通过Handler与UI线程通讯,通知UI线程更新.而C#则采用委托的方式更新UI.下面用一个简单的实例来说明.这是一个WPF项目,只有一个名为textBlock1的TextBlock用于显示,一个名为button1的Button用于开启新线程来更新textBlock1.新线程执行的内容是0-100循环,而让textBlock1显示当前循环的进度.Windows Phone 7开发中,也通用,参考上代码:1234567891011121314151617181920. 阅读全文
posted @ 2012-02-16 11:19 xqiwei 阅读(2488) 评论(0) 推荐(0) 编辑
摘要: 一、委托Delegate一般的方法(Method)中,我们的参数总是string,int,DateTime...这些基本的数据类型(或者没有参数),比如Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->public void HelloWorld() { Console.WriteLine("Hello World!");}public void HelloWorld(string name) { Console.Write 阅读全文
posted @ 2012-02-16 11:17 xqiwei 阅读(270) 评论(0) 推荐(0) 编辑