Beispiel #1
0
        private void RefreshPath(string absoslutePath, string basePath)
        {
            if (viewedPath == null && directoryTreeView.SelectedNode != null)
            {
                viewedPath = directoryTreeView.SelectedNode.FullPath;
            }

            if (!File.Exists(absoslutePath))
            {
                var relativePath = string.Join("/", PhysFSUtils.MakeRelative(absoslutePath, basePath, true));
                var nodeChanged  = FindNode(relativePath, directoryTreeView.TopNode);
                if (nodeChanged != null)
                {
                    try
                    {
                        refreshBackgroundWorker.RunWorkerAsync(nodeChanged);
                    }
                    catch (InvalidOperationException)
                    {
                    }
                }
            }
            else
            {
                if (viewedPath != null)
                {
                    NavigateToPath(viewedPath);
                }
            }
        }
Beispiel #2
0
        private void RenamePath(string fullPath, string oldFullPath, string basePath)
        {
            var relativePath = string.Join("/", PhysFSUtils.MakeRelative(oldFullPath, basePath));
            var node         = FindNode(relativePath, directoryTreeView.TopNode);

            if (node != null)
            {
                node.Remove();
            }

            RefreshPath(fullPath, basePath);
        }