foldernode.cs

来自「C#高级编程第6版随书源代码 值得下载」· CS 代码 · 共 37 行

CS
37
字号
#region Using directives

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

#endregion

namespace FormsSample.SampleControls
{
  public class FolderNode : System.Windows.Forms.TreeNode
  {
    string _folderPath = "";
    DirectoryInfo _info;

    public FolderNode(string folderPath)
    {
      _folderPath = folderPath;
      _info = new DirectoryInfo(folderPath);
      this.Text = _info.Name;
    }

    public string FolderPath
    {
      get { return _folderPath; }
      set { _folderPath = value; }
    }

    public DirectoryInfo FolderNodeInfo
    {
      get { return _info; }
    }

  }
}

⌨️ 快捷键说明

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