|
|
|
@ -29,11 +29,11 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
@@ -29,11 +29,11 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
|
|
|
|
|
private ScrollViewer leftScrollViewer; |
|
|
|
|
private ScrollViewer topScrollViewer; |
|
|
|
|
|
|
|
|
|
public Matrix<INode, Relationship> Matrix |
|
|
|
|
public DependencyMatrix Matrix |
|
|
|
|
{ |
|
|
|
|
get |
|
|
|
|
{ |
|
|
|
|
return matrixControl.Matrix; |
|
|
|
|
return (DependencyMatrix) matrixControl.Matrix; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
set |
|
|
|
@ -52,16 +52,15 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
@@ -52,16 +52,15 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
|
|
|
|
|
|
|
|
|
|
public void DrawTree(Module module) |
|
|
|
|
{ |
|
|
|
|
Helper.FillTree(leftTree,module); |
|
|
|
|
var leftCol = leftTree.Items.SourceCollection as INotifyCollectionChanged; |
|
|
|
|
leftCol.CollectionChanged += BuildLeftINodeList; |
|
|
|
|
Helper.FillTree(leftTree, module); |
|
|
|
|
|
|
|
|
|
Helper.FillTree(topTree,module); |
|
|
|
|
var topCol = topTree.Items.SourceCollection as INotifyCollectionChanged; |
|
|
|
|
topCol.CollectionChanged += BuildTopINodeList; |
|
|
|
|
Helper.FillTree(topTree, module); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Trees_Loaded (object sender, EventArgs e) |
|
|
|
|
{ |
|
|
|
|
leftTree.ApplyTemplate(); |
|
|
|
@ -71,7 +70,6 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
@@ -71,7 +70,6 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
|
|
|
|
|
topScrollViewer = Helper.FindVisualChild<ScrollViewer>(topTree); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool rebuildLeftNodeListRequested; |
|
|
|
|
|
|
|
|
|
void BuildLeftINodeList(object sender,NotifyCollectionChangedEventArgs e) |
|
|
|
@ -81,8 +79,11 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
@@ -81,8 +79,11 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
|
|
|
|
|
rebuildLeftNodeListRequested = true; |
|
|
|
|
Dispatcher.BeginInvoke( |
|
|
|
|
DispatcherPriority.DataBind, |
|
|
|
|
new Action( |
|
|
|
|
delegate { |
|
|
|
|
new Action(SetVisibleItemsForRows)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SetVisibleItemsForRows() |
|
|
|
|
{ |
|
|
|
|
List<INode> leftNodes = new List<INode>(); |
|
|
|
|
foreach (DependecyTreeNode element in leftTree.Items) { |
|
|
|
|
var n = element.INode; |
|
|
|
@ -91,8 +92,6 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
@@ -91,8 +92,6 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
|
|
|
|
|
rebuildLeftNodeListRequested = false; |
|
|
|
|
matrixControl.SetVisibleItems(HeaderType.Rows, leftNodes); |
|
|
|
|
} |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool rebuildTopNodeListRequested; |
|
|
|
@ -104,8 +103,11 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
@@ -104,8 +103,11 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
|
|
|
|
|
rebuildTopNodeListRequested = true; |
|
|
|
|
Dispatcher.BeginInvoke( |
|
|
|
|
DispatcherPriority.DataBind, |
|
|
|
|
new Action( |
|
|
|
|
delegate { |
|
|
|
|
new Action(SetVisibleItemsForColumns)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SetVisibleItemsForColumns() |
|
|
|
|
{ |
|
|
|
|
List<INode> topNodes = new List<INode>(); |
|
|
|
|
foreach (DependecyTreeNode element in topTree.Items) { |
|
|
|
|
var n = element.INode; |
|
|
|
@ -114,8 +116,6 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
@@ -114,8 +116,6 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
|
|
|
|
|
rebuildTopNodeListRequested = false; |
|
|
|
|
matrixControl.SetVisibleItems(HeaderType.Columns, topNodes); |
|
|
|
|
} |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void OnHoverChanged(object sender ,HoveredCellEventArgs <Relationship> e) |
|
|
|
|
{ |
|
|
|
@ -130,8 +130,6 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
@@ -130,8 +130,6 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
|
|
|
|
|
topTree.SelectedItem = topNode; |
|
|
|
|
topTree.FocusNode(topNode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|