diff --git a/README.md b/README.md index f6e4e31..b60ce23 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ post about [structuring unit tests](http://haacked.com/archive/2012/01/01/struct * [LibGit2Sharp](https://github.com/libgit2/libgit2sharp) - [License: MIT](https://github.com/libgit2/libgit2sharp/blob/master/LICENSE.md) LibGit2Sharp is a thin .Net layer (well... we try to keep it as thin as possible :-) ) wrapping the libgit2 linkable C Git library. -* [QuickGraph](http://quickgraph.codeplex.com/) - [License: Ms-PL](http://quickgraph.codeplex.com/license) QuickGraph provides generic directed/undirected graph datastructures and algorithms for .NET. -* [GraphSharp](http://graphsharp.codeplex.com/) - [License: Ms-PL](http://graphsharp.codeplex.com/) Graph# is a graph layout framework. It contains some layout algorithms and a GraphLayout control for WPF applications +* [QuikGraph](https://github.com/KeRNeLith/QuikGraph/) - [License: Ms-PL](https://github.com/KeRNeLith/QuikGraph/blob/master/LICENSE) QuikGraph provides generic directed/undirected graph data structures and algorithms for .NET. +* [GraphShape](https://github.com/KeRNeLith/GraphShape/) - [License: MIT](https://github.com/KeRNeLith/GraphShape/blob/master/LICENSE) GraphShape is a graph layout framework. It contains some layout algorithms and a GraphLayout control for WPF applications. * [Reactive Extensions](http://msdn.microsoft.com/en-us/data/gg577609) - [License: EULA](http://msdn.microsoft.com/en-us/devlabs/ff394099.aspx) The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators. * [WPFExtensions](http://wpfextensions.codeplex.com/) - [License: Ms-PL](http://wpfextensions.codeplex.com/license) Some extensions for the WPF framework. Controls, attached behaviours, helper classes, etc. * [Windows® API Code Pack for Microsoft® .NET Framework](http://archive.msdn.microsoft.com/WindowsAPICodePack) - [License: EULA](http://archive.msdn.microsoft.com/WindowsAPICodePack/Project/License.aspx) provides a source code library that can be used to access some features of Windows 7 and Windows Vista from managed code. diff --git a/SeeGitApp/App.xaml.cs b/SeeGitApp/App.xaml.cs index d1a1634..8e444e2 100644 --- a/SeeGitApp/App.xaml.cs +++ b/SeeGitApp/App.xaml.cs @@ -7,6 +7,6 @@ namespace SeeGit /// public class App : Application { - public const string LayoutAlgorithm = "EfficientSugiyama"; // Others include: "CompoundFDP" + public const string LayoutAlgorithm = "Sugiyama"; // Others include: "CompoundFDP" } } \ No newline at end of file diff --git a/SeeGitApp/MainWindow.xaml b/SeeGitApp/MainWindow.xaml index 3809153..b19c02d 100644 --- a/SeeGitApp/MainWindow.xaml +++ b/SeeGitApp/MainWindow.xaml @@ -2,7 +2,8 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:graphsharp="clr-namespace:GraphSharp.Controls;assembly=GraphSharp.Controls" xmlns:local="clr-namespace:SeeGit" + xmlns:graphshape="clr-namespace:GraphShape.Controls;assembly=GraphShape.Controls" + xmlns:local="clr-namespace:SeeGit" xmlns:zoom="clr-namespace:WPFExtensions.Controls;assembly=WPFExtensions" xmlns:view="clr-namespace:SeeGit.Views" xmlns:extbehaviour="clr-namespace:WPFExtensions.AttachedBehaviours;assembly=WPFExtensions" @@ -16,19 +17,19 @@ - diff --git a/SeeGitApp/Models/CommitEdge.cs b/SeeGitApp/Models/CommitEdge.cs index 5c88944..b334520 100644 --- a/SeeGitApp/Models/CommitEdge.cs +++ b/SeeGitApp/Models/CommitEdge.cs @@ -1,6 +1,6 @@ using System; using System.Diagnostics; -using QuickGraph; +using QuikGraph; namespace SeeGit { diff --git a/SeeGitApp/Models/ReachableHighlightAlgorithm.cs b/SeeGitApp/Models/ReachableHighlightAlgorithm.cs index 48c3013..46130ea 100644 --- a/SeeGitApp/Models/ReachableHighlightAlgorithm.cs +++ b/SeeGitApp/Models/ReachableHighlightAlgorithm.cs @@ -1,5 +1,6 @@ -using GraphSharp.Algorithms.Highlight; -using QuickGraph; +using System.Linq; +using GraphShape.Algorithms.Highlight; +using QuikGraph; namespace SeeGit.Models { @@ -18,11 +19,11 @@ public ReachableHighlightAlgorithm(IHighlightController private void ClearAllHighlights() { ClearSemiHighlights(); - foreach (var vertex in Controller.HighlightedVertices) + foreach (var vertex in Controller.HighlightedVertices.ToArray()) { Controller.RemoveHighlightFromVertex(vertex); } - foreach (var edge in Controller.HighlightedEdges) + foreach (var edge in Controller.HighlightedEdges.ToArray()) { Controller.RemoveHighlightFromEdge(edge); } @@ -30,11 +31,11 @@ private void ClearAllHighlights() private void ClearSemiHighlights() { - foreach (var vertex in Controller.SemiHighlightedVertices) + foreach (var vertex in Controller.SemiHighlightedVertices.ToArray()) { Controller.RemoveSemiHighlightFromVertex(vertex); } - foreach (var edge in Controller.SemiHighlightedEdges) + foreach (var edge in Controller.SemiHighlightedEdges.ToArray()) { Controller.RemoveSemiHighlightFromEdge(edge); } diff --git a/SeeGitApp/Models/ReachableHighlightAlgorithmFactory.cs b/SeeGitApp/Models/ReachableHighlightAlgorithmFactory.cs index ff6fd50..85afd88 100644 --- a/SeeGitApp/Models/ReachableHighlightAlgorithmFactory.cs +++ b/SeeGitApp/Models/ReachableHighlightAlgorithmFactory.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using GraphSharp.Algorithms.Highlight; -using QuickGraph; +using GraphShape.Algorithms.Highlight; +using QuikGraph; namespace SeeGit.Models { @@ -11,7 +11,7 @@ public class ReachableHighlightAlgorithmFactory : { private const string HighlightModeName = "Reachable"; - public IHighlightAlgorithm CreateAlgorithm(string highlightMode, + public IHighlightAlgorithm CreateAlgorithm(string highlightMode, IHighlightContext context, IHighlightController @@ -27,10 +27,10 @@ public IHighlightAlgorithm CreateAlgorithm(string highli public IHighlightParameters CreateParameters(string highlightMode, IHighlightParameters oldParameters) { - return new HighlightParameterBase(); + return new HighlightParameters(); } - public string GetHighlightMode(IHighlightAlgorithm algorithm) + public string GetHighlightMode(IHighlightAlgorithm algorithm) { if (algorithm is ReachableHighlightAlgorithm) { diff --git a/SeeGitApp/Models/RepositoryGraph.cs b/SeeGitApp/Models/RepositoryGraph.cs index d0be324..041fa07 100644 --- a/SeeGitApp/Models/RepositoryGraph.cs +++ b/SeeGitApp/Models/RepositoryGraph.cs @@ -1,4 +1,4 @@ -using QuickGraph; +using QuikGraph; namespace SeeGit { diff --git a/SeeGitApp/Models/RepositoryGraphBuilder.cs b/SeeGitApp/Models/RepositoryGraphBuilder.cs index b369b42..3a941cc 100644 --- a/SeeGitApp/Models/RepositoryGraphBuilder.cs +++ b/SeeGitApp/Models/RepositoryGraphBuilder.cs @@ -49,13 +49,7 @@ public RepositoryGraph Graph() AddBranchReferences(); AddHeadReference(); - // Efficient Sugiyama crashes if we have a single commit repository. So we start with CompoundFDP. - // The original attempt to fix this, 50ca739aaadd7249f864d17cae060b1a27e22029, had a bug where we never - // changed the algorithm back to Efficient Sugiyama. This fixes that. - _graph.LayoutAlgorithmType = - _graph.VertexCount == 1 - ? "CompoundFDP" - : App.LayoutAlgorithm; + _graph.LayoutAlgorithmType = App.LayoutAlgorithm; return _graph; } diff --git a/SeeGitApp/Models/RepositoryGraphLayout.cs b/SeeGitApp/Models/RepositoryGraphLayout.cs index dc318dd..703d796 100644 --- a/SeeGitApp/Models/RepositoryGraphLayout.cs +++ b/SeeGitApp/Models/RepositoryGraphLayout.cs @@ -1,4 +1,4 @@ -using GraphSharp.Controls; +using GraphShape.Controls; using SeeGit.Models; namespace SeeGit diff --git a/SeeGitApp/SeeGitApp.csproj b/SeeGitApp/SeeGitApp.csproj index 81ab75a..27bca02 100644 --- a/SeeGitApp/SeeGitApp.csproj +++ b/SeeGitApp/SeeGitApp.csproj @@ -1,4 +1,4 @@ - + @@ -44,13 +44,11 @@ false - - False - ..\packages\GraphSharp.1.1.0.0\lib\net40\GraphSharp.dll + + ..\packages\GraphShape.1.1.0\lib\net40\GraphShape.dll - - False - ..\packages\GraphSharp.1.1.0.0\lib\net40\GraphSharp.Controls.dll + + ..\packages\GraphShape.Controls.1.1.0\lib\net40\GraphShape.Controls.dll ..\packages\LibGit2Sharp.0.24.0\lib\net40\LibGit2Sharp.dll @@ -65,18 +63,8 @@ False ..\packages\Windows7APICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll - - False - ..\packages\QuickGraph.3.6.61119.7\lib\net4\QuickGraph.dll - - - ..\packages\QuickGraph.3.6.61119.7\lib\net4\QuickGraph.Data.dll - - - ..\packages\QuickGraph.3.6.61119.7\lib\net4\QuickGraph.Graphviz.dll - - - ..\packages\QuickGraph.3.6.61119.7\lib\net4\QuickGraph.Serialization.dll + + ..\packages\QuikGraph.2.2.0\lib\net40\QuikGraph.dll diff --git a/SeeGitApp/ViewModels/MainWindowViewModel.cs b/SeeGitApp/ViewModels/MainWindowViewModel.cs index 26dc410..35d282e 100644 --- a/SeeGitApp/ViewModels/MainWindowViewModel.cs +++ b/SeeGitApp/ViewModels/MainWindowViewModel.cs @@ -10,7 +10,7 @@ public class MainWindowViewModel : NotifyPropertyChanged private string _repositoryPath; private IRepositoryGraphBuilder _graphBuilder; - // Tree, LinLog, KK, ISOM, EfficientSugiyama, FR, CompoundFDP, BoundedFR, Circular + // Tree, LinLog, KK, ISOM, Sugiyama, FR, CompoundFDP, BoundedFR, Circular, Random private string _layoutAlgorithmType = "Tree"; private readonly Dispatcher _uiDispatcher; diff --git a/SeeGitApp/packages.config b/SeeGitApp/packages.config index 3266fd1..eb6d361 100644 --- a/SeeGitApp/packages.config +++ b/SeeGitApp/packages.config @@ -1,9 +1,10 @@  - + + - + diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj index 8bea4c6..8e345d5 100644 --- a/UnitTests/UnitTests.csproj +++ b/UnitTests/UnitTests.csproj @@ -1,4 +1,4 @@ - + @@ -45,30 +45,12 @@ ..\packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll True - - False - ..\packages\GraphSharp.1.1.0.0\lib\net40\GraphSharp.dll - - - False - ..\packages\GraphSharp.1.1.0.0\lib\net40\GraphSharp.Controls.dll - ..\packages\Moq.4.8.1\lib\net45\Moq.dll True - - False - ..\packages\QuickGraph.3.6.61119.7\lib\net4\QuickGraph.dll - - - ..\packages\QuickGraph.3.6.61119.7\lib\net4\QuickGraph.Data.dll - - - ..\packages\QuickGraph.3.6.61119.7\lib\net4\QuickGraph.Graphviz.dll - - - ..\packages\QuickGraph.3.6.61119.7\lib\net4\QuickGraph.Serialization.dll + + ..\packages\QuikGraph.2.2.0\lib\net40\QuikGraph.dll diff --git a/UnitTests/packages.config b/UnitTests/packages.config index afb2b51..53bb17d 100644 --- a/UnitTests/packages.config +++ b/UnitTests/packages.config @@ -1,9 +1,8 @@  - - +