資源簡介
☆☆ 資源說明:☆☆
☆ 系統功能:☆
系統采用人機交互的方式,界面美觀友好,信息查詢靈活、方便,數據存儲安全可靠;
實現對餐廳顧客開臺、點菜/加菜、賬目查詢和結賬等操作;
對用戶輸入的數據,進行嚴格的數據檢驗,盡可能的避免人為錯誤;
實現對消費賬目自動結算;
實現對消費的歷史記錄進行查詢,支持模糊查詢;
系統應最大限度地實現易維護性和易操作性;
代碼片段和文件信息
using?System;
using?System.IO;
using?System.Reflection;
using?System.Windows.Forms;
namespace?MrCy
{
????partial?class?AboutBox1?:?Form
????{
????????public?AboutBox1()
????????{
????????????InitializeComponent();
????????????//??初始化?AboutBox?以顯示程序集信息中包含的產品信息。
????????????//??也可以通過以下方法更改應用程序的程序集信息設置:
????????????//??-?項目->屬性->應用程序->程序集信息
????????????//??-?AssemblyInfo.cs
????????????Text?=?String.Format(“關于?{0}“?Assemblytitle);
????????????labelProductName.Text?=?AssemblyProduct;
????????????labelVersion.Text?=?String.Format(“版本?{0}“?AssemblyVersion);
????????????labelCopyright.Text?=?AssemblyCopyright;
????????????labelCompanyName.Text?=?AssemblyCompany;
????????????textBoxDescription.Text?=?AssemblyDescription;
????????}
????????#region?程序集屬性訪問器
????????public?string?Assemblytitle
????????{
????????????get
????????????{
????????????????//?獲取此程序集上的所有?title?屬性
????????????????object[]?attributes?=
????????????????????Assembly.GetExecutingAssembly().GetCustomAttributes(typeof?(AssemblytitleAttribute)?false);
????????????????//?如果至少有一個?title?屬性
????????????????if?(attributes.Length?>?0)
????????????????{
????????????????????//?請選擇第一個屬性
????????????????????AssemblytitleAttribute?titleAttribute?=?(AssemblytitleAttribute)?attributes[0];
????????????????????//?如果該屬性為非空字符串,則將其返回
????????????????????if?(titleAttribute.title?!=?““)
????????????????????????return?titleAttribute.title;
????????????????}
????????????????//?如果沒有?title?屬性,或者?title?屬性為一個空字符串,則返回?.exe?的名稱
????????????????return?Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Codebase);
????????????}
????????}
????????public?string?AssemblyVersion
????????{
????????????get?{?return?Assembly.GetExecutingAssembly().GetName().Version.ToString();?}
????????}
????????public?string?AssemblyDescription
????????{
????????????get
????????????{
????????????????//?獲取此程序集的所有?Description?屬性
????????????????object[]?attributes?=
????????????????????Assembly.GetExecutingAssembly().GetCustomAttributes(typeof?(AssemblyDescriptionAttribute)?false);
????????????????//?如果?Description?屬性不存在,則返回一個空字符串
????????????????if?(attributes.Length?==?0)
????????????????????return?““;
????????????????//?如果有?Description?屬性,則返回該屬性的值
????????????????return?((AssemblyDescriptionAttribute)?attributes[0]).Description;
????????????}
????????}
????????public?string?AssemblyProduct
????????{
????????????get
????????????{
????????????????//?獲取此程序集上的所有?Product?屬性
????????????????object[]?attributes?=
????????????????????Assembly.GetExecutingAssembly().GetCustomAttributes(typeof?(AssemblyProductAttribute)?false);
????????????????//?如果?Product?屬性不存在,則返回一個空字符串
????????????????if?(attributes.Length?==?0)
????????????????????return?““;
????????????????//?如果有?Product?屬性,則返回該屬性的值
????????????????return?((AssemblyProductAttribute)?attributes[0]).Product;
????????????}
????????}
????????public?string?AssemblyCopyright
????????{
??????
評論
共有 條評論