FileNode.cs
上传用户:lxycoco
上传日期:2022-07-21
资源大小:38457k
文件大小:1k
- using System;
- using System.Windows.Forms;
- using System.IO;
- namespace FolderTree
- {
- /// <summary>
- /// Summary description for FileNode.
- /// </summary>
- public class FileNode : System.Windows.Forms.TreeNode
- {
- string _fileName = "";
- FileInfo _info;
- public FileNode(string fileName)
- {
- _fileName = fileName;
- _info = new FileInfo(_fileName);
- base.Text = _info.Name;
- if(_info.Extension.ToLower() == ".exe")
- this.ForeColor = System.Drawing.Color.Red;
- }
- public string FileName
- {
- get {return _fileName;}
- set {_fileName = value;}
- }
- public FileInfo FileNodeInfo
- {
- get {return _info;}
- }
-
- }
- }