摘要: 自定义节的配置文件 myCustom.config 如下: <?xml version="1.0" encoding="utf-8"?><configuration> <configSections> <section name="myCustomSection" type="CustomConfig.MyCustomSection, CustomConfig"/> </configSectio... 阅读全文
posted @ 2011-03-24 23:40 敏捷学院 阅读(306) 评论(0) 推荐(0) 编辑
摘要:  创建WpfApplication项目Mui_lang,窗口如"运行"的对话框。 Xaml 文件如下: <Window x:Class="Mui_lang.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/200... 阅读全文
posted @ 2011-03-24 23:32 敏捷学院 阅读(684) 评论(2) 推荐(1) 编辑
摘要: 为实体类Product添加验证消息[Table(Name="Products")]public class Product : IDataErrorInfo{[Column(IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.OnInsert)]public int ProductID { get; set; }[Column]public string Name { get; set; }[Column]public string Description { get; set; }[Column]p 阅读全文
posted @ 2011-03-24 21:10 敏捷学院 阅读(453) 评论(2) 推荐(0) 编辑
摘要: 定义一个订单提供 IoC 组件在DomainModel项目中新建文件夹Services添加以下接口:namespace DomainModel.Services{public interface IOrderSubmitter{void SubmitOrder(Cart cart);}}修改CartController添加IOrderSubmitter接口。private IOrderSubmitter orderSubmitter;public CartController(IProductsRepository productsRepository, IOrderSubmitter ord 阅读全文
posted @ 2011-03-24 21:03 敏捷学院 阅读(511) 评论(0) 推荐(0) 编辑
摘要: 创建一个自定义的Model绑定在WebUI根目录添加 CartModelBinder类public class CartModelBinder : IModelBinder{private const string cartSessionKey = "_cart";public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext){if (bindingContext.Model != null)throw new InvalidOperationE 阅读全文
posted @ 2011-03-24 20:48 敏捷学院 阅读(926) 评论(0) 推荐(0) 编辑
摘要: 样式(Style)以下是我们将要创建的网页布层:Sports Store (Header)主页分类1分类2分类 3产品1产品2产品3设计Master Page略创建 Partial View (视图控件)右键单击 Views/Shared 打开添加 View对话框。ViewName为 ProductSummary选中Create a partial view。编辑如下代码:<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DomainModel.Entities.Pro 阅读全文
posted @ 2011-03-24 19:14 敏捷学院 阅读(768) 评论(0) 推荐(0) 编辑
摘要: 测试驱动开发(TDD)下载工具http://www.nunit.orghttp://code.google.com/p/moq为Tests项目添加如下引用:nunit.FrameworkSystem.WebSystem.Web.AbstractionsSystem.Web.RoutingSystem.Web.MvcMoq.DllDomainModelWebUI为Tests创建类[TestFixture]public class ProductsControllerTests{[Test]public void List_Presents_Correct_Page_Of_Products(){I 阅读全文
posted @ 2011-03-24 18:46 敏捷学院 阅读(490) 评论(0) 推荐(0) 编辑
摘要: 连接数据库创建SportStore数据库。创建表 Products添加一些演示数据:设置Linq to SQL注意:需要引用 System.Data.Linq。[Table(Name="Products")]public class Product{[Column(IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.OnInsert)]public int ProductID { get; set; }[Column]public string Name { get; set; }[Column]pu 阅读全文
posted @ 2011-03-24 18:42 敏捷学院 阅读(719) 评论(0) 推荐(0) 编辑
摘要: Download!!!介绍使用一下技术创建简单的购物网演练。 ASP.NET MVC Framework Castle-Windsor-2.0 NUnit 创建项目创建空的解决方案 SportStore ,向解决方案添加: 项目名称项目类型DomainModelC# class libraryWebUIASP.NET MVC2 Web Application不包含 Unit TestTestsC# class library单元测试 删除WebUI自动生成的文件: 目录文件Controllers*Views/Account*Views/Home* (保留index)Views/SharedEr 阅读全文
posted @ 2011-03-24 18:34 敏捷学院 阅读(964) 评论(0) 推荐(0) 编辑
摘要: 介绍使用WatiN模拟网页操作,可以实现网站的自动登录发帖等等....自个儿联想吧!背景知识 Watin是一个面向.net的Web自动化测试开源项目。想要了解更多的知道参考官方网站 http://watin.org/代码 1 //自动登录QQ微博发贴 2 WatiN.Core.IE ie = new WatiN.Core.IE("http://www.qq.com"); 3 ie.ShowWindow(WatiN.Core.Native.Windows.NativeMethods.WindowShowStyle.Maximize); 4 //单击登录div 5 ie.Div 阅读全文
posted @ 2011-03-24 13:08 敏捷学院 阅读(673) 评论(0) 推荐(0) 编辑
摘要: 和Microsoft Expression Blend 的UI差不多主界面菜单属性卡List&Dialog界面的伸缩另一种界面风格内置pythonDemo下载地址:http://files.cnblogs.com/xingquan/WPF_Demo.zip 阅读全文
posted @ 2011-03-24 08:21 敏捷学院 阅读(927) 评论(2) 推荐(1) 编辑