摘要: 1. UI设计主窗体FrmMain:两个文本框:textBox1、textBox2 存储FrmMain中的参数一个按钮:button1 启动子窗体子窗体FrmChild:两个文本框:textBox1、textBox2 存储FrmChild中的参数一个按钮:button1 关闭子窗体,返回FrmMain 2. DeliveryParamsArgs类:存储从子窗体FrmChild返回到父窗体FrmMain中的参数using System;using System.Collections.Generic;using System.Text;using System.Collections;names 阅读全文
posted @ 2011-04-01 17:38 小锋神 阅读(438) 评论(0) 推荐(0)
摘要: 用正则进行验证。需要引用using System.Text.RegularExpressions;事件里这么写。bool yz=Regex.IsMatch(TextBox1, @"^[0-9]*[1-9][0-9]*$");if(!yz){MessageBox.Show("必须是正整数"); } 阅读全文
posted @ 2011-04-01 14:03 小锋神 阅读(605) 评论(0) 推荐(0)