Пример #1
0
        public LinuxTreeViewItem(string _path, SftpFile _file, string header, bool _isDirectory, LinuxTreeViewItem _parent)
        {
            if (header == null && _path != null)
            {
                string[] splited = _path.Split('/');
                header = splited[splited.Length - 1];
            }

            this.Header = new Grid_Header(header, _isDirectory);
            this.Cursor = Cursors.Hand;
            this.Path   = _path;
            this.parent = _parent;

            FileInfo = _file;

            InitContextMenu();

            this.IsDirectory = _isDirectory;

            if (this.IsDirectory)
            {
                // 임시
                Label dummy = new Label();
                this.Items.Add(dummy);
            }

            if (this.Header.Text.Length > 0 && this.Header.Text[0] == '.')
            {
                this.Header.Opacity = .5;
            }
        }