随笔分类 - .NET课程:《基于C#的Windows应用程序设计》
1
摘要:对教材3.4.1部分进行演示,即LicFileLicenseProvider类使用的演示 1//使用LicFileLicenseProvider作为许可提供类 2 [LicenseProvider(typeof(LicFileLicenseProvider))] 3 public class LicensedColorComboBox : System.Windows.Forms.C...
阅读全文
posted @ 2007-04-15 15:49
dn
摘要:对教材3.3部分进行演示 1[ToolboxBitmap(@"E:\教学\基于C#的Windows应用程序设计\第三章\test_cra\App.ico")] 2public class UserControl1 : System.Windows.Forms.UserControl 3{ 4 private System.Windows.Forms.Button button1; 5 ...
阅读全文
posted @ 2007-04-15 15:46
dn
摘要:对教材3.2.2部分进行演示,该例题包括自定义控件事件的代码 1using System; 2 3namespace override_attribute_event 4{ 5 6 public class NumericTextBox : System.Windows.Forms.TextBox 7 { 8 public NumericTextBox() 9 ...
阅读全文
posted @ 2007-04-15 15:40
dn
摘要:对教材p120部分创建控件进行演示 1using System; 2using System.Drawing; 3using System.ComponentModel; 4using System.Windows.Forms; 5 6namespace my_control 7{ 8 //所有控件必须派生自Control类 9 public class CustomControl ...
阅读全文
posted @ 2007-03-31 09:57
dn
摘要:对教材2.6.2、2.6.3、2.6.4部分进行的例题演示,代码如下: 1//对控件验证事件的处理 2 private void minValueTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) 3 { 4 if(Convert.ToInt32(m...
阅读全文
posted @ 2007-03-18 20:21
dn
摘要:对教材2.4.2部分进行的演示,相关代码如下: 1private void button1_Click(object sender, System.EventArgs e) 2 { 3 //创建控件实例 4 CheckBox signatureCheckBox = new CheckBox(); 5 signatur...
阅读全文
posted @ 2007-03-18 20:14
dn
摘要:针对教材2.3.4部分讲到的通用对话框控件和MessageBox的使用进行演示 public void DisplayValue() { //获取ShowDialog()返回值 DialogResult userResponse = openFileDialog1.ShowDialog(); if(userRespon...
阅读全文
posted @ 2007-03-01 19:51
dn
摘要:对应教材2.2.2中的(12)部分,主要对ListBox控件进行演示 using System;using System.Collections;using System.Drawing;using System.Windows.Forms;public class EnvironmentVars:Form{ Label label; public static void Main()...
阅读全文
posted @ 2007-03-01 19:47
dn
摘要:对应教材2.2.2的(4)部分 using System;using System.Drawing;using System.Windows.Forms;public class DateAndTimeStatus:Form{ StatusBarPanel sbpMenu,sbpDate,sbpTime; public static void Main() { Ap...
阅读全文
posted @ 2007-03-01 19:44
dn
摘要:对应教材2.2.2中的(2)部分 using System;using System.Drawing;using System.Windows.Forms;public class TwoStatusBarPanels:Form{ public static void Main() { Application.Run(new TwoStatusBarPanels()); ...
阅读全文
posted @ 2007-03-01 19:41
dn
摘要:该例题对教材2.1.2提到的委托类型(delegate)进行演示 using System;namespace use_delegate{ /**//// /// Class1 的摘要说明。 /// class Class1 { //第一步:声明委托(委托的参数类型和返回值类型必须和委托的目标函数一致) public delegate...
阅读全文
posted @ 2007-02-28 19:37
dn
摘要:第一章课后试验需要安装一个web service和对教材原配光盘上的工程稍做修改才能正确运行。一、安装web service首先,将教材附带的光盘中根目录下的 Labfiles 目录复制到本地计算机上,然后将其中的 ALLFILES.EXE 文件解压,然后运行解压后的内容中 \Sampapps\ExpenseReportWebService 路径下的 setup.exe ,直至安装程序运行完毕,这...
阅读全文
posted @ 2007-02-28 13:25
dn
摘要:该例题对教材1.3.1提到的访问修饰符(public、protected、private)的可访问性进行演示 1using System; 2 3namespace private_prtected_public 4{ 5 /**//// 6 /// Class1 的摘要说明。 7 /// 8 class Class1 9 {10 public s...
阅读全文
posted @ 2007-02-27 17:08
dn
1
浙公网安备 33010602011771号