philzhou

导航

上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页

2012年6月9日 #

winform应用程序:非控件创建线程无法操作控件

摘要: 在winform中常常会有耗时的操作,需要有进度条来与用户进行交互,告诉用户当前操作的进度状况。在这种情况下,为避免耗时操作阻塞UI主线程,会为操作单独开一个工作线程。但是当工作线程去更新Form上的ProgressBar的进度时,异常抛出了:线程间操作无效: 从不是创建控件“progressBarUpdate”的线程访问它。这是因为progressBarUpdate这个控件是由UI主线程创建并维护的,而工作线程直接去操作UI线程创建的控件显然是不被允许的,但是工作线程确实需要通知progressBarUpdate去更新状态,如何解决这个问题呢?我们可以使用Control 中的方法 publi 阅读全文

posted @ 2012-06-09 12:05 philzhou 阅读(868) 评论(0) 推荐(0)

2012年6月4日 #

转 Step-by-step Introduction to Delegates and Lambda Expressions

摘要: 原文Many so often during my lectures an courses I provide to – what I would call – main stream developers I realize that delegates, anonymous methods and lambda expressions are concepts either completely unknown or not really fully understood. This is a pity! In this post I want to provide a step-by-s 阅读全文

posted @ 2012-06-04 20:41 philzhou 阅读(291) 评论(0) 推荐(0)

2012年5月29日 #

Proposed solution for the NHibernate exception “Column ‘Reserved Word’ does not belong to table ReservedWords.”

摘要: 原文 已被墙When I updated my NHibernate assembly to version 2.1.0.GA and tried to configure it against my MySQL installation with the .NET Connector v 5.2.7 I got an exception that I hadn’t encounter before:System.ArgumentException : Column ‘Reserved Word’ does not belong to table ReservedWords.After som 阅读全文

posted @ 2012-05-29 10:39 philzhou 阅读(600) 评论(1) 推荐(1)

2012年5月9日 #

EF Code First - Add-Migration fails with Could not load file or assembly error

摘要: EF Code First - Add-Migration fails with Could not load file or assembly errorHello,I just hooked up a new project to use EF Migrations features and am encountering errors trying to add new migrations. I was successful at enabling migrations and getting InitialCreate script created, but when I try t 阅读全文

posted @ 2012-05-09 17:09 philzhou 阅读(1321) 评论(1) 推荐(0)

2012年5月8日 #

nopCommerce : Updating an existing entity. How to add a new property.

摘要: Updating an existing entity. How to add a new property.This tutorial covers how to add a property to the Affiliate entity that ships with the nopCommerce source code.The data modelEntities will have two classes that are used to map records to a table. The first class defines the properties, fields, 阅读全文

posted @ 2012-05-08 21:07 philzhou 阅读(719) 评论(0) 推荐(0)

asp.net mvc FluentValidation 的使用

摘要: 原文 Create a new ASP.NET MVC 3 project using the default Visual Studio Template Download the latest FluentValidation.NET Reference the FluentValidation.dll and FluentValidation.Mvc.dll assemblies (be... 阅读全文

posted @ 2012-05-08 16:07 philzhou 阅读(1110) 评论(0) 推荐(0)

NopCommerce 自定义DataAnnotation DisplayAttribute

摘要: System.dll(.Net Framework 4.0 )中已有DisplayNameAttribute 定义,被该标签注释的Model属性,在View中使用Html.LabelFor便可获取设置的字段名称。namespace System.ComponentModel{ // 摘要: // 指定属性、事件或不采用任何参数的公共 void 方法的显示名称。 [Attr... 阅读全文

posted @ 2012-05-08 09:57 philzhou 阅读(589) 评论(0) 推荐(0)

2012年4月13日 #

Jquery DateTimePicker Config and Code Annalyze

摘要: 设置location为中文。// set the cn-zh location this.regional['cn'] = { // Default regional settings closeText: '关闭', // Display text for close link prevText: '上一个', // Display text for previous month link nextText: '下一个', // Display text for next month link ... 阅读全文

posted @ 2012-04-13 15:04 philzhou 阅读(2823) 评论(0) 推荐(0)

2012年4月5日 #

C# 委托、事件,lamda表达式

摘要: 参考文章1. 委托Delegate C#中的Delegate对应于C中的指针,但是又有所不同C中的指针既可以指向方法,又可以指向变量,并且可以进行类型转换,C中的指针实际上就是内存地址变量,他是可以直接操作内存的,通过内存地址直接访问变量,直接调用方法。 而C#中的Delegate是强类型的,也就是说在声明委托时就已经指定了该变量只能指向具有特定参数,以及返回值的方法。 使用delegate就可以直接建立任何名称的委托类型,当进行系统编译时,系统就会自动生成此类型。您可以使用delegate void MyDelegate() 方式建立一个委托类,并使用ILDASM.exe观察其成员。由ILD 阅读全文

posted @ 2012-04-05 20:32 philzhou 阅读(13515) 评论(0) 推荐(3)

2012年2月20日 #

jQuery.ProgressBar 使用示例

摘要: 1. 下载Jquery.ProgressBar 地址 2. 引入将Jquery.ProgressBar引入ASP.NET MVC 2.0项目。 如下图 3. 修改jquery.progressbar.js中与图片链接有关的部分。 4. 页面代码。 $(document).ready(function () { $(".progressBar").eac... 阅读全文

posted @ 2012-02-20 11:47 philzhou 阅读(5626) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页