Build your own CAB Part #3 - The Supervising Controller Pattern

a screen and its responsibilities:

  • Display and capture the currently selected shipment options
  • Respond to user events like selecting a value in the ComboBox's
  • Fetching the list of states
  • Fetching the list of shipping vendors for a given state or province
  • Fetching the list of options for a given state/province and vendor
  • Changing the dropdown lists
  • Enabling and disabling the checkbox's for purchasing insurance and requiring a signature
  • Calculate the shipping cost for the selected options
  • Update the cost textbox whenever the shipment options change
The supervising controller will take care some complex logic
The view can will take some simple logic, something like the synchronization between the page widget and the business object (just binds properties to the UI widget, take care for the databinding)

转载于:https://www.cnblogs.com/ellipse-gao/archive/2007/09/13/891933.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
用python实现: 【问题描述】 英电影参演人员名单一般以某种方式进行排版显示给定一个排版文件listin.txt,该文件每行参演人员名单由冒号":"分隔成前后两部分,但格式杂乱无章,单词(由除空格和水平制表符之外的其它字符构成)之间可能有多个空格或水平制表符分隔。编写程序,要求将其按如下排版规则排版输出到另一个文件listout.txt: 1.从标准输入读取一整数,作为排版后所有各行冒号":"在一行的固定位置;假设输入的整数肯定大于排版后所有各行冒号":"前的字符个数,位置从1开始计数; 2.冒号":"左边的单词串以行头为基准左对齐,左边的最后一个单词与冒号之间以空格填充;冒号":"右边的单词串以冒号":"为基准左对齐,最后一个单词后只有回车换行符,不再有其它字符; 3.冒号":"左右两边的单词间都只有一个空格分隔,并且要求冒号两边至少各有一个空格。 假设输入文件每行字符个数不超过100。 【输入形式】 待排版参演人员名单从当前目录下的listin.txt文件读入;表示冒号":"位置的整数从标准输入读入。 【输出形式】 排版后的参演人员名单输出到当前目录下的listout.txt。 【输入样例】 假设文件listin.txt内容为: Digital Intermediate by : EFILM Supervising Digital Colorist : STEVEN J. SCOTT Second Colorist :ANDREW FRANCIS Digital Intermediate Producer:LOAN PHAN Digital Intermediate Editor: DEVON MILLER 表示冒号固定位置的整数为: 40 【输出样例】 文件listout.txt的内容应为: 【样例说明】 输入的文件listin.txt有五行参演人员名单,要求排版后冒号":"位于第40个字符的位置,按照上述排版规则输出到文件listout.txt
最新发布
06-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值