functioninfo.cs

来自「这是用VC编写的一个关于计算器的代码」· CS 代码 · 共 88 行

CS
88
字号
using System;
using System.Collections.Generic;
using System.Text;

namespace ProgramCalculator
{
    public class FunctionInfo
    {
        private string name = "";
        private string relativePathOfCodeFile = "";
        private string explainInfo = "";

        /// <summary>
        /// 获取或设置函数名称
        /// </summary>
        public string Name
        {
            get
            {
                return this.name;
            }
            set
            {
                this.name = value;
            }
        }


        /// <summary>
        /// 代码文件的 相对 路径,如要使用绝对路径请在前面加上Function.DirectoryOfFunctions 
        /// </summary>
        public string RelativePathOfCodeFile
        {
            get
            {
                return this.relativePathOfCodeFile;
            }
            set
            {
                this.relativePathOfCodeFile = value;
            }
        }

        /// <summary>
        /// 获取或设置其说明性信息
        /// </summary>
        public string ExplainInfo
        {
            get
            {
                return this.explainInfo;
            }
            set
            {
                this.explainInfo = value;
            }
        }

        public FunctionInfo()
        {
            this.name = "";
            this.relativePathOfCodeFile = "";
            this.explainInfo = "";
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="name">函数名称</param>
        /// <param name="pathOfCodeFile">代码文件路径,重要: 请一定使用相对路径</param>
        /// <param name="explainInfo">该函数的附加说明信息</param>
        public FunctionInfo(string name, string pathOfCodeFile, string explainInfo)
        {
            this.name = name;
            this.relativePathOfCodeFile = pathOfCodeFile;

            if (string.IsNullOrEmpty(explainInfo))
            {
                this.explainInfo = name;
            }
            else
            {
                this.explainInfo = explainInfo;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?