• 大小: 511KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-20
  • 语言: C#
  • 标签: C#  计算器  源代码  

资源简介

自己用C#写的计算器的源代码,供学习交流。修改版。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;

namespace 计算器
{
    partial class AboutBox1 : Form
    {
        public AboutBox1()
        {
            InitializeComponent();
            this.Text = String.Format(“关于 {0} {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
        {

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3556  2011-03-10 21:36  计算器\AboutBox1.cs

     文件      10469  2011-03-10 21:36  计算器\AboutBox1.Designer.cs

     文件       5817  2011-03-10 21:36  计算器\AboutBox1.resx

     文件        290  2011-03-07 15:15  计算器\App.xaml

     文件        305  2011-03-07 15:15  计算器\App.xaml.cs

     文件     138240  2011-03-11 10:51  计算器\bin\Debug\计算器.exe

     文件      54784  2011-03-11 10:51  计算器\bin\Debug\计算器.pdb

     文件      14328  2011-03-11 10:51  计算器\bin\Debug\计算器.vshost.exe

     文件        490  2007-07-21 01:33  计算器\bin\Debug\计算器.vshost.exe.manifest

     文件       9273  2011-03-11 10:50  计算器\Counter.cs

     文件       2055  2011-03-07 22:58  计算器\obj\Debug\App.g.cs

     文件       4608  2011-03-07 23:24  计算器\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件       4834  2011-03-11 09:48  计算器\obj\Debug\Window1.baml

     文件      14724  2011-03-11 09:48  计算器\obj\Debug\Window1.g.cs

     文件        180  2011-03-10 21:36  计算器\obj\Debug\计算器.AboutBox1.resources

     文件        818  2011-03-11 10:51  计算器\obj\Debug\计算器.csproj.FileListAbsolute.txt

     文件        909  2011-03-10 21:36  计算器\obj\Debug\计算器.csproj.GenerateResource.Cache

     文件     138240  2011-03-11 10:51  计算器\obj\Debug\计算器.exe

     文件       5056  2011-03-11 09:48  计算器\obj\Debug\计算器.g.resources

     文件      54784  2011-03-11 10:51  计算器\obj\Debug\计算器.pdb

     文件     111427  2011-03-07 23:34  计算器\obj\Debug\计算器.Properties.Resources.resources

     文件        211  2011-03-11 10:51  计算器\obj\Debug\计算器_MarkupCompile.cache

     文件       2242  2011-03-10 21:36  计算器\Properties\AssemblyInfo.cs

     文件       3129  2011-03-07 23:24  计算器\Properties\Resources.Designer.cs

     文件       6235  2011-03-07 23:24  计算器\Properties\Resources.resx

     文件       1094  2011-03-07 15:15  计算器\Properties\Settings.Designer.cs

     文件        201  2011-03-07 15:15  计算器\Properties\Settings.settings

     文件     110919  2011-03-07 23:24  计算器\Resources\d2c1cd2be8d5c37e1e30898c.png

    ..A.SH.      5632  2011-03-09 18:02  计算器\Resources\Thumbs.db

     文件       4922  2011-03-11 09:48  计算器\Window1.xaml

............此处省略15个文件信息

评论

共有 条评论