这个源程序文件包括 AboutDlg 类,该类继承自 System.Windows.Forms.Form 类。表示推箱子的“关于”对话框。例如以下图所看到的:




以下是 Window/AboutDlg.Designer.cs 源程序的部分代码:

以下是 Window/AboutDlg.cs 源程序的代码:
using System;
using System.Windows.Forms;
using Skyiv.Ben.PushBox.Common;
namespace Skyiv.Ben.PushBox.Window
{
/// <summary>
/// “关于”对话框
/// </summary>
public partial class AboutDlg : Form
{
public AboutDlg(bool isTopMost)
{
InitializeComponent();
TopMost = isTopMost;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
LoadVersionInfo();
LoadSystemInfo();
}
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
LoadSystemInfo();
}
void LoadVersionInfo()
{
tbxVersion.Text = "skyiv (R) 推箱子" + Fcl.NewLine +
"版本号 " + Pub.GetVersionBuildString(Pub.Version) + Fcl.NewLine + Fcl.NewLine +
"(C) Skyiv Studio (ben)" + Fcl.NewLine +
"http://ben.skyiv.com" + Fcl.NewLine +
"skyivben@gmail.com" + Fcl.NewLine + Fcl.NewLine +
"推箱子是一款绿色软件。使用 C# 开发,基于 Microsoft .NET Compact Framework 2.0。" +
39
"执行环境为使用 Microsoft Windows Mobile 6.0 的智能手机,也能够在安装有 " +
40
"Microsoft .NET Framework 2.0 执行库的计算机上执行。";
41
}
42
43
void LoadSystemInfo()
44
{
45
tbxSystem.Text = "操作系统标识: " + Environment.OSVersion.Platform + Fcl.NewLine +
46
"操作系统版本号: " + Environment.OSVersion + Fcl.NewLine +
47
"公共语言执行库版本号: " + Environment.Version + Fcl.NewLine +
48
"屏幕分辨率: " + Pub.ToString(Screen.PrimaryScreen.Bounds.Size) + Fcl.NewLine +
49
"程序位置: " + Pub.CodeBases;
50
}
51
}
52
}
原文:http://www.cnblogs.com/yxysuanfa/p/6748109.html