資源簡介
[說明]
本小游戲素材來自于原版“是男人就下一百層”小游戲,僅供學習與研究用途。適合.NET入門者練習的一個實例,本小游戲中涉及到抽象類,抽象方法,方法重載,類的繼承,事件,委托,GDI+畫圖的綜合應用。
[開發(fā)環(huán)境]
WinXP
Visual Studio 2008

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Drawing;
using?System.Reflection;
using?System.Windows.Forms;
namespace?GoTo100layer
{
????partial?class?AboutForm?:?Form
????{
????????public?AboutForm()
????????{
????????????InitializeComponent();
????????????this.Text?=?String.Format(“關于?{0}“?Assemblytitle);
????????????this.labelProductName.Text?=?AssemblyProduct;
????????????this.labelVersion.Text?=?String.Format(“版本?{0}“?AssemblyVersion);
????????????this.labelCopyright.Text?=?AssemblyCopyright;
????????????this.labelCompanyName.Text?=?AssemblyCompany;
????????????this.textBoxDescription.Text?=?AssemblyDescription;
????????}
????????#region?程序集屬性訪問器
????????public?string?Assemblytitle
????????{
????????????get
????????????{
????????????????object[]?attributes?=?Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblytitleAttribute)?false);
????????????????if?(attributes.Length?>?0)
????????????????{
????????????????????AssemblytitleAttribute?titleAttribute?=?(AssemblytitleAttribute)attributes[0];
????????????????????if?(titleAttribute.title?!=?““)
????????????????????{
????????????????????????return?titleAttribute.title;
????????????????????}
????????????????}
????????????????return?System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Codebase);
????????????}
????????}
????????public?string?AssemblyVersion
????????{
????????????get
????????????{
????????????????return?Assembly.GetExecutingAssembly().GetName().Version.ToString();
????????????}
????????}
????????public?string?AssemblyDescription
????????{
????????????get
????????????{
????????????????object[]?attributes?=?Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute)?false);
????????????????if?(attributes.Length?==?0)
????????????????{
????????????????????return?““;
????????????????}
????????????????return?((AssemblyDescriptionAttribute)attributes[0]).Description;
????????????}
????????}
????????public?string?AssemblyProduct
????????{
????????????get
????????????{
????????????????object[]?attributes?=?Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute)?false);
????????????????if?(attributes.Length?==?0)
????????????????{
????????????????????return?““;
????????????????}
????????????????return?((AssemblyProductAttribute)attributes[0]).Product;
????????????}
????????}
????????public?string?AssemblyCopyright
????????{
????????????get
????????????{
????????????????object[]?attributes?=?Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute)?false);
????????????????if?(attributes.Length?==?0)
????????????????{
????????????????????return?““;
????????????????}
????????????????return?((AssemblyCopyrightAttribute)attributes[0]).Copyright;
????????????}
????????}
????????public?string?AssemblyCompany
????????{
????????????ge
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3540??2009-03-05?14:43??GoTo100la
?????文件??????10543??2009-03-05?14:43??GoTo100la
?????文件??????49723??2009-03-05?14:43??GoTo100la
?????文件???????1524??2009-03-03?09:26??GoTo100la
?????文件??????72704??2009-03-05?15:14??GoTo100la
?????文件??????14328??2009-03-05?15:12??GoTo100la
?????文件????????490??2007-07-21?01:33??GoTo100la
?????文件???????2335??2009-03-05?14:35??GoTo100la
?????文件????????751??2009-03-04?11:26??GoTo100la
?????文件???????2414??2009-03-04?15:24??GoTo100la
?????文件????????699??2009-03-04?11:26??GoTo100la
?????文件???????5523??2009-03-05?14:41??GoTo100la
?????文件???????5672??2009-03-05?15:14??GoTo100la
?????文件???????6878??2009-03-05?15:08??GoTo100la
?????文件???????6008??2009-03-05?15:08??GoTo100la
?????文件??????29561??2009-03-05?14:43??GoTo100la
?????文件????????746??2009-03-05?14:59??GoTo100la
?????文件???????1661??2009-03-05?14:55??GoTo100la
?????文件??????73728??2009-03-05?15:03??GoTo100la
?????文件????????180??2009-03-05?14:55??GoTo100la
?????文件??????75264??2009-03-05?15:03??GoTo100la
?????文件??????18169??2009-03-05?14:41??GoTo100la
?????文件???????6656??2009-03-04?11:22??GoTo100la
?????文件????????306??2009-02-27?15:46??GoTo100la
?????文件??????29561??2009-03-05?15:04??GoTo100la
?????文件????????764??2009-03-05?15:12??GoTo100la
?????文件???????1661??2009-03-05?15:08??GoTo100la
?????文件??????72704??2009-03-05?15:14??GoTo100la
?????文件????????180??2009-03-05?15:08??GoTo100la
?????文件??????69120??2009-03-05?15:14??GoTo100la
............此處省略45個文件信息
- 上一篇:C# WEB投票
- 下一篇:RS232串口通信的小軟件
評論
共有 條評論