Exemplo n.º 1
0
        public void MonitorRepository(string repositoryWorkingPath)
        {
            if (repositoryWorkingPath == null)
            {
                return;
            }

            string gitPath = ModelExtensions.GetGitRepositoryPath(repositoryWorkingPath);

            if (!Directory.Exists(gitPath))
            {
                MonitorForRepositoryCreation(repositoryWorkingPath);
                return;
            }

            RepositoryPath = repositoryWorkingPath;

            _graphBuilder  = _graphBuilderThunk(gitPath);
            RepositoryPath = Directory.GetParent(gitPath).FullName;
            Graph          = _graphBuilder.Graph();

            if (_graph.VertexCount > 1)
            {
                _graph.LayoutAlgorithmType = "EfficientSugiyama";
            }
            Graph = Graph;

            MonitorForRepositoryChanges(gitPath);
        }
Exemplo n.º 2
0
        public void MonitorRepository(string repositoryWorkingPath)
        {
            if (repositoryWorkingPath == null)
            {
                return;
            }

            string gitPath = ModelExtensions.GetGitRepositoryPath(repositoryWorkingPath);

            if (!Directory.Exists(gitPath))
            {
                MonitorForRepositoryCreation(repositoryWorkingPath);
                return;
            }

            RepositoryPath = repositoryWorkingPath;

            _graphBuilder       = _graphBuilderThunk(gitPath);
            Graph               = _graphBuilder.Graph();
            RepositoryPath      = Directory.GetParent(gitPath).FullName;
            LayoutAlgorithmType = "Tree";

            Refresh();

            MonitorForRepositoryChanges(gitPath);
        }
Exemplo n.º 3
0
        public void Refresh()
        {
            string gitPath = ModelExtensions.GetGitRepositoryPath(RepositoryPath);

            if (!Directory.Exists(gitPath))
            {
                MonitorRepository(RepositoryPath);
            }
            else
            {
                Graph = _graphBuilder.Graph();
            }
        }
Exemplo n.º 4
0
        public void MonitorRepository(string repositoryWorkingPath)
        {
            if (repositoryWorkingPath == null) return;
            string gitPath = repositoryWorkingPath.NormalizeGitRepositoryPath();
            if (!Directory.Exists(gitPath))
            {
                MonitorForRepositoryCreation(repositoryWorkingPath);
                return;
            }

            _graphBuilder = _graphBuilderThunk(gitPath);
            Graph = _graphBuilder.Graph();
            LayoutAlgorithmType = "Tree";

            MonitorForRepositoryChanges(gitPath);
        }
Exemplo n.º 5
0
        public void MonitorRepository(string repositoryWorkingPath)
        {
            if (repositoryWorkingPath == null) return;

            string gitPath = ModelExtensions.GetGitRepositoryPath(repositoryWorkingPath);

            _graphBuilder = _graphBuilderThunk(gitPath);
            RepositoryPath = Directory.GetParent(gitPath).FullName;

            Graph = _graphBuilder.Graph();

            if (!Directory.Exists(gitPath))
                MonitorForRepositoryCreation(RepositoryPath);
            else
                MonitorForRepositoryChanges(gitPath);
        }
Exemplo n.º 6
0
        public void MonitorRepository(string repositoryWorkingPath)
        {
            if (repositoryWorkingPath == null) return;

            string gitPath = ModelExtensions.GetGitRepositoryPath(repositoryWorkingPath);

            _graphBuilder = _graphBuilderThunk(gitPath);
            RepositoryPath = Directory.GetParent(gitPath).FullName;
            var graph = _graphBuilder.Graph();

            if (graph.VertexCount > 1)
                graph.LayoutAlgorithmType = "EfficientSugiyama";
            Graph = graph;

            if (!Directory.Exists(gitPath))
                MonitorForRepositoryCreation(RepositoryPath);
            else
                MonitorForRepositoryChanges(gitPath);
        }
Exemplo n.º 7
0
        public void MonitorRepository(string repositoryWorkingPath)
        {
            if (repositoryWorkingPath == null) return;

            string gitPath = ModelExtensions.GetGitRepositoryPath(repositoryWorkingPath);
            if (!Directory.Exists(gitPath))
            {
                MonitorForRepositoryCreation(repositoryWorkingPath);
                return;
            }

            RepositoryPath = repositoryWorkingPath;

            _graphBuilder = _graphBuilderThunk(gitPath);
            Graph = _graphBuilder.Graph();
            LayoutAlgorithmType = "Tree";

            Refresh();

            MonitorForRepositoryChanges(gitPath);
        }
Exemplo n.º 8
0
        public void MonitorRepository(string repositoryWorkingPath)
        {
            if (repositoryWorkingPath == null)
            {
                return;
            }

            string gitPath = ModelExtensions.GetGitRepositoryPath(repositoryWorkingPath);

            _graphBuilder  = _graphBuilderThunk(gitPath);
            RepositoryPath = Directory.GetParent(gitPath).FullName;

            Graph = _graphBuilder.Graph();

            if (!Directory.Exists(gitPath))
            {
                MonitorForRepositoryCreation(RepositoryPath);
            }
            else
            {
                MonitorForRepositoryChanges(gitPath);
            }
        }
Exemplo n.º 9
0
 public void Refresh()
 {
     Graph = _graphBuilder.Graph();
 }
Exemplo n.º 10
0
 public void Refresh()
 {
     // todo can't we split updating the UI from reading the repo and run this on a background thread?
     Graph = _graphBuilder.Graph(GraphParameters);
 }