예제 #1
0
        /// <summary>
        /// 删除
        /// </summary>
        private void cloudTreeView_deleteBtn_Click(object sender, RoutedEventArgs e)
        {
            if (State.currentBucket == null)
            {
                return;
            }
            var l = new List <FolderTreeNode>();

            cloudFileTree.root.getAllChildren(ref l);
            foreach (var i in l)
            {
                if (i == null)
                {
                    continue;
                }
                if (!i.isFile)
                {
                    continue;
                }
                uilog.log("删除文件 : " + i.path);
                var res = UAgent.exec(cmdPreset.deleteFile(i.path));
                Console.WriteLine(res);
            }
            refreshCloudTreeView();
        }
예제 #2
0
        bool refreshCloudTreeView()
        {
            //string receiveFileList = UAgent.exec(cmdPreset.getFileList());
            string receiveFileList = UAgent.exeGetFileList();
            var    ufileInfoList   = UFileInfo.importByReceiveString(receiveFileList);

            if (ufileInfoList == null)
            {
                uilog.error("不存在该bucket");
                return(false);
            }
            cloudFileTree             = new FolderTree(ufileInfoList);
            cloudTreeView.ItemsSource = null;
            cloudTreeView.ItemsSource = cloudFileTree.root.children;
            return(true);
        }