• 大小: 158KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-25
  • 语言: C#
  • 标签: c#  

资源简介

c#编写的TFTP服务器源代码,适用于各种TFTP环境:如更新路由固件等。

资源截图

代码片段和文件信息

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

namespace TFTPServerApp
{
    partial class AboutBox : Form
    {
        public AboutBox()
        {
            InitializeComponent();
            this.Text = String.Format(“About {0}“ Assemblytitle);
            this.labelProductName.Text = AssemblyProduct;
            this.labelVersion.Text = String.Format(“Version {0}“ AssemblyVersion);
            this.labelCopyright.Text = AssemblyCopyright;
            this.textBoxDescription.Text = AssemblyDescription;
        }

        #region Assembly Attribute Accessors

        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
        {
            get
         

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-01-04 10:52  BuildProcessTemplates\
     文件       59198  2013-01-04 10:52  BuildProcessTemplates\DefaultTemplate.11.1.xaml
     文件       65836  2013-01-04 10:52  BuildProcessTemplates\DefaultTemplate.xaml
     文件       22647  2013-01-04 10:52  BuildProcessTemplates\LabDefaultTemplate.11.xaml
     文件        6878  2013-01-04 10:52  BuildProcessTemplates\UpgradeTemplate.xaml
     目录           0  2013-01-04 10:52  TFTPServer\
     目录           0  2013-01-04 10:52  TFTPServer\Application\
     文件        3388  2013-01-04 10:52  TFTPServer\Application\AboutBox.cs
     文件        9268  2013-01-04 10:52  TFTPServer\Application\AboutBox.Designer.cs
     文件        5817  2013-01-04 10:52  TFTPServer\Application\AboutBox.resx
     文件         122  2013-01-04 10:52  TFTPServer\Application\app.config
     文件        7513  2013-01-04 10:52  TFTPServer\Application\Application.csproj
     文件         257  2013-01-04 10:52  TFTPServer\Application\Application.csproj.vspscc
     文件        6977  2013-01-04 10:52  TFTPServer\Application\FormAlternatives.cs
     文件       14051  2013-01-04 10:52  TFTPServer\Application\FormAlternatives.Designer.cs
     文件        6356  2013-01-04 10:52  TFTPServer\Application\FormAlternatives.resx
     文件        6911  2013-01-04 10:52  TFTPServer\Application\FormConfigureOverview.cs
     文件       13806  2013-01-04 10:52  TFTPServer\Application\FormConfigureOverview.Designer.cs
     文件        8867  2013-01-04 10:52  TFTPServer\Application\FormConfigureOverview.resx
     文件       24968  2013-01-04 10:52  TFTPServer\Application\FormMain.cs
     文件       22479  2013-01-04 10:52  TFTPServer\Application\FormMain.Designer.cs
     文件        8336  2013-01-04 10:52  TFTPServer\Application\FormMain.resx
     文件        3868  2013-01-04 10:52  TFTPServer\Application\FormPickAdapter.cs
     文件        4602  2013-01-04 10:52  TFTPServer\Application\FormPickAdapter.Designer.cs
     文件        5814  2013-01-04 10:52  TFTPServer\Application\FormPickAdapter.resx
     文件        6375  2013-01-04 10:52  TFTPServer\Application\FormSettings.cs
     文件       21921  2013-01-04 10:52  TFTPServer\Application\FormSettings.Designer.cs
     文件        6619  2013-01-04 10:52  TFTPServer\Application\FormSettings.resx
     文件        3820  2013-01-04 10:52  TFTPServer\Application\ITFTPServiceContract.cs
     文件        1078  2013-01-04 10:52  TFTPServer\Application\MainIcon.ico
     文件        5273  2013-01-04 10:52  TFTPServer\Application\Program.cs
............此处省略42个文件信息

评论

共有 条评论