Browse Source
- Small tweaks to Dependency Matrix - Implementation of Relationships. For now only for Namespace. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6218 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61pull/1/head
19 changed files with 313 additions and 45 deletions
@ -1,11 +1,20 @@
@@ -1,11 +1,20 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Linq.Expressions; |
||||
using System.Text; |
||||
using System.Windows; |
||||
using System.Windows.Controls.Primitives; |
||||
|
||||
namespace ICSharpCode.CodeQualityAnalysis.Controls |
||||
{ |
||||
public class DependencyMatrixControl : MatrixControl<INode> |
||||
{ |
||||
static DependencyMatrixControl() |
||||
{ |
||||
DefaultStyleKeyProperty.OverrideMetadata( |
||||
typeof(DependencyMatrixControl), |
||||
new FrameworkPropertyMetadata(typeof(DependencyMatrixControl))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Text; |
||||
|
||||
namespace ICSharpCode.CodeQualityAnalysis |
||||
{ |
||||
/// <summary>
|
||||
/// Description of Relationship.
|
||||
/// </summary>
|
||||
public class Relationship |
||||
{ |
||||
public ISet<RelationshipType> Relationships { get; private set; } |
||||
public int NumberOfOccurrences { get; set; } |
||||
|
||||
public Relationship() |
||||
{ |
||||
Relationships = new HashSet<RelationshipType>(); |
||||
NumberOfOccurrences = 0; |
||||
} |
||||
|
||||
public override string ToString() |
||||
{ |
||||
var builder = new StringBuilder(); |
||||
|
||||
foreach (var relationship in Relationships) |
||||
builder.Append(relationship + " "); |
||||
|
||||
builder.Append(NumberOfOccurrences); |
||||
return builder.ToString(); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
|
||||
namespace ICSharpCode.CodeQualityAnalysis |
||||
{ |
||||
/// <summary>
|
||||
/// Description of RelationshipType.
|
||||
/// </summary>
|
||||
public enum RelationshipType |
||||
{ |
||||
OneWayTo, |
||||
UseThis, |
||||
UsedBy, |
||||
Same, |
||||
Contains, |
||||
None |
||||
} |
||||
} |
||||
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:Controls="clr-namespace:ICSharpCode.CodeQualityAnalysis.Controls" |
||||
> |
||||
<Style TargetType="{x:Type Controls:DependencyMatrixControl}"> |
||||
<Setter Property="ShowGridLines" Value="True" /> |
||||
</Style> |
||||
</ResourceDictionary> |
||||
Loading…
Reference in new issue