Пример #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;
            }
        }
Пример #2
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);
                TextBlock tb = this.Header.Tb_name as TextBlock;
                if (tb == null)
                {
                    return;
                }

                tb.FontWeight = FontWeights.Bold;
                tb.Foreground = _Color.Folder_foreground;
            }

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