Пример #1
0
        public ServerModel(JProperty _data)
        {
            EncFileTree = new LinuxTreeView();
            DecFileTree = new LinuxTreeView();

            sshManager     = new SSHManager(this);
            this.jpropData = _data;
        }
Пример #2
0
        public LinuxTreeViewItem(LinuxTreeView _view, string _path, SftpFile _file, string header, bool _isDirectory)
        {
            root_view = _view;
            if (header == null && _path != null)
            {
                string[] splited = _path.Split('/');
                header = splited[splited.Length - 1];
            }

            InitHeader(header, _isDirectory);
            this.Cursor     = Cursors.Hand;
            this.Path       = _path;
            this.Background = LinuxTreeView._Color.Background_unselected;

            FileInfo = _file;

            //InitContextMenu();

            this.IsDirectory = _isDirectory;

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

            myContextMenu = new ContextMenu();
            MenuItem item = new MenuItem();

            item.Header = "Kill";
            //item.Icon = new PackIconFontAwesome()
            //{
            //	Kind = PackIconFontAwesomeKind.Lock,
            //	VerticalAlignment = VerticalAlignment.Center,
            //	HorizontalAlignment = HorizontalAlignment.Center
            //};
            item.Click += (sender, e) =>
            {
                Console.WriteLine("JHLIM_DEBUG : Kill??");
            };
            myContextMenu.Items.Add(item);
        }